Fix to mn10300 cmpsi pattern
Matt Hiller
hiller@redhat.com
Mon Mar 26 15:37:00 GMT 2001
The cmp instruction on mn10300 does not allow both operands to be
the same register. The cmpsi pattern, as it presently is, looks for
situations where a register is compared to itself, but doesn't compensate
properly when it finds one. The following patch fixes this.
2001-03-26 Matthew Hiller <hiller@redhat.com>
* config/mn10300/mn10300.md (cmpsi): Fix first alternative's
output template.
Index: gcc/config/mn10300/mn10300.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.md,v
retrieving revision 1.38
diff -c -p -r1.38 mn10300.md
*** gcc/config/mn10300/mn10300.md 2000/12/06 03:56:43 1.38
--- gcc/config/mn10300/mn10300.md 2001/03/26 23:33:35
***************
*** 715,723 ****
(match_operand:SI 1 "nonmemory_operand" "!*0,daxi")))]
""
"@
! add 0,%0
cmp %1,%0"
! [(set_attr "cc" "invert,compare")])
;; ----------------------------------------------------------------------
;; ADD INSTRUCTIONS
--- 715,723 ----
(match_operand:SI 1 "nonmemory_operand" "!*0,daxi")))]
""
"@
! or 1,psw\;and 1,psw
cmp %1,%0"
! [(set_attr "cc" "compare,compare")])
;; ----------------------------------------------------------------------
;; ADD INSTRUCTIONS
More information about the Gcc-patches
mailing list