diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-05 18:37:19 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-05 18:37:19 +0000 |
commit | ba884946167b0160a42104fff828f209236a7ee6 (patch) | |
tree | afdb118541a92c170df4f7a0558627858e5258f9 /gcc/config/m68k | |
parent | 631f95de66248a5340c702d6be89b9728f54ac63 (diff) | |
download | gcc-ba884946167b0160a42104fff828f209236a7ee6.tar.gz |
PR target/52481
* config/m68k/sync.md (atomic_test_and_set): Use expand_simple_unop
instead of calling negqi2 directly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184948 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68k')
-rw-r--r-- | gcc/config/m68k/sync.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/config/m68k/sync.md b/gcc/config/m68k/sync.md index 5d5002a9c81..6c840f51b60 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; }) |