about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-06-25 18:59:32 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-06-25 18:59:32 +0200
commitf83b192d701e5104de8b81b76cef44c1afa7c25b (patch)
tree1ce37a0d778ecb4c637639324e0412048370dd24 /src
parent910420af0780fa468a58ba42c2ee4f030697a607 (diff)
downloadbox64-f83b192d701e5104de8b81b76cef44c1afa7c25b.tar.gz
box64-f83b192d701e5104de8b81b76cef44c1afa7c25b.zip
[ARM64_DYNAREC] Fixed issue with the newly introduced I64 optim for x87 regs (fixes sound issue of #465)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/dynarec/arm64/dynarec_arm64_functions.c5
-rwxr-xr-xsrc/dynarec/arm64/dynarec_arm64_helper.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_functions.c b/src/dynarec/arm64/dynarec_arm64_functions.c
index d2963b55..6944b785 100755
--- a/src/dynarec/arm64/dynarec_arm64_functions.c
+++ b/src/dynarec/arm64/dynarec_arm64_functions.c
@@ -300,9 +300,10 @@ int neoncache_combine_st(dynarec_arm_t* dyn, int ninst, int a, int b)
     if( neoncache_get_current_st(dyn, ninst, a)==NEON_CACHE_ST_F
      && neoncache_get_current_st(dyn, ninst, b)==NEON_CACHE_ST_F )
         return NEON_CACHE_ST_F;
-    if( neoncache_get_current_st(dyn, ninst, a)==NEON_CACHE_ST_I64
+    // don't combine i64, it's only for load/store
+    /*if( neoncache_get_current_st(dyn, ninst, a)==NEON_CACHE_ST_I64
      && neoncache_get_current_st(dyn, ninst, b)==NEON_CACHE_ST_I64 )
-        return NEON_CACHE_ST_I64;
+        return NEON_CACHE_ST_I64;*/
     return NEON_CACHE_ST_D;
 }
 
diff --git a/src/dynarec/arm64/dynarec_arm64_helper.c b/src/dynarec/arm64/dynarec_arm64_helper.c
index 153f82a4..34b2744d 100755
--- a/src/dynarec/arm64/dynarec_arm64_helper.c
+++ b/src/dynarec/arm64/dynarec_arm64_helper.c
@@ -1135,6 +1135,8 @@ int x87_get_current_cache(dynarec_arm_t* dyn, int ninst, int st, int t)
             #if STEP == 1
             if(t==NEON_CACHE_ST_D && (dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_F || dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_I64))
                 neoncache_promote_double(dyn, ninst, st);
+            else if(t==NEON_CACHE_ST_F && (dyn->n.neoncache[dyn->n.x87reg[i]].t==NEON_CACHE_ST_I64))
+                neoncache_promote_double(dyn, ninst, st);
             #endif
             return i;
         }