aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMInstrThumb.td
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-08-19 23:24:36 +0000
committerJim Grosbach <grosbach@apple.com>2011-08-19 23:24:36 +0000
commit0780b6303b99441fef04340b7a083006484f4743 (patch)
tree79ac2a32d79b3f721304fd949d8bae5c232b8af0 /lib/Target/ARM/ARMInstrThumb.td
parentcc29861901fdf9b60dfdb2d4d9f4670c0320db44 (diff)
downloadexternal_llvm-0780b6303b99441fef04340b7a083006484f4743.zip
external_llvm-0780b6303b99441fef04340b7a083006484f4743.tar.gz
external_llvm-0780b6303b99441fef04340b7a083006484f4743.tar.bz2
Thumb parsing and encoding support for NOP.
The irony is not lost that this is not a completely trivial patchset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMInstrThumb.td')
-rw-r--r--lib/Target/ARM/ARMInstrThumb.td8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMInstrThumb.td b/lib/Target/ARM/ARMInstrThumb.td
index 197afeb..a151c0d 100644
--- a/lib/Target/ARM/ARMInstrThumb.td
+++ b/lib/Target/ARM/ARMInstrThumb.td
@@ -237,7 +237,8 @@ class T1SystemEncoding<bits<8> opc>
}
def tNOP : T1pI<(outs), (ins), NoItinerary, "nop", "", []>,
- T1SystemEncoding<0x00>; // A8.6.110
+ T1SystemEncoding<0x00>, // A8.6.110
+ Requires<[IsThumb2]>;
def tYIELD : T1pI<(outs), (ins), NoItinerary, "yield", "", []>,
T1SystemEncoding<0x10>; // A8.6.410
@@ -1382,3 +1383,8 @@ let isBranch = 1, isTerminator = 1, isBarrier = 1, isIndirectBranch = 1 in {
2, IIC_Br, [(brind GPR:$Rm)],
(tMOVr PC, GPR:$Rm, pred:$p)>;
}
+
+
+// In Thumb1, "nop" is encoded as a "mov r8, r8". Technically, the bf00
+// encoding is available on ARMv6K, but we don't differentiate that finely.
+def : InstAlias<"nop", (tMOVr R8, R8, 14, 0)>,Requires<[IsThumb, IsThumb1Only]>;