[PATCH] D116088: [compiler-rt] Implement ARM atomic operations for architectures without SMP support
Pavel Kosov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 27 00:18:56 PDT 2022
kpdev42 updated this revision to Diff 432478.
kpdev42 edited the summary of this revision.
kpdev42 added a comment.
Well, after some investigation it turned out that:
1. ARMv5 has DMB instruction in the form of mcr p15, #0, <Rd>, c7, c10, #5
2. There is SWP instruction (deprecated on ARMv6), which does atomic exchange of 32-bit values
I've reimplemented sync ops using these primitves, PTAL
Theoretically this should work on ARMv6 and higher, though I didn't check this
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116088/new/
https://reviews.llvm.org/D116088
Files:
compiler-rt/cmake/Modules/CompilerRTUtils.cmake
compiler-rt/cmake/config-ix.cmake
compiler-rt/lib/builtins/CMakeLists.txt
compiler-rt/lib/builtins/arm/sync-ops.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116088.432478.patch
Type: text/x-patch
Size: 5654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220527/2a3adb83/attachment.bin>
More information about the cfe-commits
mailing list