ppc: handle invalid CR bits with more than 8 zeros in decodeCRBitMOperand(). bug reported by @felixgr
This commit is contained in:
parent
3dcad960f6
commit
d49ec461ab
|
@ -316,6 +316,8 @@ static DecodeStatus decodeCRBitMOperand(MCInst *Inst, uint64_t Imm,
|
|||
|
||||
unsigned Zeros = CountTrailingZeros_64(Imm);
|
||||
// assert(Zeros < 8 && "Invalid CR bit value");
|
||||
if (Zeros >=8)
|
||||
return MCDisassembler_Fail;
|
||||
|
||||
MCOperand_CreateReg0(Inst, CRRegs[7 - Zeros]);
|
||||
return MCDisassembler_Success;
|
||||
|
|
Loading…
Reference in New Issue