From 6345e6a88257dc9f6de58618f6def91605bc9edf Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Thu, 24 Mar 2011 23:21:14 +0000 Subject: [PATCH] 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 --- test/MC/Disassembler/ARM/thumb-tests.txt | 3 +++ utils/TableGen/ARMDecoderEmitter.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/test/MC/Disassembler/ARM/thumb-tests.txt b/test/MC/Disassembler/ARM/thumb-tests.txt index 6a010644e1b..895769c3dea 100644 --- a/test/MC/Disassembler/ARM/thumb-tests.txt +++ b/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/utils/TableGen/ARMDecoderEmitter.cpp b/utils/TableGen/ARMDecoderEmitter.cpp index b174fa961ad..728e6698159 100644 --- a/utils/TableGen/ARMDecoderEmitter.cpp +++ b/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;