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
This commit is contained in:
Owen Anderson 2011-08-16 23:45:44 +00:00
parent bfd5040ddc
commit 16280308ac
2 changed files with 9 additions and 0 deletions

View File

@ -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,

View File

@ -415,6 +415,14 @@ bool ThumbDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
uint16_t insn16 = (bytes[1] << 8) | bytes[0];
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();