re PR target/52481 (m68k-*: internal compiler error: in extract_insn, at recog.c:2123)

PR target/52481
	* config/m68k/sync.md (atomic_test_and_set): Use expand_simple_unop
	instead of calling negqi2 directly.

From-SVN: r184948
This commit is contained in:
Richard Henderson 2012-03-05 10:37:19 -08:00 committed by Richard Henderson
parent ab6497549a
commit b7313c309d
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2012-03-05 Richard Henderson <rth@redhat.com>
PR target/52481
* config/m68k/sync.md (atomic_test_and_set): Use expand_simple_unop
instead of calling negqi2 directly.
2012-03-05 Oleg Endo <olegendo@gcc.gnu.org>
* config/sh/sh.h (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): New hook.

View File

@ -62,8 +62,11 @@
(match_operand:SI 2 "const_int_operand" "")] ;; model
""
{
emit_insn (gen_atomic_test_and_set_1 (operands[0], operands[1]));
emit_insn (gen_negqi2 (operands[0], operands[0]));
rtx t = gen_reg_rtx (QImode);
emit_insn (gen_atomic_test_and_set_1 (t, operands[1]));
t = expand_simple_unop (QImode, NEG, t, operands[0], 0);
if (t != operands[0])
emit_move_insn (operands[0], t);
DONE;
})