aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorDavid Daney <ddaney@avtrex.com>2007-10-02 20:15:34 +0000
committerDavid Daney <daney@gcc.gnu.org>2007-10-02 20:15:34 +0000
commit966b774d3ee4a815985f45e5357d4ebcc789c413 (patch)
tree7035d4c488f70534410b155769fc256cabe15238 /gcc/config
parent53c666346b269829669ec14afee4d31d2bf4ff9b (diff)
downloadgcc-966b774d3ee4a815985f45e5357d4ebcc789c413.zip
gcc-966b774d3ee4a815985f45e5357d4ebcc789c413.tar.gz
gcc-966b774d3ee4a815985f45e5357d4ebcc789c413.tar.bz2
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
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/mips/mips.h2
-rw-r--r--gcc/config/mips/mips.md2
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index ce22f4f..534e88b 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -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" \
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 890cc70..38800ed 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -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"