about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <numbksco@gmail.com>2024-07-08 21:17:16 +0800
committerGitHub <noreply@github.com>2024-07-08 15:17:16 +0200
commit42ce1a3b61c291f08968eaa2ae35d90761ada4cc (patch)
tree9af3ccb99011f6c587775b3b1304fe4cb748782d /src
parenta7b912393c9bb865a18d8f95d42c14099ed10504 (diff)
downloadbox64-42ce1a3b61c291f08968eaa2ae35d90761ada4cc.tar.gz
box64-42ce1a3b61c291f08968eaa2ae35d90761ada4cc.zip
[LA64_DYNAREC] Added more opcodes (#1656)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/la64/dynarec_la64_660f.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/dynarec/la64/dynarec_la64_660f.c b/src/dynarec/la64/dynarec_la64_660f.c
index 70e1ae41..92004615 100644
--- a/src/dynarec/la64/dynarec_la64_660f.c
+++ b/src/dynarec/la64/dynarec_la64_660f.c
@@ -361,6 +361,32 @@ uintptr_t dynarec64_660F(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int
                     DEFAULT;
             }
             break;
+
+        #define GO(GETFLAGS, NO, YES, F, I)                                                          \
+            READFLAGS(F);                                                                            \
+            if (la64_lbt) {                                                                          \
+                X64_SETJ(x1, I);                                                                     \
+            } else {                                                                                 \
+                GETFLAGS;                                                                            \
+            }                                                                                        \
+            nextop = F8;                                                                             \
+            GETGD;                                                                                   \
+            if (MODREG) {                                                                            \
+                ed = TO_LA64((nextop & 7) + (rex.b << 3));                                           \
+            } else {                                                                                 \
+                addr = geted(dyn, addr, ninst, nextop, &ed, x2, x4, &fixedaddress, rex, NULL, 1, 0); \
+                LD_HU(x4, ed, fixedaddress);                                                         \
+                ed = x4;                                                                             \
+            }                                                                                        \
+            if (la64_lbt)                                                                            \
+                BEQZ(x1, 4 + 4);                                                                     \
+            else                                                                                     \
+                B##NO(x1, 4 + 4);                                                                    \
+            BSTRINS_D(gd, ed, 15, 0);
+
+        GOCOND(0x40, "CMOV", "Gd, Ed");
+        #undef GO
+
         case 0x54:
             INST_NAME("ANDPD Gx, Ex");
             nextop = F8;
@@ -906,6 +932,13 @@ uintptr_t dynarec64_660F(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int
             GETEX(v1, 0, 0);
             VMUH_HU(v0, v0, v1);
             break;
+        case 0xE5:
+            INST_NAME("PMULHW Gx,Ex");
+            nextop = F8;
+            GETGX(v0, 1);
+            GETEX(v1, 0, 0);
+            VMUH_H(v0, v0, v1);
+            break;
         case 0xE7:
             INST_NAME("MOVNTDQ Ex, Gx");
             nextop = F8;