about summary refs log tree commit diff stats
path: root/src/dynarec/arm64_lock.S
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-22 17:54:43 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-22 17:54:43 +0100
commit35f8500acdcb84568579db604f47d5cfdd532012 (patch)
treede60a2794d2a4c190d3014e4e54503c0fd05e577 /src/dynarec/arm64_lock.S
parentcb0cceb9ae54ed5cd28d45b50625ae81ac030ab2 (diff)
downloadbox64-35f8500acdcb84568579db604f47d5cfdd532012.tar.gz
box64-35f8500acdcb84568579db604f47d5cfdd532012.zip
[DYNAREC] Switched all other lock mecnism to LDAXR/STLXR
Diffstat (limited to 'src/dynarec/arm64_lock.S')
-rwxr-xr-xsrc/dynarec/arm64_lock.S24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/dynarec/arm64_lock.S b/src/dynarec/arm64_lock.S
index 0eb4dff3..ed17ad54 100755
--- a/src/dynarec/arm64_lock.S
+++ b/src/dynarec/arm64_lock.S
@@ -19,55 +19,55 @@
 
 arm64_lock_read_b:
     // address is x0, return is x0
-    ldxrb   w0, [x0]
+    ldaxrb  w0, [x0]
     ret
 
 arm64_lock_write_b:
     // address is x0, value is x1, return is x0
     mov     x2, x0
-    stxrb   w0, w1, [x2]
+    stlxrb  w0, w1, [x2]
     ret
 
 arm64_lock_read_h:
     // address is x0, return is x0
-    ldxrh   w0, [x0]
+    ldaxrh  w0, [x0]
     ret
 
 arm64_lock_write_h:
     // address is x0, value is x1, return is x0
     mov     x2, x0
-    stxrh   w0, w1, [x2]
+    stlxrh  w0, w1, [x2]
     ret
 
 arm64_lock_read_d:
     // address is x0, return is x0
-    ldxr     w0, [x0]
+    ldaxr    w0, [x0]
     #ldx     w0,[x0]
     ret
 
 arm64_lock_write_d:
     // address is x0, value is w1, return is x0
     mov     x2, x0
-    stxr    w0, w1, [x2]
+    stlxr   w0, w1, [x2]
     #str     w1, [x2]
     mov     w0, 0
     ret
 
 arm64_lock_read_dd:
     // address is x0, return is x0
-    ldxr    x0, [x0]
+    ldaxr   x0, [x0]
     ret
 
 arm64_lock_write_dd:
     // address is x0, value is x1, return is x0
     mov     x2, x0
-    stxr    w0, x1, [x2]
+    stlxr   w0, x1, [x2]
     ret
 
 arm64_lock_xchg:
     // address is x0, value is x1, return old value in x0
-    ldxr    x2, [x0]
-    stxr    w3, x1, [x0]
+    ldaxr   x2, [x0]
+    stlxr   w3, x1, [x0]
     cmp     w3, #1
     beq     arm64_lock_xchg
     mov     x0, x2
@@ -75,11 +75,11 @@ arm64_lock_xchg:
 
 arm64_lock_storeifnull:
     // address is x0, value is x1, x1 store to x0 only if [x0] is 0. return new [x0] value (so x1 or old value)
-    ldxr    x2, [x0]
+    ldaxr   x2, [x0]
     cmp     x2, #0
     bne     arm64_lock_storeifnull_exit
     mov     x2, x1
-    stxr    w3, x2, [x0]
+    stlxr   w3, x2, [x0]
     cmp     w3, #1
     beq     arm64_lock_storeifnull
 arm64_lock_storeifnull_exit: