about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/arm64/dynarec_arm64_helper.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_helper.c b/src/dynarec/arm64/dynarec_arm64_helper.c
index 42f09b21..084689ec 100644
--- a/src/dynarec/arm64/dynarec_arm64_helper.c
+++ b/src/dynarec/arm64/dynarec_arm64_helper.c
@@ -2269,16 +2269,16 @@ static void fpuCacheTransform(dynarec_arm_t* dyn, int ninst, int s1, int s2, int
     }
     // ymm0
     s3_top = 1;
-    if(dyn->ymm_zero && dyn->insts[i2].purge_ymm) {
+    uint16_t to_purge = dyn->ymm_zero&~dyn->insts[i2].ymm0_in;
+    if(dyn->ymm_zero && (dyn->insts[i2].purge_ymm|to_purge)) {
         for(int i=0; i<16; ++i)
-            if(dyn->insts[i2].purge_ymm&(1<<i))
-                if(is_avx_zero(dyn, ninst, i)) {
-                    if(s3_top) {
-                        ADDx_U12(s3, xEmu,offsetof(x64emu_t, ymm[0]));
-                        s3_top = 0;
-                    }
-                    STPx_S7_offset(xZR, xZR, s3, i*16);
+            if(is_avx_zero(dyn, ninst, i) && (dyn->insts[i2].purge_ymm|to_purge)&(1<<i)) {
+                if(s3_top) {
+                    ADDx_U12(s3, xEmu,offsetof(x64emu_t, ymm[0]));
+                    s3_top = 0;
                 }
+                STPx_S7_offset(xZR, xZR, s3, i*16);
+            }
     }
     if(stack_cnt != cache_i2.stack) {
         MESSAGE(LOG_DUMP, "\t    - adjust stack count %d -> %d -\n", stack_cnt, cache_i2.stack);