xchg does not modify FLAGS.
authorDan Gohman <gohman@apple.com>
Wed, 6 Aug 2008 15:52:50 +0000 (15:52 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 6 Aug 2008 15:52:50 +0000 (15:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54411 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86Instr64bit.td
lib/Target/X86/X86InstrInfo.td

index 2e676f204b0c3fc1fda083355225b1b742dfc664..e7bba79bc1fba6a0420555a4dbd7058b37700dd3 100644 (file)
@@ -1125,7 +1125,8 @@ def LCMPXCHG64 : RI<0xB1, MRMDestMem, (outs), (ins i64mem:$ptr, GR64:$swap),
                [(X86cas addr:$ptr, GR64:$swap, 8)]>, TB, LOCK;
 }
 
-let Constraints = "$val = $dst", Defs = [EFLAGS] in {
+let Constraints = "$val = $dst" in {
+let Defs = [EFLAGS] in
 def LXADD64 : RI<0xC1, MRMSrcMem, (outs GR64:$dst), (ins i64mem:$ptr,GR64:$val),
                "lock xadd $val, $ptr", 
                [(set GR64:$dst, (atomic_load_add_64 addr:$ptr, GR64:$val))]>,
index a09a0431d5405565604181108cad4644e3b202f4..bb90f29b0cbb137c187a0ed8d292ebb6424248e3 100644 (file)
@@ -2582,7 +2582,7 @@ def EH_RETURN   : I<0xC3, RawFrm, (outs), (ins GR32:$addr),
 
 // Atomic swap. These are just normal xchg instructions. But since a memory
 // operand is referenced, the atomicity is ensured.
-let Constraints = "$val = $dst", Defs = [EFLAGS] in {
+let Constraints = "$val = $dst" in {
 def XCHG32rm : I<0x87, MRMSrcMem, (outs GR32:$dst), (ins i32mem:$ptr, GR32:$val),
                "xchg{l}\t{$val, $ptr|$ptr, $val}", 
                [(set GR32:$dst, (atomic_swap_32 addr:$ptr, GR32:$val))]>;