about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-06-18 14:35:10 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-06-18 14:35:10 +0200
commit95d21e61e40ec1f1d3980c8527b62d41b0e7a302 (patch)
tree65075dfcefa2168869b3adffe23543874599fc72 /src
parented09b87953b4038f13807f77ccc437e818977fa6 (diff)
downloadbox64-95d21e61e40ec1f1d3980c8527b62d41b0e7a302.tar.gz
box64-95d21e61e40ec1f1d3980c8527b62d41b0e7a302.zip
Added 64 8F opcode
Diffstat (limited to 'src')
-rw-r--r--src/emu/x64run64.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/emu/x64run64.c b/src/emu/x64run64.c
index 942c551f..f3c9a20a 100644
--- a/src/emu/x64run64.c
+++ b/src/emu/x64run64.c
@@ -413,6 +413,27 @@ uintptr_t Run64(x64emu_t *emu, rex_t rex, int seg, uintptr_t addr)
                 GD->q[0] = tmp64u&0xffffffff;

             break;

 

+        case 0x8F:                      /* POP FS:Ed */

+            nextop = F8;

+            if(MODREG) {

+                emu->regs[(nextop&7)+(rex.b<<3)].q[0] = Pop(emu);

+            } else {

+                if(rex.is32bits) {

+                    tmp32u = Pop32(emu);  // this order allows handling POP [ESP] and variant

+                    GETED_OFFS(0, tlsdata);

+                    R_ESP -= 4; // to prevent issue with SEGFAULT

+                    ED->dword[0] = tmp32u;

+                    R_ESP += 4;

+                } else {

+                    tmp64u = Pop(emu);  // this order allows handling POP [ESP] and variant

+                    GETED_OFFS(0, tlsdata);

+                    R_RSP -= sizeof(void*); // to prevent issue with SEGFAULT

+                    ED->q[0] = tmp64u;

+                    R_RSP += sizeof(void*);

+                }

+            }

+            break;

+

         case 0xA1:                      /* MOV EAX,FS:Od */

             if(rex.is32bits) {

                 tmp64u = F32;