[llvm-commits] [llvm] r101788 - /llvm/trunk/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
Johnny Chen
johnny.chen at apple.com
Mon Apr 19 10:16:40 PDT 2010
Author: johnny
Date: Mon Apr 19 12:16:40 2010
New Revision: 101788
URL: http://llvm.org/viewvc/llvm-project?rev=101788&view=rev
Log:
Better error-handling for DisassembleThumb2DPSoReg() where the 3-reg operand
instructions should have Rd (Inst{11-8}) != 0b1111.
Ref: A6.3 32-bit Thumb instruction encoding
A6.3.11 Data-processing (shifted register)
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h?rev=101788&r1=101787&r2=101788&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h Mon Apr 19 12:16:40 2010
@@ -1340,12 +1340,15 @@
if ((Idx = TID.getOperandConstraint(OpIdx, TOI::TIED_TO)) != -1) {
// Process tied_to operand constraint.
MI.addOperand(MI.getOperand(Idx));
- } else {
- assert(!NoDstReg && "Internal error");
+ ++OpIdx;
+ } else if (!NoDstReg) {
MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID,
decodeRn(insn))));
+ ++OpIdx;
+ } else {
+ DEBUG(errs() << "Thumb encoding error: d==15 for three-reg operands.\n");
+ return false;
}
- ++OpIdx;
}
MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID,
More information about the llvm-commits
mailing list