The ARM disassembler was confused with the 16-bit tSTMIA instruction.
authorJohnny Chen <johnny.chen@apple.com>
Thu, 24 Mar 2011 23:21:14 +0000 (23:21 +0000)
committerJohnny Chen <johnny.chen@apple.com>
Thu, 24 Mar 2011 23:21:14 +0000 (23:21 +0000)
According to A8.6.189 STM/STMIA/STMEA (Encoding T1), there's only tSTMIA_UPD available.
Ignore tSTMIA for the decoder emitter and add a test case for that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128246 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/Disassembler/ARM/thumb-tests.txt
utils/TableGen/ARMDecoderEmitter.cpp

index 6a010644e1b554a154104939fdb674e1a7c26a56..895769c3dea55928faef7e4ea321817726d7181b 100644 (file)
 
 # CHECK:       stmdb.w sp, {r0, r2, r3, r8, r11, lr}
 0x0d 0xe9 0x0d 0x49
+
+# CHECK:       stmia   r5!, {r0, r1, r2, r3, r4}
+0x1f 0xc5
index b174fa961add9a3aa290191d19e244e308716e70..728e6698159c284f04b00a7d9e72a1528356db61 100644 (file)
@@ -1615,6 +1615,11 @@ ARMDEBackend::populateInstruction(const CodeGenInstruction &CGI,
     if (!thumbInstruction(Form))
       return false;
 
+    // A8.6.189 STM / STMIA / STMEA -- Encoding T1
+    // There's only STMIA_UPD for Thumb1.
+    if (Name == "tSTMIA")
+      return false;
+
     // On Darwin R9 is call-clobbered.  Ignore the non-Darwin counterparts.
     if (Name == "tBL" || Name == "tBLXi" || Name == "tBLXr")
       return false;