Path: utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!mdt
From: mdt@YAHI.STANFORD.EDU (Michael Tiemann)
Newsgroups: gnu.gcc.bug
Subject: 1 fix for GCC 1.31 on sparc
Message-ID: <8811250039.AA18034@yahi.Stanford.EDU>
Date: 25 Nov 88 00:39:30 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: tiemann@lurch.stanford.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 82

This fixes the case where erroneous asm code is generated, such as

	cmp 1,2

yahi% diff -c2 sparc.md~ sparc.md
*** sparc.md~	Sun Nov 20 19:25:13 1988
--- sparc.md	Thu Nov 24 16:20:52 1988
***************
*** 32,37 ****
  (define_insn "cmpsi"
    [(set (cc0)
! 	(minus (match_operand:SI 0 "arith_operand" "rI")
! 	       (match_operand:SI 1 "arith_operand" "rI")))]
    ""
    "*
--- 32,37 ----
  (define_insn "cmpsi"
    [(set (cc0)
! 	(minus (match_operand:SI 0 "arith_operand" "r,I")
! 	       (match_operand:SI 1 "arith_operand" "I,r")))]
    ""
    "*
***************
*** 47,52 ****
  (define_expand "cmpdf"
    [(set (cc0)
! 	(minus:DF (match_operand:DF 0 "nonmemory_operand" "fG")
! 		  (match_operand:DF 1 "nonmemory_operand" "fG")))]
    ""
    "emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, DFmode, 32)));")
--- 47,52 ----
  (define_expand "cmpdf"
    [(set (cc0)
! 	(minus:DF (match_operand:DF 0 "nonmemory_operand" "f,G")
! 		  (match_operand:DF 1 "nonmemory_operand" "G,f")))]
    ""
    "emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, DFmode, 32)));")
***************
*** 54,59 ****
  (define_insn ""
    [(set (cc0)
! 	(minus:DF (match_operand:DF 0 "nonmemory_operand" "fG")
! 		  (match_operand:DF 1 "nonmemory_operand" "fG")))]
    ""
    "*
--- 54,59 ----
  (define_insn ""
    [(set (cc0)
! 	(minus:DF (match_operand:DF 0 "nonmemory_operand" "f,G")
! 		  (match_operand:DF 1 "nonmemory_operand" "G,f")))]
    ""
    "*
***************
*** 73,78 ****
  (define_expand "cmpsf"
    [(set (cc0)
! 	(minus:SF (match_operand:SF 0 "nonmemory_operand" "fG")
! 		  (match_operand:SF 1 "nonmemory_operand" "fG")))]
    ""
    "emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, SFmode, 32)));")
--- 73,78 ----
  (define_expand "cmpsf"
    [(set (cc0)
! 	(minus:SF (match_operand:SF 0 "nonmemory_operand" "f,G")
! 		  (match_operand:SF 1 "nonmemory_operand" "G,f")))]
    ""
    "emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, SFmode, 32)));")
***************
*** 80,85 ****
  (define_insn ""
    [(set (cc0)
! 	(minus:SF (match_operand:SF 0 "nonmemory_operand" "fG")
! 		  (match_operand:SF 1 "nonmemory_operand" "fG")))]
    ""
    "*
--- 80,85 ----
  (define_insn ""
    [(set (cc0)
! 	(minus:SF (match_operand:SF 0 "nonmemory_operand" "f,G")
! 		  (match_operand:SF 1 "nonmemory_operand" "G,f")))]
    ""
    "*