From b7313c309dafbb714591e9a91c2e409f9bc4e77c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 5 Mar 2012 10:37:19 -0800 Subject: 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/m68k/sync.md | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f101f7c..911737a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-03-05 Richard Henderson + + 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 * config/sh/sh.h (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): New hook. diff --git a/gcc/config/m68k/sync.md b/gcc/config/m68k/sync.md index 5d5002a..6c840f5 100644 --- a/gcc/config/m68k/sync.md +++ b/gcc/config/m68k/sync.md @@ -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; }) -- cgit v1.1