]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/14209 (Bug in cris.md, shrinking access size of postincrement.)
authorHans-Peter Nilsson <hp@axis.com>
Thu, 19 Feb 2004 11:28:00 +0000 (11:28 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Thu, 19 Feb 2004 11:28:00 +0000 (11:28 +0000)
PR target/14209
* config/cris/cris.md ("*andsi_movu", "*andhi_movu"): Tweak
constraints to not match postincrement.  Adjust the predicate to
exclude a volatile memory reference.

From-SVN: r78095

gcc/ChangeLog
gcc/config/cris/cris.md

index a841cb783bd3b90a555786c4de8f810e247e7234..90bf8d50d55731363937d0789c55d9f2414a4f1c 100644 (file)
@@ -1,3 +1,10 @@
+2004-02-19  Hans-Peter Nilsson  <hp@axis.com>
+
+       PR target/14209
+       * config/cris/cris.md ("*andsi_movu", "*andhi_movu"): Tweak
+       constraints to not match postincrement.  Adjust the predicate to
+       exclude a volatile memory reference.
+
 2004-02-19  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/mcore/mcore.h (ASM_OUTPUT_EXTERNAL): Remove.
index ea41aaf539efc40aa11ca36e69e4a9b10da3f962..a3b7de5bb782e73db67a6d049982f437a19e3854 100644 (file)
 
 (define_insn "*andsi_movu"
   [(set (match_operand:SI 0 "register_operand" "=r,r,r")
-       (and:SI (match_operand:SI 1 "nonimmediate_operand" "%r,Q>,m")
+       (and:SI (match_operand:SI 1 "nonimmediate_operand" "%r,Q,To")
                (match_operand:SI 2 "const_int_operand" "n,n,n")))]
-  "INTVAL (operands[2]) == 255 || INTVAL (operands[2]) == 65535"
+  "INTVAL (operands[2]) == 255 || INTVAL (operands[2]) == 65535
+   && (GET_CODE (operands[1]) != MEM || ! MEM_VOLATILE_P (operands[1]))"
   "movu.%z2 %1,%0"
   [(set_attr "slottable" "yes,yes,no")])
 
 
 (define_insn "*andhi_movu"
   [(set (match_operand:HI 0 "register_operand" "=r,r,r")
-       (and:HI (match_operand:HI 1 "nonimmediate_operand" "r,Q>,m")
+       (and:HI (match_operand:HI 1 "nonimmediate_operand" "r,Q,To")
                (const_int 255)))]
-  ""
+  "GET_CODE (operands[1]) != MEM || ! MEM_VOLATILE_P (operands[1])"
   "mOvu.b %1,%0"
   [(set_attr "slottable" "yes,yes,no")])