From b418bc475dfc6862b00abaabc181c78a9f46ab28 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sun, 2 Sep 2012 13:08:33 +0200 Subject: [PATCH] sync.md (atomic_compare_and_swap_doubleword): Improve insn output code. * config/i386/sync.md (atomic_compare_and_swap_doubleword): Improve insn output code. From-SVN: r190861 --- gcc/config/i386/sync.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md index 50bedcf0dff..44cb5d4c070 100644 --- a/gcc/config/i386/sync.md +++ b/gcc/config/i386/sync.md @@ -421,14 +421,13 @@ "TARGET_CMPXCHGB" { bool swap = REGNO (operands[5]) != BX_REG; + const char *xchg = "xchg{}\t%%bx, %5"; if (swap) - output_asm_insn ("xchg{}\t%%bx, %5", operands); - + output_asm_insn (xchg, operands); output_asm_insn ("lock{%;} %K7cmpxchgb\t%2", operands); - if (swap) - output_asm_insn ("xchg{}\t%%bx, %5", operands); + output_asm_insn (xchg, operands); return ""; }) -- 2.30.2