forked from OSchip/llvm-project
Fix signed integer overflow in PPCInstPrinter.
This bug was reported by UBSan. llvm-svn: 216917
This commit is contained in:
parent
14f7301392
commit
9ca4870b49
|
@ -268,7 +268,7 @@ void PPCInstPrinter::printAbsBranchOperand(const MCInst *MI, unsigned OpNo,
|
|||
if (!MI->getOperand(OpNo).isImm())
|
||||
return printOperand(MI, OpNo, O);
|
||||
|
||||
O << (int)MI->getOperand(OpNo).getImm()*4;
|
||||
O << SignExtend32<32>((unsigned)MI->getOperand(OpNo).getImm() << 2);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue