Jit64: Fix the offsetAddedToAddress correction
The LEA that the signal handler is trying to undo the effects of is a 32-bit instruction, and the value in the register prior to the LEA is also 32-bit, so the signal handler should use a 32-bit write. (Actually, in the end this doesn't really matter, because the first instruction that reads this value after backpatching is also a 32-bit instruction...)
This commit is contained in:
parent
e65167f9cd
commit
78c53bfec8
|
@ -329,7 +329,7 @@ bool Jit64::BackPatch(SContext* ctx)
|
|||
if (info.offsetAddedToAddress)
|
||||
{
|
||||
u64* ptr = ContextRN(ctx, info.op_arg.GetSimpleReg());
|
||||
*ptr -= static_cast<u32>(info.offset);
|
||||
*ptr = static_cast<u32>(*ptr - info.offset);
|
||||
}
|
||||
|
||||
ctx->CTX_PC = reinterpret_cast<u64>(trampoline);
|
||||
|
|
Loading…
Reference in New Issue