about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-23 17:41:35 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-23 17:41:35 +0100
commit1f819c49240c7a02eab372fd8d54ad4ac93ad7f7 (patch)
treeae6abebf706bb544601e525444a7f1cd16521dfe /src
parent1d209596a34caf4dc0a0d6ac51eb4031ef2cca93 (diff)
downloadbox64-1f819c49240c7a02eab372fd8d54ad4ac93ad7f7.tar.gz
box64-1f819c49240c7a02eab372fd8d54ad4ac93ad7f7.zip
[DYNAREC] Added 66 0F 60/61/62 opcodes
Diffstat (limited to 'src')
-rwxr-xr-xsrc/dynarec/dynarec_arm64_660f.c56
1 files changed, 39 insertions, 17 deletions
diff --git a/src/dynarec/dynarec_arm64_660f.c b/src/dynarec/dynarec_arm64_660f.c
index 84440b08..2221e2db 100755
--- a/src/dynarec/dynarec_arm64_660f.c
+++ b/src/dynarec/dynarec_arm64_660f.c
@@ -146,6 +146,24 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
             FCOMI(x1, x2);

             break;

 

+        #define GO(GETFLAGS, NO, YES, F)            \

+            READFLAGS(F);                           \

+            GETFLAGS;                               \

+            nextop=F8;                              \

+            GETGD;                                  \

+            if(MODREG) {                            \

+                ed = xRAX+(nextop&7)+(rex.b<<3);    \

+            } else {                                \

+                addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, 0xfff<<1, 1, rex, 0, 0); \

+                LDRH_U12(x1, ed, fixedaddress);     \

+                ed = x1;                            \

+            }                                       \

+            Bcond(NO, +8);                          \

+            BFIx(gd, ed, 0, 16);

+

+        GOCOND(0x40, "CMOV", "Gw, Ew");

+        #undef GO

+

         case 0x54:

             INST_NAME("ANDPD Gx, Ex");

             nextop = F8;

@@ -183,23 +201,27 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
             FCVTXN(v0, v1);

             break;

 

-        #define GO(GETFLAGS, NO, YES, F)            \

-            READFLAGS(F);                           \

-            GETFLAGS;                               \

-            nextop=F8;                              \

-            GETGD;                                  \

-            if(MODREG) {                            \

-                ed = xRAX+(nextop&7)+(rex.b<<3);    \

-            } else {                                \

-                addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, 0xfff<<1, 1, rex, 0, 0); \

-                LDRH_U12(x1, ed, fixedaddress);     \

-                ed = x1;                            \

-            }                                       \

-            Bcond(NO, +8);                          \

-            BFIx(gd, ed, 0, 16);

-

-        GOCOND(0x40, "CMOV", "Gw, Ew");

-        #undef GO

+        case 0x60:

+            INST_NAME("PUNPCKLBW Gx,Ex");

+            nextop = F8;

+            GETGX(v0);

+            GETEX(q0, 0);

+            VZIP1Q_8(v0, v0, q0);

+            break;

+        case 0x61:

+            INST_NAME("PUNPCKLWD Gx,Ex");

+            nextop = F8;

+            GETGX(v0);

+            GETEX(q0, 0);

+            VZIP1Q_16(v0, v0, q0);

+            break;

+        case 0x62:

+            INST_NAME("PUNPCKLDQ Gx,Ex");

+            nextop = F8;

+            GETGX(v0);

+            GETEX(q0, 0);

+            VZIP1Q_32(v0, v0, q0);

+            break;

 

         case 0x68:

             INST_NAME("PUNPCKHBW Gx,Ex");