llvm-project/compiler-rt
Alex Richardson aa85c6f2a5 [compiler-rt] Fix atomic support functions on 32-bit architectures
The code currently uses __c11_atomic_is_lock_free() to detect whether an
atomic operation is natively supported. However, this can result in a
runtime function call to determine whether the given operation is lock-free
and clang generating a call to e.g. __atomic_load_8 since the branch is
not a constant zero. Since we are implementing those runtime functions, we
must avoid those calls. This patch replaces __c11_atomic_is_lock_free()
with __atomic_always_lock_free() which always results in a compile-time
constant value. This problem was found while compiling atomic.c for MIPS32
since the -Watomic-alignment warning was being triggered and objdump showed
an undefined reference to _atomic_is_lock_free.

In addition to fixing 32-bit platforms this also enables the 16-byte case
that was disabled in r153779 (185f2edd70).

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D86510
2020-09-21 10:21:11 +01:00
..
cmake [CMake] Use find_library for ncurses 2020-08-31 20:06:21 -07:00
docs
include [compiler-rt] [netbsd] Regenerate syscall hooks 2020-09-10 20:16:39 +02:00
lib [compiler-rt] Fix atomic support functions on 32-bit architectures 2020-09-21 10:21:11 +01:00
test [NFC][LSan] Add REQUIRES: linux 2020-09-18 17:24:07 -07:00
tools Add GWP-ASan fuzz target to compiler-rt/tools. 2019-08-27 18:28:07 +00:00
unittests [Scudo] [GWP-ASan] Add GWP-ASan to Scudo Standalone. 2019-12-13 09:09:41 -08:00
utils [compiler-rt] [netbsd] Update generate_netbsd_syscalls.awk 2020-09-10 20:16:17 +02:00
www [www] Change URLs to HTTPS. 2019-10-24 13:25:15 -07:00
.clang-tidy [NFC][compiler-rt] Refine .clang-tidy checks 2020-09-05 15:42:15 -07:00
.gitignore
CMakeLists.txt [CMake] Remove dead FindPythonInterp code 2020-09-08 15:23:23 +03:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================