* config/alpha/alpha.c (alpha_split_atomic_op): Properly handle NAND
case by calculating ~(new_reg & val) instead of (~new_reg & val).
* config/alpha/sync.md (sync_nand<mode>): Change insn RTX
to (not:I48MODE (and:I48MODE (...))).
(sync_old_nand<mode>): Ditto.
(sync_new_nand<mode>): Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142313
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-12-01 Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/37908
+ * config/alpha/alpha.c (alpha_split_atomic_op): Properly handle NAND
+ case by calculating ~(new_reg & val) instead of (~new_reg & val).
+ * config/alpha/sync.md (sync_nand<mode>): Change insn RTX
+ to (not:I48MODE (and:I48MODE (...))).
+ (sync_old_nand<mode>): Ditto.
+ (sync_new_nand<mode>): Ditto.
+
2008-12-01 Nick Clifton <nickc@redhat.com>
* config/stormy16/stormy16.md (CARRY_REG): New constant.
2008-11-21 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/37908
- * config/ia64/ia64.c (ia64_expand_atomic_ope): Properly handle NAND
+ * config/ia64/ia64.c (ia64_expand_atomic_op): Properly handle NAND
case by calculating ~(new_reg & val) instead of (~new_reg & val).
* config/ia64/sync.md (sync_nand<mode>): Change insn RTX
to (not:IMODE (and:IMODE (...))).
emit_load_locked (mode, before, mem);
if (code == NOT)
- x = gen_rtx_AND (mode, gen_rtx_NOT (mode, before), val);
+ {
+ x = gen_rtx_AND (mode, before, val);
+ emit_insn (gen_rtx_SET (VOIDmode, val, x));
+
+ x = gen_rtx_NOT (mode, val);
+ }
else
x = gen_rtx_fmt_ee (code, mode, before, val);
if (after)
(define_insn_and_split "sync_nand<mode>"
[(set (match_operand:I48MODE 0 "memory_operand" "+m")
(unspec:I48MODE
- [(and:I48MODE (not:I48MODE (match_dup 0))
- (match_operand:I48MODE 1 "register_operand" "r"))]
+ [(not:I48MODE
+ (and:I48MODE (match_dup 0)
+ (match_operand:I48MODE 1 "register_operand" "r")))]
UNSPEC_ATOMIC))
(clobber (match_scratch:I48MODE 2 "=&r"))]
""
(match_operand:I48MODE 1 "memory_operand" "+m"))
(set (match_dup 1)
(unspec:I48MODE
- [(and:I48MODE (not:I48MODE (match_dup 1))
- (match_operand:I48MODE 2 "register_operand" "r"))]
+ [(not:I48MODE
+ (and:I48MODE (match_dup 1)
+ (match_operand:I48MODE 2 "register_operand" "r")))]
UNSPEC_ATOMIC))
(clobber (match_scratch:I48MODE 3 "=&r"))]
""
(define_insn_and_split "sync_new_nand<mode>"
[(set (match_operand:I48MODE 0 "register_operand" "=&r")
- (and:I48MODE
- (not:I48MODE (match_operand:I48MODE 1 "memory_operand" "+m"))
- (match_operand:I48MODE 2 "register_operand" "r")))
+ (not:I48MODE
+ (and:I48MODE (match_operand:I48MODE 1 "memory_operand" "+m")
+ (match_operand:I48MODE 2 "register_operand" "r"))))
(set (match_dup 1)
(unspec:I48MODE
- [(and:I48MODE (not:I48MODE (match_dup 1)) (match_dup 2))]
+ [(not:I48MODE (and:I48MODE (match_dup 1) (match_dup 2)))]
UNSPEC_ATOMIC))
(clobber (match_scratch:I48MODE 3 "=&r"))]
""