about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2024-02-24 02:33:33 +0800
committerGitHub <noreply@github.com>2024-02-23 19:33:33 +0100
commitf02d5fc28f3766ef6155eedd8c1e2745417a4eb7 (patch)
treeeff954c33a0bd642ae6fbd38311fecd6a86d8c74 /src
parent422a982917fd4394c8a0e4966875be4469d54dbe (diff)
downloadbox64-f02d5fc28f3766ef6155eedd8c1e2745417a4eb7.tar.gz
box64-f02d5fc28f3766ef6155eedd8c1e2745417a4eb7.zip
[RV64_DYNAREC] Added missing 0F 38 00 PSHUFB opcode for test23 (#1282)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_0f.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_0f.c b/src/dynarec/rv64/dynarec_rv64_0f.c
index 27507db9..83ee96c9 100644
--- a/src/dynarec/rv64/dynarec_rv64_0f.c
+++ b/src/dynarec/rv64/dynarec_rv64_0f.c
@@ -389,6 +389,23 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
             // SSE3
             nextop = F8;
             switch (nextop) {
+                case 0x00:
+                    INST_NAME("PSHUFB Gm, Em");
+                    nextop = F8;
+                    GETGM();
+                    GETEM(x2, 0);
+                    LD(x4, gback, gdoffset);
+                    for (int i = 0; i < 8; ++i) {
+                        LB(x3, wback, fixedaddress + i);
+                        BGE(x3, xZR, 4 + 4 * 2);
+                        SB(xZR, gback, gdoffset + i);
+                        J(4 + 4 * 4);
+                        ANDI(x3, x3, 0x7);
+                        SLLI(x3, x3, 3);
+                        SRL(x3, x4, x3);
+                        SB(x3, gback, gdoffset + i);
+                    }
+                    break;
                 case 0xC8 ... 0xCD:
                     u8 = nextop;
                     switch (u8) {