about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorphorcys <phorcys@126.com>2025-04-01 21:13:45 +0800
committerGitHub <noreply@github.com>2025-04-01 15:13:45 +0200
commit3230265646a48abef02a5c7873490e10ffc0afb5 (patch)
tree5c2160f600491bba3885131d6d733492f0987697 /src
parentc2a77fca277a96a49e45788601a4afc9570b1eb2 (diff)
downloadbox64-3230265646a48abef02a5c7873490e10ffc0afb5.tar.gz
box64-3230265646a48abef02a5c7873490e10ffc0afb5.zip
[LA64_DYNAREC] Fix f0.80.1 LOCK OR, LoongArch ANDI is zero-extended. (#2489)
Co-authored-by: phorcys <phorcys02@126.com>
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/la64/dynarec_la64_f0.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dynarec/la64/dynarec_la64_f0.c b/src/dynarec/la64/dynarec_la64_f0.c
index f35df09d..50b057c2 100644
--- a/src/dynarec/la64/dynarec_la64_f0.c
+++ b/src/dynarec/la64/dynarec_la64_f0.c
@@ -481,7 +481,8 @@ uintptr_t dynarec64_F0(dynarec_la64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                         u8 = F8;
                         ANDI(x2, wback, 3);
                         SLLI_D(x2, x2, 3);   // offset in bits
-                        ANDI(x3, wback, ~3); // aligned addr
+                        MV(x3, wback); // aligned addr
+                        BSTRINS_D(x3, xZR, 1, 0);
                         ADDI_D(x1, xZR, u8);
                         SLL_D(x1, x1, x2); // Ib << offset
                         AMOR_DB_W(x4, x1, x3);