From: David Daney Date: Tue, 2 Oct 2007 20:15:34 +0000 (+0000) Subject: mips.md (sync_compare_and_swap): Handle compare against constant zero. X-Git-Tag: releases/gcc-4.3.0~2257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=966b774d3ee4a815985f45e5357d4ebcc789c413;p=thirdparty%2Fgcc.git mips.md (sync_compare_and_swap): Handle compare against constant zero. * config/mips/mips.md (sync_compare_and_swap): Handle compare against constant zero. * config/mips/mips.h (MIPS_COMPARE_AND_SWAP): Handle constant zero operand. From-SVN: r128963 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 476ca871393d..f1f28f7c3721 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-10-02 David Daney + + * config/mips/mips.md (sync_compare_and_swap): Handle compare + against constant zero. + * config/mips/mips.h (MIPS_COMPARE_AND_SWAP): Handle constant zero + operand. + 2007-09-02 Kenneth Zadeck * ra-conflict.c: New file. diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index ce22f4f5be9a..534e88b36e68 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 890cc706590a..38800ed15e76 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"