about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-01-06 10:56:03 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-01-06 10:56:03 +0100
commited87cc1b1ead7129da93a09a6cbdbbf11d2c5e40 (patch)
tree3e7b7f265a9ea1ed6015ca0dad7b126f7f548d6b /src/emu
parent5d6ff69e8d26026a6f527a6a606b7eb15b5baa60 (diff)
downloadbox64-ed87cc1b1ead7129da93a09a6cbdbbf11d2c5e40.tar.gz
box64-ed87cc1b1ead7129da93a09a6cbdbbf11d2c5e40.zip
[INTERPRETER] Improved 0F 01 opcode ([ARM64_DYNAREC] too)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/x64run0f.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/emu/x64run0f.c b/src/emu/x64run0f.c
index 3470c443..2fc24b47 100644
--- a/src/emu/x64run0f.c
+++ b/src/emu/x64run0f.c
@@ -55,6 +55,27 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
 

     switch(opcode) {

 

+        case 0x01:                      /* XGETBV, SGDT, etc... */

+            // this is a privilege opcode...

+            nextop = F8;

+            GETED(0);

+            switch(nextop) {

+                case 0xD0:

+                #ifndef TEST_INTERPRETER

+                emit_signal(emu, SIGILL, (void*)R_RIP, 0);

+                #endif

+                break;

+                default:

+                    switch((nextop>>3)&7) {

+                        case 0: // SGDT

+                                // do nothing for now...

+                            break;

+                        default:

+                            return 0;

+                    }

+            }

+            break;

+

         case 0x05:                      /* SYSCALL */

             #ifndef TEST_INTERPRETER

             R_RIP = addr;