mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Improve context structure handling on non-Windows.
Instead of copying data into and out of a fake CONTEXT structure with only a few entries, use the platform specific structure directly with a typedef and macros. This is needed because fastmem writes need to be able to access any register from BackPatch. It adds a fair number of repetitive defines, but it's better than the alternative.
This commit is contained in:
@ -81,11 +81,9 @@ void sigsegv_handler(int signal, siginfo_t *info, void *raw_context)
|
||||
|
||||
u32 em_address = (u32)(bad_address - memspace_bottom);
|
||||
|
||||
CONTEXT fake_ctx;
|
||||
fake_ctx.reg_pc = ctx->arm_pc;
|
||||
const u8 *new_rip = jit->BackPatch(fault_instruction_ptr, em_address, &fake_ctx);
|
||||
const u8 *new_rip = jit->BackPatch(fault_instruction_ptr, em_address, ctx);
|
||||
if (new_rip) {
|
||||
ctx->arm_pc = fake_ctx.reg_pc;
|
||||
ctx->arm_pc = (u32) new_rip;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user