diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-04-02 19:13:07 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-02 13:13:07 +0200 |
| commit | b5c792f5f0fea5f3a5b7a1dd1ef4ce1556de2d58 (patch) | |
| tree | 48dda15a93aec5a2c1bfcfb78a6b7d2bea9b7a8c /src/dynarec/dynarec_native_functions.c | |
| parent | b45d75f0c489b0111ad74dd3a2b18dd010eeb215 (diff) | |
| download | box64-b5c792f5f0fea5f3a5b7a1dd1ef4ce1556de2d58.tar.gz box64-b5c792f5f0fea5f3a5b7a1dd1ef4ce1556de2d58.zip | |
Moved some emit functions to os.h (#2494)
Diffstat (limited to 'src/dynarec/dynarec_native_functions.c')
| -rw-r--r-- | src/dynarec/dynarec_native_functions.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/dynarec/dynarec_native_functions.c b/src/dynarec/dynarec_native_functions.c index 51340ded..5656dcac 100644 --- a/src/dynarec/dynarec_native_functions.c +++ b/src/dynarec/dynarec_native_functions.c @@ -8,6 +8,7 @@ #include <sys/types.h> #include <unistd.h> +#include "os.h" #include "debug.h" #include "box64context.h" #include "box64cpu.h" @@ -185,42 +186,37 @@ void native_ud(x64emu_t* emu) { if(BOX64ENV(dynarec_test)) emu->test.test = 0; - emit_signal(emu, SIGILL, (void*)R_RIP, 0); + EmitSignal(emu, SIGILL, (void*)R_RIP, 0); } void native_br(x64emu_t* emu) { if(BOX64ENV(dynarec_test)) emu->test.test = 0; - emit_signal(emu, SIGSEGV, (void*)R_RIP, 0xb09d); + EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0xb09d); } void native_priv(x64emu_t* emu) { emu->test.test = 0; - emit_signal(emu, SIGSEGV, (void*)R_RIP, 0xbad0); + EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0xbad0); } void native_int(x64emu_t* emu, int num) { emu->test.test = 0; - emit_interruption(emu, num, (void*)R_RIP); -} - -void native_singlestep(x64emu_t* emu) -{ - emit_signal(emu, SIGTRAP, (void*)R_RIP, 1); + EmitInterruption(emu, num, (void*)R_RIP); } void native_int3(x64emu_t* emu) { - emit_signal(emu, SIGTRAP, NULL, 3); + EmitSignal(emu, SIGTRAP, NULL, 3); } void native_div0(x64emu_t* emu) { emu->test.test = 0; - emit_div0(emu, (void*)R_RIP, 1); + EmitDiv0(emu, (void*)R_RIP, 1); } void native_fsave(x64emu_t* emu, uint8_t* ed) |