aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMatthew Hiller <hiller@redhat.com>2001-03-29 02:32:46 +0000
committerMatthew Hiller <hiller@gcc.gnu.org>2001-03-29 02:32:46 +0000
commit498cf3d0edd7db5c044dc73b8b9c37c8f6906fd6 (patch)
tree62b821db395e83b74400dea719d7f47b4f80b576 /gcc
parent3b905056f966e7e20f93e3c059e4928723981556 (diff)
downloadgcc-498cf3d0edd7db5c044dc73b8b9c37c8f6906fd6.zip
gcc-498cf3d0edd7db5c044dc73b8b9c37c8f6906fd6.tar.gz
gcc-498cf3d0edd7db5c044dc73b8b9c37c8f6906fd6.tar.bz2
mn10300.md (cmpsi): Fix first alternative's output template.
2001-03-28 Matthew Hiller <hiller@redhat.com> * config/mn10300/mn10300.md (cmpsi): Fix first alternative's output template. * MAINTAINERS: Added self. From-SVN: r40956
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/mn10300/mn10300.md16
2 files changed, 19 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f9edd3d..cc07a8b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2001-03-28 Matthew Hiller <hiller@redhat.com>
+
+ * config/mn10300/mn10300.md (cmpsi): Fix first alternative's
+ output template.
+
+ * MAINTAINERS: Added self.
+
2001-03-28 Richard Henderson <rth@redhat.com>
* Makefile.in (cs-tconfig.h): Depend on CONFIG_H, not GCONFIG_H.
diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md
index 564a4c9..bf913b2 100644
--- a/gcc/config/mn10300/mn10300.md
+++ b/gcc/config/mn10300/mn10300.md
@@ -709,15 +709,23 @@
"* return output_tst (operands[0], insn);"
[(set_attr "cc" "set_znv")])
+;; Ordinarily, the cmp instruction will set the Z bit of cc0 to 1 if
+;; its operands hold equal values, but the operands of a cmp
+;; instruction must be distinct registers. In the case where we'd
+;; like to compare a register to itself, we can achieve this effect
+;; with a btst 0,d0 instead. (This will not alter the contents of d0
+;; but will have the proper effect on cc0. Using d0 is arbitrary; any
+;; data register would work.)
+
(define_insn "cmpsi"
[(set (cc0)
- (compare (match_operand:SI 0 "register_operand" "!*d*a*x,dax")
- (match_operand:SI 1 "nonmemory_operand" "!*0,daxi")))]
+ (compare (match_operand:SI 0 "register_operand" "*d*a*x,dax")
+ (match_operand:SI 1 "nonmemory_operand" "*0,daxi")))]
""
"@
- add 0,%0
+ btst 0,d0
cmp %1,%0"
- [(set_attr "cc" "invert,compare")])
+ [(set_attr "cc" "compare,compare")])
;; ----------------------------------------------------------------------
;; ADD INSTRUCTIONS