diff options
Diffstat (limited to 'gcc/config/ia64')
-rw-r--r-- | gcc/config/ia64/ia64.c | 10 | ||||
-rw-r--r-- | gcc/config/ia64/sync.md | 17 |
2 files changed, 15 insertions, 12 deletions
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 34a37d2..ae77a98 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -2141,11 +2141,13 @@ ia64_expand_atomic_op (enum rtx_code code, rtx mem, rtx val, new_reg = cmp_reg; if (code == NOT) { - new_reg = expand_simple_unop (DImode, NOT, new_reg, NULL_RTX, true); - code = AND; + new_reg = expand_simple_binop (DImode, AND, new_reg, val, NULL_RTX, + true, OPTAB_DIRECT); + new_reg = expand_simple_unop (DImode, code, new_reg, NULL_RTX, true); } - new_reg = expand_simple_binop (DImode, code, new_reg, val, NULL_RTX, - true, OPTAB_DIRECT); + else + new_reg = expand_simple_binop (DImode, code, new_reg, val, NULL_RTX, + true, OPTAB_DIRECT); if (mode != DImode) new_reg = gen_lowpart (mode, new_reg); diff --git a/gcc/config/ia64/sync.md b/gcc/config/ia64/sync.md index c467b0d..69b5d08 100644 --- a/gcc/config/ia64/sync.md +++ b/gcc/config/ia64/sync.md @@ -57,8 +57,9 @@ (define_expand "sync_nand<mode>" [(set (match_operand:IMODE 0 "memory_operand" "") - (and:IMODE (not:IMODE (match_dup 0)) - (match_operand:IMODE 1 "general_operand" "")))] + (not:IMODE + (and:IMODE (match_dup 0) + (match_operand:IMODE 1 "general_operand" ""))))] "" { ia64_expand_atomic_op (NOT, operands[0], operands[1], NULL, NULL); @@ -78,9 +79,9 @@ (define_expand "sync_old_nand<mode>" [(set (match_operand:IMODE 0 "gr_register_operand" "") - (and:IMODE - (not:IMODE (match_operand:IMODE 1 "memory_operand" "")) - (match_operand:IMODE 2 "general_operand" "")))] + (not:IMODE + (and:IMODE (match_operand:IMODE 1 "memory_operand" "") + (match_operand:IMODE 2 "general_operand" ""))))] "" { ia64_expand_atomic_op (NOT, operands[1], operands[2], operands[0], NULL); @@ -100,9 +101,9 @@ (define_expand "sync_new_nand<mode>" [(set (match_operand:IMODE 0 "gr_register_operand" "") - (and:IMODE - (not:IMODE (match_operand:IMODE 1 "memory_operand" "")) - (match_operand:IMODE 2 "general_operand" "")))] + (not:IMODE + (and:IMODE (match_operand:IMODE 1 "memory_operand" "") + (match_operand:IMODE 2 "general_operand" ""))))] "" { ia64_expand_atomic_op (NOT, operands[1], operands[2], NULL, operands[0]); |