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:55 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-03-30 11:31:55 +0200
commitda0d0c1fc2972e3da9dfbf06d1a12f43a36c4c46 (patch)
treeb6dd22419cf229df27ed35ba0481501308812ebb /src
parent5ea2c245d63778d077b8234264f4451029dfb510 (diff)
downloadbox64-da0d0c1fc2972e3da9dfbf06d1a12f43a36c4c46.tar.gz
box64-da0d0c1fc2972e3da9dfbf06d1a12f43a36c4c46.zip
[RV64] Improved rv64_lock_cas[b/h] helpers
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_functions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_functions.c b/src/dynarec/rv64/dynarec_rv64_functions.c
index cf64352b..fcda5645 100644
--- a/src/dynarec/rv64/dynarec_rv64_functions.c
+++ b/src/dynarec/rv64/dynarec_rv64_functions.c
@@ -591,14 +591,14 @@ int rv64_lock_cas_b(void* addr, uint8_t ref, uint8_t val)
 {
     uint32_t* aligned = (uint32_t*)(((uintptr_t)addr) & ~3);
     uint32_t tmp = *aligned;
-    return rv64_lock_cas_d(aligned, tmp, insert_byte(tmp, val, addr));
+    return rv64_lock_cas_d(aligned, insert_byte(tmp, ref, addr), insert_byte(tmp, val, addr));
 }
 
 int rv64_lock_cas_h(void* addr, uint16_t ref, uint16_t val)
 {
     uint32_t* aligned = (uint32_t*)(((uintptr_t)addr) & ~3);
     uint32_t tmp = *aligned;
-    return rv64_lock_cas_d(aligned, tmp, insert_half(tmp, val, addr));
+    return rv64_lock_cas_d(aligned, insert_half(tmp, ref, addr), insert_half(tmp, val, addr));
 }