diff options
Diffstat (limited to 'src/emu/x64run0f.c')
| -rw-r--r-- | src/emu/x64run0f.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/emu/x64run0f.c b/src/emu/x64run0f.c index 92de2706..046861da 100644 --- a/src/emu/x64run0f.c +++ b/src/emu/x64run0f.c @@ -5,10 +5,10 @@ #include <math.h> #include <fenv.h> #include <string.h> -#include <signal.h> #include <sys/types.h> #include <unistd.h> +#include "x64_signals.h" #include "os.h" #include "debug.h" #include "box64stack.h" @@ -96,19 +96,19 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) case 0xC8: /* MONITOR */ // this is a privilege opcode... #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0); #endif break; case 0xC9: /* MWAIT */ // this is a privilege opcode... #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0); #endif break; case 0xD0: if(R_RCX) { #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGILL, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGILL, (void*)R_RIP, 0); #endif } else { R_RAX = 0b111; // x87 & SSE & AVX for now @@ -185,7 +185,7 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) case 0x06: /* CLTS */ // this is a privilege opcode... #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0); #endif break; @@ -193,13 +193,13 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) case 0x09: /* WBINVD */ // this is a privilege opcode... #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0); #endif break; case 0x0B: /* UD2 */ #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGILL, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGILL, (void*)R_RIP, 0); #endif break; @@ -222,7 +222,7 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) break; case 0x0E: /* FEMMS */ #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGILL, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGILL, (void*)R_RIP, 0); #endif break; @@ -312,7 +312,7 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) case 0x23: /* MOV drX, REG */ // this is a privilege opcode... #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0); #endif break; @@ -413,7 +413,7 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) case 0x30: /* WRMSR */ // this is a privilege opcode... #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0); #endif break; case 0x31: /* RDTSC */ @@ -426,20 +426,20 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) case 0x32: /* RDMSR */ // priviledge instruction #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0xbad0); + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0xbad0); STEP; #endif break; case 0x34: /* SYSENTER */ #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0xbad0); + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0xbad0); STEP; #endif break; case 0x35: /* SYSEXIT */ #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGSEGV, (void*)R_RIP, 0xbad0); + EmitSignal(emu, X64_SIGSEGV, (void*)R_RIP, 0xbad0); STEP; #endif break; @@ -713,7 +713,7 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) case 0x3F: #ifndef TEST_INTERPRETER - EmitSignal(emu, SIGILL, (void*)R_RIP, 0); + EmitSignal(emu, X64_SIGILL, (void*)R_RIP, 0); #endif break; GOCOND(0x40 |