about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-06-22 11:40:11 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-06-22 11:40:11 +0200
commitcbb3126b28d2987fd1c2aeaf963a86ecb1ffcf4b (patch)
treefa9688028f017fb8d57885dce9ff4f31d0dfae1e /src
parenta3413ba96dc4ad4dc2c7c7780d399698285d5e23 (diff)
downloadbox64-cbb3126b28d2987fd1c2aeaf963a86ecb1ffcf4b.tar.gz
box64-cbb3126b28d2987fd1c2aeaf963a86ecb1ffcf4b.zip
[COSIM] Improved handling of AVX.66.0F38 3E/2F opcodes
Diffstat (limited to 'src')
-rw-r--r--src/emu/x64runavx660f38.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/emu/x64runavx660f38.c b/src/emu/x64runavx660f38.c
index 8bd9c051..8139240f 100644
--- a/src/emu/x64runavx660f38.c
+++ b/src/emu/x64runavx660f38.c
@@ -868,10 +868,15 @@ uintptr_t RunAVX_660F38(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
                 if(VX->ud[i]>>31) EX->ud[i] = GX->ud[i];
             if(vex.l) {
                 GETGY;
-                GETEY;
                 GETVY;
-                for(int i=0; i<4; ++i)
-                    if(VY->ud[i]>>31) EY->ud[i] = GY->ud[i];
+                #ifdef TEST_INTERPRETER
+                if(VX->u128)
+                #endif
+                {
+                    GETEY;
+                    for(int i=0; i<4; ++i)
+                        if(VY->ud[i]>>31) EY->ud[i] = GY->ud[i];
+                }
             }
             break;
         case 0x2F:  /*VMASKMOVPD Ex, Vx, Gx */
@@ -883,10 +888,15 @@ uintptr_t RunAVX_660F38(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
                 if(VX->q[i]>>63) EX->q[i] = GX->q[i];
             if(vex.l) {
                 GETGY;
-                GETEY;
                 GETVY;
-                for(int i=0; i<2; ++i)
-                    if(VY->q[i]>>63) EY->q[i] = GY->q[i];
+                #ifdef TEST_INTERPRETER
+                if(VX->u128)
+                #endif
+                {
+                    GETEY;
+                    for(int i=0; i<2; ++i)
+                        if(VY->q[i]>>63) EY->q[i] = GY->q[i];
+                }
             }
             break;
         case 0x30: /* VPMOVZXBW Gx, Ex */