about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2024-12-25 02:38:00 +0800
committerGitHub <noreply@github.com>2024-12-24 19:38:00 +0100
commita56a66a2270dbdfdb8ad4febb4b58bdc028eceb2 (patch)
treebd8df66c73fff976d360191fca194a57d1934bbc /src
parent1b262dac29a98b6aeef171a1172eb2bf7b7d3f39 (diff)
downloadbox64-a56a66a2270dbdfdb8ad4febb4b58bdc028eceb2.tar.gz
box64-a56a66a2270dbdfdb8ad4febb4b58bdc028eceb2.zip
[RV64_DYNAREC] Fixed a regression in #2187 (#2203)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_helper.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_helper.h b/src/dynarec/rv64/dynarec_rv64_helper.h
index 2a5fc687..24be91df 100644
--- a/src/dynarec/rv64/dynarec_rv64_helper.h
+++ b/src/dynarec/rv64/dynarec_rv64_helper.h
@@ -1888,7 +1888,10 @@ uintptr_t dynarec64_AVX_F3_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip,
         } else {                                                                     \
             TH_SRRI(dst, dst, 64 - 8 - dst##2);                                      \
         }                                                                            \
-        if (dyn->insts[ninst].nat_flags_fusion) NAT_FLAGS_OPS(dst, xZR);             \
+        if (dyn->insts[ninst].nat_flags_fusion) {                                    \
+            ANDI(s1, dst, 0xff);                                                     \
+            NAT_FLAGS_OPS(s1, xZR);                                                  \
+        }                                                                            \
         break;                                                                       \
     }
 
@@ -1908,7 +1911,10 @@ uintptr_t dynarec64_AVX_F3_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip,
         } else {                                                                     \
             TH_SRRI(dst, dst, 64 - 16);                                              \
         }                                                                            \
-        if (dyn->insts[ninst].nat_flags_fusion) NAT_FLAGS_OPS(s1, xZR);              \
+        if (dyn->insts[ninst].nat_flags_fusion) {                                    \
+            ZEXTH(s1, dst);                                                          \
+            NAT_FLAGS_OPS(s1, xZR);                                                  \
+        }                                                                            \
         break;                                                                       \
     }