aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-08-16 23:45:44 +0000
committerOwen Anderson <resistor@mac.com>2011-08-16 23:45:44 +0000
commit16280308ac6f20d9da06eafcc19e4a6777f49750 (patch)
treedd4f81cadeb2ab43ef0ecb0417f43678369bea8f /lib/Target/ARM/Disassembler/ARMDisassembler.cpp
parentbfd5040ddc0d4413d51518f7d4f464c91eb6336e (diff)
Separate out Thumb1 instructions that need an S bit operand from those that do not, for the purposes of decoding them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
-rw-r--r--lib/Target/ARM/Disassembler/ARMDisassembler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
index 28dd986d65..cb7a45a257 100644
--- a/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
+++ b/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
@@ -417,6 +417,14 @@ bool ThumbDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
bool result = decodeThumbInstruction16(MI, insn16, Address, this);
if (result) {
Size = 2;
+ AddThumbPredicate(MI);
+ return true;
+ }
+
+ MI.clear();
+ result = decodeThumbSBitInstruction16(MI, insn16, Address, this);
+ if (result) {
+ Size = 2;
bool InITBlock = !ITBlock.empty();
AddThumbPredicate(MI);
AddThumb1SBit(MI, InITBlock);