[llvm-commits] [llvm] r137787 - in /llvm/trunk/lib/Target/ARM: ARMInstrFormats.td Disassembler/ARMDisassembler.cpp
Owen Anderson
resistor at mac.com
Tue Aug 16 16:45:44 PDT 2011
Author: resistor
Date: Tue Aug 16 18:45:44 2011
New Revision: 137787
URL: http://llvm.org/viewvc/llvm-project?rev=137787&view=rev
Log:
Separate out Thumb1 instructions that need an S bit operand from those that do not, for the purposes of decoding them.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=137787&r1=137786&r2=137787&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Tue Aug 16 18:45:44 2011
@@ -902,6 +902,7 @@
let Pattern = pattern;
let thumbArithFlagSetting = 1;
list<Predicate> Predicates = [IsThumb, IsThumb1Only];
+ let DecoderNamespace = "ThumbSBit";
}
class T1sI<dag oops, dag iops, InstrItinClass itin,
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=137787&r1=137786&r2=137787&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Tue Aug 16 18:45:44 2011
@@ -417,6 +417,14 @@
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);
More information about the llvm-commits
mailing list