against constant zero.
* config/mips/mips.h (MIPS_COMPARE_AND_SWAP): Handle constant zero
operand.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128963
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
#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" \
[(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"