diff options
Diffstat (limited to 'src/dynarec/dynarec.c')
| -rw-r--r-- | src/dynarec/dynarec.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/dynarec/dynarec.c b/src/dynarec/dynarec.c index 1a389b94..915044eb 100644 --- a/src/dynarec/dynarec.c +++ b/src/dynarec/dynarec.c @@ -104,10 +104,15 @@ void DynaCall(x64emu_t* emu, uintptr_t addr) multiuint_t old_res_sav= emu->res_sav; deferred_flags_t old_df_sav= emu->df_sav; // uc_link - x64_ucontext_t* old_uc_link = emu->uc_link; + void* old_uc_link = emu->uc_link; emu->uc_link = NULL; - PushExit(emu); + #ifdef BOX32 + if(box64_is32bits) + PushExit_32(emu); + else + #endif + PushExit(emu); R_RIP = addr; emu->df = d_none; DynaRun(emu); @@ -137,6 +142,9 @@ void DynaCall(x64emu_t* emu, uintptr_t addr) } int my_setcontext(x64emu_t* emu, void* ucp); +#ifdef BOX32 +int my32_setcontext(x64emu_t* emu, void* ucp); +#endif void DynaRun(x64emu_t* emu) { // prepare setjump for signal handling @@ -206,7 +214,12 @@ void DynaRun(x64emu_t* emu) } if(emu->quit && emu->uc_link) { emu->quit = 0; - my_setcontext(emu, emu->uc_link); + #ifdef BOX32 + if(box64_is32bits) + my32_setcontext(emu, emu->uc_link); + else + #endif + my_setcontext(emu, emu->uc_link); } } #endif |