Thumb2 assembly parsing and encoding for REV.
authorJim Grosbach <grosbach@apple.com>
Thu, 15 Sep 2011 18:13:30 +0000 (18:13 +0000)
committerJim Grosbach <grosbach@apple.com>
Thu, 15 Sep 2011 18:13:30 +0000 (18:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139813 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrThumb2.td
test/MC/ARM/basic-thumb2-instructions.s

index fbc95ee96c68678e00670b0782753dca12f83bdc..9467f36f984b185af07ff08b3391b3e9e50ff10c 100644 (file)
@@ -3841,3 +3841,5 @@ def : t2InstAlias<"push${p} $regs", (t2STMDB_UPD SP, pred:$p, reglist:$regs)>;
 def : t2InstAlias<"pop${p}.w $regs", (t2LDMIA_UPD SP, pred:$p, reglist:$regs)>;
 def : t2InstAlias<"pop${p} $regs", (t2LDMIA_UPD SP, pred:$p, reglist:$regs)>;
 
+// Alias for REV without the ".w" optional width specifier.
+def : t2InstAlias<"rev${p} $Rd, $Rm", (t2REV rGPR:$Rd, rGPR:$Rm, pred:$p)>;
index 9facc0ca605409afe04dc2415bcda763705a933d..9723407bbb0287318bc6c9ad83d4812580ac85b2 100644 (file)
@@ -1425,6 +1425,22 @@ _func:
 @ CHECK: rbitne        r1, r2                  @ encoding: [0x92,0xfa,0xa2,0xf1]
 
 
+@------------------------------------------------------------------------------
+@ REV
+@------------------------------------------------------------------------------
+        rev.w r1, r2
+        rev r2, r8
+        itt ne
+        revne r1, r2
+        revne r1, r8
+
+@ CHECK: rev.w r1, r2                  @ encoding: [0x92,0xfa,0x82,0xf1]
+@ CHECK: rev.w r2, r8                  @ encoding: [0x98,0xfa,0x88,0xf2]
+@ CHECK: itt   ne                      @ encoding: [0x1c,0xbf]
+@ CHECK: revne r1, r2                  @ encoding: [0x11,0xba]
+@ CHECK: revne.w r1, r8                 @ encoding: [0x98,0xfa,0x88,0xf1]
+
+
 @------------------------------------------------------------------------------
 @ SUB (register)
 @------------------------------------------------------------------------------