mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
arm64: Avoid overflow in imm math.
This commit is contained in:
parent
bbde0919d8
commit
9b94266c4a
@ -682,6 +682,11 @@ void Arm64RegCache::SetImm(MIPSGPReg r, u64 immVal) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (r != MIPS_REG_LO) {
|
||||
// All regs on the PSP are 32 bit, but LO we treat as HI:LO so is 64 full bits.
|
||||
immVal = immVal & 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
if (mr[r].isStatic) {
|
||||
mr[r].loc = ML_IMM;
|
||||
mr[r].imm = immVal;
|
||||
|
Loading…
Reference in New Issue
Block a user