about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-03-30 11:31:18 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-03-30 11:31:18 +0200
commit5ea2c245d63778d077b8234264f4451029dfb510 (patch)
tree32877a1e50b7bab79eca320d8d5298369827ed24 /src
parente7b71cba5fe8ef92cc50266ed380203b7b2ed4ef (diff)
downloadbox64-5ea2c245d63778d077b8234264f4451029dfb510.tar.gz
box64-5ea2c245d63778d077b8234264f4451029dfb510.zip
[LA64] Fixed la64_lock_cas_[h/b]_slow helper (rarely used)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/la64/dynarec_la64_functions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dynarec/la64/dynarec_la64_functions.c b/src/dynarec/la64/dynarec_la64_functions.c
index f0310ddc..6bc72584 100644
--- a/src/dynarec/la64/dynarec_la64_functions.c
+++ b/src/dynarec/la64/dynarec_la64_functions.c
@@ -468,14 +468,14 @@ int la64_lock_cas_b_slow(void* addr, uint8_t ref, uint8_t val)
 {
     uint32_t* aligned = (uint32_t*)(((uintptr_t)addr) & ~3);
     uint32_t tmp = *aligned;
-    return la64_lock_cas_d(aligned, ref, insert_byte(tmp, val, addr));
+    return la64_lock_cas_d(aligned, insert_byte(tmp, ref, addr), insert_byte(tmp, val, addr));
 }
 
 int la64_lock_cas_h_slow(void* addr, uint16_t ref, uint16_t val)
 {
     uint32_t* aligned = (uint32_t*)(((uintptr_t)addr) & ~3);
     uint32_t tmp = *aligned;
-    return la64_lock_cas_d(aligned, ref, insert_half(tmp, val, addr));
+    return la64_lock_cas_d(aligned, insert_half(tmp, ref, addr), insert_half(tmp, val, addr));
 }
 
 void print_opcode(dynarec_native_t* dyn, int ninst, uint32_t opcode)