mips.md (sync_compare_and_swap<mode>): Handle compare against constant zero.

* 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
This commit is contained in:
David Daney 2007-10-02 20:15:34 +00:00 committed by David Daney
parent 53c666346b
commit 966b774d3e
3 changed files with 9 additions and 2 deletions

View 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.

View 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" \

View File

@ -4329,7 +4329,7 @@
[(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"