[clang] [clang][ARM] Fix build failure in <arm_acle.h> for __swp (PR #151354)
Simon Tatham via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 1 04:01:34 PDT 2025
================
@@ -55,11 +55,27 @@ __chkfeat(uint64_t __features) {
/* 7.5 Swap */
static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
__swp(uint32_t __x, volatile uint32_t *__p) {
----------------
statham-arm wrote:
Good point about the Linux libcall automatically picking up an improved implementation on newer Linuxes.
OK, I've redone it like that, so now it's `__atomic_exchange_n` everywhere except targets which have SWP but _neither_ of LDREX or the Linux libcall.
https://github.com/llvm/llvm-project/pull/151354
More information about the cfe-commits
mailing list