]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sync.md (atomic_compare_and_swap<dwi>_doubleword): Improve insn output code.
authorUros Bizjak <uros@gcc.gnu.org>
Sun, 2 Sep 2012 11:08:33 +0000 (13:08 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 2 Sep 2012 11:08:33 +0000 (13:08 +0200)
* config/i386/sync.md (atomic_compare_and_swap<dwi>_doubleword):
Improve insn output code.

From-SVN: r190861

gcc/config/i386/sync.md

index 50bedcf0dff320027b88ecdb314354b1bf08bddf..44cb5d4c07065404267e5a741ca297cf87b93214 100644 (file)
   "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 "";
 })