diff options
Diffstat (limited to 'src/emu')
| -rwxr-xr-x | src/emu/x64emu.c | 11 | ||||
| -rwxr-xr-x | src/emu/x64run_private.h | 7 |
2 files changed, 7 insertions, 11 deletions
diff --git a/src/emu/x64emu.c b/src/emu/x64emu.c index d48b4912..620bea97 100755 --- a/src/emu/x64emu.c +++ b/src/emu/x64emu.c @@ -58,17 +58,6 @@ uint32_t* GetParityTab() return x86emu_parity_tab; } -void PushExit(x64emu_t* emu) -{ - uintptr_t endMarker = AddCheckBridge(my_context->system, NULL, NULL, 0, "ExitEmulation"); - Push(emu, endMarker); -} - -void* GetExit() -{ - return (void*)AddCheckBridge(my_context->system, NULL, NULL, 0, "ExitEmulation"); -} - static void internalX64Setup(x64emu_t* emu, box64context_t *context, uintptr_t start, uintptr_t stack, int stacksize, int ownstack) { emu->context = context; diff --git a/src/emu/x64run_private.h b/src/emu/x64run_private.h index 68db0670..23750022 100755 --- a/src/emu/x64run_private.h +++ b/src/emu/x64run_private.h @@ -4,6 +4,7 @@ #include <stdint.h> #include "regs.h" #include "x64emu_private.h" +#include "box64context.h" typedef struct x64emu_s x64emu_t; typedef union rex_s { @@ -37,6 +38,12 @@ static inline void Push(x64emu_t *emu, uint64_t v) } #endif +static inline void PushExit(x64emu_t* emu) +{ + R_RSP -= 8; + *((uint64_t*)R_RSP) = my_context->exit_bridge; +} + // the op code definition can be found here: http://ref.x86asm.net/geek32.html reg64_t* GetECommon(x64emu_t* emu, uintptr_t* addr, rex_t rex, uint8_t m, uint8_t delta); |