[PATCH] D45321: [atomics] Fix runtime calls for misaligned atomics
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 6 10:59:17 PDT 2018
efriedma added inline comments.
================
Comment at: compiler-rt/lib/builtins/atomic.c:158
/* FIXME: __uint128_t isn't available on 32 bit platforms.
LOCK_FREE_ACTION(__uint128_t);*/\
}\
----------------
t.p.northover wrote:
> efriedma wrote:
> > We also need to fix this FIXME, for correctness... if we have a 16-byte atomic store implementation, we need to use it.
> Any chance I could skip that for now?
>
> It's an order of magnitude harder than fixing the misalignment problems since LLVM already generates a mixture of libcalls and cmpxchg based on the CPU for x86, which forces this to be a runtime CPUID check.
>
>
>
>
Can you at least fix it for targets where 16-byte atomics are always lock-free, like aarch64? (Of course I don't expect you to implement the x86 cpuid bits.)
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D45321
More information about the llvm-commits
mailing list