mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-07 03:26:18 +02:00
Merge pull request #7936 from unknownbrackets/arm64-minor
arm64: Avoid overflow in imm math
This commit is contained in:
commit
9bf5d40084
1 file changed
+5
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user