From 55552365e4a1e472f6b3f8b821b568039778290d Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Wed, 25 Dec 2024 02:06:55 +0800 Subject: [PATCH] [RV64_DYNAREC] Fixed a regression in #2187 --- src/dynarec/rv64/dynarec_rv64_helper.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dynarec/rv64/dynarec_rv64_helper.h b/src/dynarec/rv64/dynarec_rv64_helper.h index 2a5fc687a..24be91df1 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; \ }