diff options
author | Owen Anderson <resistor@mac.com> | 2011-08-16 23:45:44 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-08-16 23:45:44 +0000 |
commit | 16280308ac6f20d9da06eafcc19e4a6777f49750 (patch) | |
tree | dd4f81cadeb2ab43ef0ecb0417f43678369bea8f /lib/Target | |
parent | bfd5040ddc0d4413d51518f7d4f464c91eb6336e (diff) | |
download | external_llvm-16280308ac6f20d9da06eafcc19e4a6777f49750.tar.gz external_llvm-16280308ac6f20d9da06eafcc19e4a6777f49750.tar.bz2 external_llvm-16280308ac6f20d9da06eafcc19e4a6777f49750.zip |
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')
-rw-r--r-- | lib/Target/ARM/ARMInstrFormats.td | 1 | ||||
-rw-r--r-- | lib/Target/ARM/Disassembler/ARMDisassembler.cpp | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMInstrFormats.td b/lib/Target/ARM/ARMInstrFormats.td index fecc6bfdef..ef5834b0ac 100644 --- a/lib/Target/ARM/ARMInstrFormats.td +++ b/lib/Target/ARM/ARMInstrFormats.td @@ -902,6 +902,7 @@ class Thumb1sI<dag oops, dag iops, AddrMode am, int sz, let Pattern = pattern; let thumbArithFlagSetting = 1; list<Predicate> Predicates = [IsThumb, IsThumb1Only]; + let DecoderNamespace = "ThumbSBit"; } class T1sI<dag oops, dag iops, InstrItinClass itin, 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); |