diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-03-24 23:21:14 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-03-24 23:21:14 +0000 |
commit | 73193f24753eee5131fbb7477b1761eb8dcac546 (patch) | |
tree | eeb966b764e23ca650f79a2f9805b49d3dfa8cc7 | |
parent | 71536de75239da1b5f1bcbdff3b849c7d9db3380 (diff) | |
download | bcm5719-llvm-73193f24753eee5131fbb7477b1761eb8dcac546.tar.gz bcm5719-llvm-73193f24753eee5131fbb7477b1761eb8dcac546.zip |
The ARM disassembler was confused with the 16-bit tSTMIA instruction.
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.
llvm-svn: 128246
-rw-r--r-- | llvm/test/MC/Disassembler/ARM/thumb-tests.txt | 3 | ||||
-rw-r--r-- | llvm/utils/TableGen/ARMDecoderEmitter.cpp | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/MC/Disassembler/ARM/thumb-tests.txt b/llvm/test/MC/Disassembler/ARM/thumb-tests.txt index 6a010644e1b..895769c3dea 100644 --- a/llvm/test/MC/Disassembler/ARM/thumb-tests.txt +++ b/llvm/test/MC/Disassembler/ARM/thumb-tests.txt @@ -139,3 +139,6 @@ # CHECK: stmdb.w sp, {r0, r2, r3, r8, r11, lr} 0x0d 0xe9 0x0d 0x49 + +# CHECK: stmia r5!, {r0, r1, r2, r3, r4} +0x1f 0xc5 diff --git a/llvm/utils/TableGen/ARMDecoderEmitter.cpp b/llvm/utils/TableGen/ARMDecoderEmitter.cpp index b174fa961ad..728e6698159 100644 --- a/llvm/utils/TableGen/ARMDecoderEmitter.cpp +++ b/llvm/utils/TableGen/ARMDecoderEmitter.cpp @@ -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; |