about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-06 11:20:27 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-06 11:20:27 +0100
commit0999500a7a56e503e4ba9dbf80e10681cce07fe4 (patch)
tree825a89494786cfd556e33a99cafc4a964439389a /src
parent4c7bf4695bac46cb8a775eea9e01a16b1a468aa7 (diff)
downloadbox64-0999500a7a56e503e4ba9dbf80e10681cce07fe4.tar.gz
box64-0999500a7a56e503e4ba9dbf80e10681cce07fe4.zip
Added 66 REX 0F EF PXOR opcode
Diffstat (limited to 'src')
-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
4 files changed, 63 insertions, 2 deletions
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