about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xCMakeLists.txt1
-rw-r--r--src/emu/x64run66.c9
-rw-r--r--src/emu/x64run660f.c53
-rwxr-xr-xsrc/emu/x64run_private.h2
-rw-r--r--src/emu/x64runf20f.c1
5 files changed, 64 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d6fbe9b..b67967be 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,6 +111,7 @@ set(ELFLOADER_SRC
     "${BOX64_ROOT}/src/emu/x64run.c"
     "${BOX64_ROOT}/src/emu/x64run0f.c"
     "${BOX64_ROOT}/src/emu/x64run66.c"
+    "${BOX64_ROOT}/src/emu/x64run660f.c"
     "${BOX64_ROOT}/src/emu/x64rund9.c"
     "${BOX64_ROOT}/src/emu/x64rundb.c"
     "${BOX64_ROOT}/src/emu/x64runf0.c"
diff --git a/src/emu/x64run66.c b/src/emu/x64run66.c
index 83e9720d..9bfe8e7f 100644
--- a/src/emu/x64run66.c
+++ b/src/emu/x64run66.c
@@ -35,9 +35,18 @@ int Run66(x64emu_t *emu, rex_t rex)
     reg64_t *oped, *opgd;

 

     opcode = F8;

+    // REX prefix before the F0 are ignored

+    rex.rex = 0;

+    while(opcode>=0x40 && opcode<=0x4f) {

+        rex.rex = opcode;

+        opcode = F8;

+    }

 

     switch(opcode) {

 

+    case 0x0F:                              /* more opcdes */

+        return Run660F(emu, rex);

+

     case 0xC1:                              /* GRP2 Ew,Ib */

         nextop = F8;

         GETEW;

diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c
new file mode 100644
index 00000000..661382b9
--- /dev/null
+++ b/src/emu/x64run660f.c
@@ -0,0 +1,53 @@
+#define _GNU_SOURCE

+#include <stdint.h>

+#include <stdio.h>

+#include <stdlib.h>

+#include <math.h>

+#include <string.h>

+#include <signal.h>

+#include <sys/types.h>

+#include <unistd.h>

+

+#include "debug.h"

+#include "box64stack.h"

+#include "x64emu.h"

+#include "x64run.h"

+#include "x64emu_private.h"

+#include "x64run_private.h"

+#include "x64primop.h"

+#include "x64trace.h"

+#include "x87emu_private.h"

+#include "box64context.h"

+#include "bridge.h"

+//#include "signals.h"

+#ifdef DYNAREC

+#include "../dynarec/arm_lock_helper.h"

+#endif

+

+#include "modrm.h"

+

+int Run660F(x64emu_t *emu, rex_t rex)

+{

+    uint8_t opcode;

+    uint8_t nextop;

+    int32_t tmp32s;

+    reg64_t *oped, *opgd;

+    sse_regs_t *opex, *opgx;

+

+    opcode = F8;

+

+    switch(opcode) {

+

+    case 0xEF:  /* PXOR Gx,Ex */

+        nextop = F8;

+        GETEX;

+        GETGX;

+        GX->q[0] ^= EX->q[0];

+        GX->q[1] ^= EX->q[1];

+        break;

+

+    default:

+        return 1;

+    }

+    return 0;

+}
\ No newline at end of file
diff --git a/src/emu/x64run_private.h b/src/emu/x64run_private.h
index 8de7e90f..44e39598 100755
--- a/src/emu/x64run_private.h
+++ b/src/emu/x64run_private.h
@@ -228,13 +228,13 @@ void UpdateFlags(x64emu_t *emu);
 
 int Run0F(x64emu_t *emu, rex_t rex);
 int Run66(x64emu_t *emu, rex_t rex);
+int Run660F(x64emu_t *emu, rex_t rex);
 //int Run67(x64emu_t *emu, rex_t rex);
 int RunD9(x64emu_t *emu, rex_t rex);
 int RunDB(x64emu_t *emu, rex_t rex);
 int RunF0(x64emu_t *emu, rex_t rex);
 int RunF20F(x64emu_t *emu, rex_t rex);
 int RunF30F(x64emu_t *emu, rex_t rex);
-//void Run660F(x64emu_t *emu);
 //void Run66D9(x64emu_t *emu);    // x87
 //void Run6766(x64emu_t *emu);
 //void RunGS(x64emu_t *emu);
diff --git a/src/emu/x64runf20f.c b/src/emu/x64runf20f.c
index 4188e0fd..80728935 100644
--- a/src/emu/x64runf20f.c
+++ b/src/emu/x64runf20f.c
@@ -18,7 +18,6 @@
 #include "x64trace.h"

 #include "x87emu_private.h"

 #include "box64context.h"

-//#include "my_cpuid.h"

 #include "bridge.h"

 //#include "signals.h"

 #ifdef DYNAREC