mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Fix signed integer overflow in PPCInstPrinter.
This bug was reported by UBSan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216917 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7bda613297
commit
93accb4815
@ -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…
x
Reference in New Issue
Block a user