[PATCH] D47589: [RISCV] Add codegen support for atomic load/stores with RV32A
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 31 14:21:04 PDT 2018
efriedma added a comment.
> Seems you're advocating that this patch (and the LangRef) follow the reality you'd like to have, not the one we actually have :-)
My description matches the way GNU libatomic works in practice, as far as I know. (compiler-rt's implementation is incomplete and broken in other ways anyway; see https://reviews.llvm.org/D47606.)
> So I'll re-iterate: is the alignment check a documented guarantee that __atomic_* functions must provide, in all of their implementations?
The specialized forms (`__atomic_load_8` etc.) assume natural alignment, but the forms which take a size argument check alignment. This is why `__atomic_is_lock_free` has a pointer argument. See https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary .
https://reviews.llvm.org/D47589
More information about the llvm-commits
mailing list