re PR target/52481 (m68k-*: internal compiler error: in extract_insn, at recog.c...
authorRichard Henderson <rth@redhat.com>
Mon, 5 Mar 2012 18:37:19 +0000 (10:37 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 5 Mar 2012 18:37:19 +0000 (10:37 -0800)
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
gcc/config/m68k/sync.md

index f101f7cf1e91da90a19e600d81dc756fcf263180..911737a00f2c377e9a026c75c52c43258daa2de9 100644 (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.
index 5d5002a9c812fcabf041467e0597755ff8331980..6c840f51b60e478bf297f4565920efc54d5c3d72 100644 (file)
    (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;
 })