Better error-handling for DisassembleThumb2DPModImm() with 2-reg operands where

d==15 is considered illegal.  Return false instead of assert().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Johnny Chen 2010-04-20 01:01:57 +00:00
parent 6d972fd087
commit 3974ade503

View File

@ -1413,7 +1413,10 @@ static bool DisassembleThumb2DPModImm(MCInst &MI, unsigned Opcode,
++OpIdx;
if (TwoReg) {
assert(!NoDstReg && "Internal error");
if (NoDstReg) {
DEBUG(errs() << "Thumb encoding error: d==15 for DPModImm 2-reg instr.\n");
return false;
}
MI.addOperand(MCOperand::CreateReg(getRegisterEnum(B, ARM::GPRRegClassID,
decodeRn(insn))));
++OpIdx;