mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 23:59:54 -06:00
JitArm64: Use 64-bit register for address in mtsrin
Fixes a regression from d34d3bd513
that, depending on the host memory
layout, could cause either a host crash or a guest crash when running
F-Zero GX.
This commit is contained in:
@ -209,8 +209,8 @@ void JitArm64::mtsrin(UGeckoInstruction inst)
|
|||||||
ARM64Reg addr = gpr.GetReg();
|
ARM64Reg addr = gpr.GetReg();
|
||||||
|
|
||||||
UBFM(index, RB, 28, 31);
|
UBFM(index, RB, 28, 31);
|
||||||
ADDI2R(addr, PPC_REG, PPCSTATE_OFF_SR(0), addr);
|
ADDI2R(EncodeRegTo64(addr), PPC_REG, PPCSTATE_OFF_SR(0), EncodeRegTo64(addr));
|
||||||
STR(RD, addr, ArithOption(EncodeRegTo64(index), true));
|
STR(RD, EncodeRegTo64(addr), ArithOption(EncodeRegTo64(index), true));
|
||||||
|
|
||||||
gpr.Unlock(index, addr);
|
gpr.Unlock(index, addr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user