mirror of
https://github.com/pkivolowitz/asm_book.git
synced 2026-06-21 02:06:48 +08:00
15 lines
356 B
ArmAsm
15 lines
356 B
ArmAsm
.text
|
|
.p2align 2
|
|
|
|
#if defined(__APPLE__)
|
|
.global _LoadLinkedStoreConditional
|
|
_LoadLinkedStoreConditional:
|
|
#else
|
|
.global LoadLinkedStoreConditional
|
|
LoadLinkedStoreConditional:
|
|
#endif
|
|
1: ldaxr w1, [x0]
|
|
add w1, w1, 1
|
|
stlxr w2, w1, [x0]
|
|
cbnz w2, 1b
|
|
ret
|