mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #7936 from unknownbrackets/arm64-minor
arm64: Avoid overflow in imm math
This commit is contained in:
commit
9bf5d40084
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue