diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2012-09-02 13:08:33 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2012-09-02 13:08:33 +0200 |
commit | b418bc475dfc6862b00abaabc181c78a9f46ab28 (patch) | |
tree | 4fb03a64a51c367e3a9eece89bc83f8f0d928f66 /gcc | |
parent | eaf23fc3d56f6aa63e24fe2951fc5ec76b39cbc6 (diff) | |
download | gcc-b418bc475dfc6862b00abaabc181c78a9f46ab28.zip gcc-b418bc475dfc6862b00abaabc181c78a9f46ab28.tar.gz gcc-b418bc475dfc6862b00abaabc181c78a9f46ab28.tar.bz2 |
sync.md (atomic_compare_and_swap<dwi>_doubleword): Improve insn output code.
* config/i386/sync.md (atomic_compare_and_swap<dwi>_doubleword):
Improve insn output code.
From-SVN: r190861
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/i386/sync.md | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md index 50bedcf..44cb5d4 100644 --- a/gcc/config/i386/sync.md +++ b/gcc/config/i386/sync.md @@ -421,14 +421,13 @@ "TARGET_CMPXCHG<doublemodesuffix>B" { bool swap = REGNO (operands[5]) != BX_REG; + const char *xchg = "xchg{<imodesuffix>}\t%%<regprefix>bx, %5"; if (swap) - output_asm_insn ("xchg{<imodesuffix>}\t%%<regprefix>bx, %5", operands); - + output_asm_insn (xchg, operands); output_asm_insn ("lock{%;} %K7cmpxchg<doublemodesuffix>b\t%2", operands); - if (swap) - output_asm_insn ("xchg{<imodesuffix>}\t%%<regprefix>bx, %5", operands); + output_asm_insn (xchg, operands); return ""; }) |