Add SWP (Swap) and SWPB (Swap Byte) for disassembly only.
authorJohnny Chen <johnny.chen@apple.com>
Fri, 12 Feb 2010 20:48:24 +0000 (20:48 +0000)
committerJohnny Chen <johnny.chen@apple.com>
Fri, 12 Feb 2010 20:48:24 +0000 (20:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96010 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrInfo.td

index 3ef197a74bffbe6ad319fdd4198c9c6ae00c3123..3e4070b4affe81c32c807c4cfe459389755d8b05 100644 (file)
@@ -1863,6 +1863,27 @@ def STREXD : AIstrex<0b01, (outs GPR:$success),
                     []>;
 }
 
+// SWP/SWPB are deprecated in V6/V7 and for disassembly only.
+let mayLoad = 1 in {
+def SWP : AI<(outs GPR:$dst), (ins GPR:$src, GPR:$ptr), LdStExFrm, NoItinerary,
+             "swp", "\t$dst, $src, [$ptr]",
+             [/* For disassembly only; pattern left blank */]> {
+  let Inst{27-23} = 0b00010;
+  let Inst{22} = 0; // B = 0
+  let Inst{21-20} = 0b00;
+  let Inst{7-4} = 0b1001;
+}
+
+def SWPB : AI<(outs GPR:$dst), (ins GPR:$src, GPR:$ptr), LdStExFrm, NoItinerary,
+             "swpb", "\t$dst, $src, [$ptr]",
+             [/* For disassembly only; pattern left blank */]> {
+  let Inst{27-23} = 0b00010;
+  let Inst{22} = 1; // B = 1
+  let Inst{21-20} = 0b00;
+  let Inst{7-4} = 0b1001;
+}
+}
+
 //===----------------------------------------------------------------------===//
 // TLS Instructions
 //