OSDN Git Service

* config/cris/cris.md ("*andsi_movu", "*andsi_clear", "*andhi_movu")
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Feb 2007 21:21:50 +0000 (21:21 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Feb 2007 21:21:50 +0000 (21:21 +0000)
("*andhi_clear", andu (casesi+45)): For size-changed operand where
memory is allowed, require !side_effects_p, not just !MEM_VOLATILE_P.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121612 138bc75d-0d04-0410-961f-82ee72b054a4

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

index a712429..9f62c7e 100644 (file)
@@ -1,3 +1,9 @@
+2007-02-05  Hans-Peter Nilsson  <hp@axis.com>
+
+       * config/cris/cris.md ("*andsi_movu", "*andsi_clear", "*andhi_movu")
+       ("*andhi_clear", andu (casesi+45)): For size-changed operand where
+       memory is allowed, require !side_effects_p, not just !MEM_VOLATILE_P.
+
 2007-02-05  Roger Sayle  <roger@eyesopen.com>
 
        * fold-const.c (fold_unary) <REAL_PART>: Test for availability of
index 3024877..00af2e6 100644 (file)
@@ -1,5 +1,5 @@
 ;; GCC machine description for CRIS cpu cores.
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
 ;; Free Software Foundation, Inc.
 ;; Contributed by Axis Communications.
 
        (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)
-   && (GET_CODE (operands[1]) != MEM || ! MEM_VOLATILE_P (operands[1]))"
+   && !side_effects_p (operands[1])"
   "movu.%z2 %1,%0"
   [(set_attr "slottable" "yes,yes,no")])
 
        (and:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,0,0,0,0")
                (match_operand:SI 2 "const_int_operand" "P,n,P,n,P,n")))]
   "(INTVAL (operands[2]) == -65536 || INTVAL (operands[2]) == -256)
-   && (GET_CODE (operands[0]) != MEM || ! MEM_VOLATILE_P (operands[0]))"
+   && !side_effects_p (operands[0])"
   "@
    cLear.b %0
    cLear.w %0
   [(set (match_operand:HI 0 "register_operand" "=r,r,r")
        (and:HI (match_operand:HI 1 "nonimmediate_operand" "r,Q,To")
                (const_int 255)))]
-  "GET_CODE (operands[1]) != MEM || ! MEM_VOLATILE_P (operands[1])"
+  "!side_effects_p (operands[1])"
   "mOvu.b %1,%0"
   [(set_attr "slottable" "yes,yes,no")])
 
   [(set (match_operand:HI 0 "nonimmediate_operand" "=r,Q,To")
        (and:HI (match_operand:HI 1 "nonimmediate_operand" "0,0,0")
                (const_int -256)))]
-  "GET_CODE (operands[0]) != MEM || ! MEM_VOLATILE_P (operands[0])"
+  "!side_effects_p (operands[0])"
   "cLear.b %0"
   [(set_attr "slottable" "yes,yes,no")
    (set_attr "cc" "none")])
    ;; don't do this for a mem-volatile access.
   "REGNO (operands[2]) == REGNO (operands[0])
    && INTVAL (operands[3]) <= 65535 && INTVAL (operands[3]) >= 0
-   && ! CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'I')
-   && (GET_CODE (operands[1]) != MEM || ! MEM_VOLATILE_P (operands[1]))"
+   && !CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'I')
+   && !side_effects_p (operands[1])"
   ;; FIXME: CC0 valid except for M (i.e. CC_NOT_NEGATIVE).
   [(set (match_dup 0) (match_dup 4))
    (set (match_dup 5) (match_dup 6))]