Simplifies the code and fixes the build on SPARC.
See discussion in: http://lists.llvm.org/pipermail/llvm-dev/2020-October/145937.html
Paths
| Differential D89940
[sanitizer] Use __atomic_load/store() built-ins for generic 32-bit targets ClosedPublic Authored by glaubitz on Oct 22 2020, 2:46 AM.
Details
Summary Simplifies the code and fixes the build on SPARC. See discussion in: http://lists.llvm.org/pipermail/llvm-dev/2020-October/145937.html
Diff Detail
Event TimelineHerald added subscribers: Restricted Project, jfb, fedor.sergeev, jyknight. · View Herald Transcript glaubitz marked 2 inline comments as done. Comment ActionsReplace tabs with spaces to fix indentation. Comment Actions I suggested this initially as a quick fix, not the final solution. Really if we want to fix this properly we should just always use __atomic_store with an appropriately-translated memory order, as is done in libcxx (this is really just reimplementing a subset of libcxx as a standalone library). Comment Actions This patch unbreaks the build on bi-arch systems which are not x86 or MIPS, so I think it's okay to pick up the change and rewrite the code in cleaner terms later. This revision is now accepted and ready to land.Oct 26 2020, 12:19 AM
Revision Contents
Diff 300496 compiler-rt/lib/sanitizer_common/sanitizer_atomic_clang_other.h
|
clang-tidy: error: unknown type name 'memory_order' [clang-diagnostic-error]
not useful