]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mips.md (sync_compare_and_swap<mode>): Handle compare against constant zero.
authorDavid Daney <ddaney@avtrex.com>
Tue, 2 Oct 2007 20:15:34 +0000 (20:15 +0000)
committerDavid Daney <daney@gcc.gnu.org>
Tue, 2 Oct 2007 20:15:34 +0000 (20:15 +0000)
* config/mips/mips.md (sync_compare_and_swap<mode>): Handle compare
against constant zero.
* config/mips/mips.h (MIPS_COMPARE_AND_SWAP):  Handle constant zero
operand.

From-SVN: r128963

gcc/ChangeLog
gcc/config/mips/mips.h
gcc/config/mips/mips.md

index 476ca871393d2821ff1f73e87d6d72956840dbc6..f1f28f7c3721679bf0ee8f2c65c5d0db743440b3 100644 (file)
@@ -1,3 +1,10 @@
+2007-10-02  David Daney  <ddaney@avtrex.com>
+
+       * config/mips/mips.md (sync_compare_and_swap<mode>): Handle compare
+       against constant zero.
+       * config/mips/mips.h (MIPS_COMPARE_AND_SWAP):  Handle constant zero
+       operand.
+
 2007-09-02  Kenneth Zadeck <zadeck@naturalbridge.com>
 
        * ra-conflict.c: New file.
index ce22f4f5be9ae3de37c1d9455f9684a5354c59d3..534e88b36e68ed7a6e4f2974208d425f0507d28e 100644 (file)
@@ -2959,7 +2959,7 @@ while (0)
 #define MIPS_COMPARE_AND_SWAP(SUFFIX, OP)      \
   "%(%<%[%|sync\n"                             \
   "1:\tll" SUFFIX "\t%0,%1\n"                  \
-  "\tbne\t%0,%2,2f\n"                          \
+  "\tbne\t%0,%z2,2f\n"                         \
   "\t" OP "\t%@,%3\n"                          \
   "\tsc" SUFFIX "\t%@,%1\n"                    \
   "\tbeq\t%@,%.,1b\n"                          \
index 890cc706590a21e642a1bde8e5dd45fbb9f28efc..38800ed15e76e1c962f82ce99895b40191fe6479 100644 (file)
   [(set (match_operand:GPR 0 "register_operand" "=&d,&d")
        (match_operand:GPR 1 "memory_operand" "+R,R"))
    (set (match_dup 1)
-       (unspec_volatile:GPR [(match_operand:GPR 2 "register_operand" "d,d")
+       (unspec_volatile:GPR [(match_operand:GPR 2 "reg_or_0_operand" "dJ,dJ")
                              (match_operand:GPR 3 "arith_operand" "I,d")]
         UNSPEC_COMPARE_AND_SWAP))]
   "GENERATE_LL_SC"