You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compiler-builtins: plumb LSE support for aarch64 on linux
Add dynamic support for aarch64 LSE atomic ops on linux targets
when optimized-compiler-builtins is not enabled.
A hook, __enable_rust_lse, is provided for the runtime to enable
them if available. A future patch will use this to enable them
if available.
The resulting asm should exactly match that of LLVM's compiler-rt
builtins, though the symbol naming for the support function and
global does not.
Copy file name to clipboardExpand all lines: library/compiler-builtins/compiler-builtins/src/aarch64_linux.rs
+74-9Lines changed: 74 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,6 @@
6
6
//! which is supported on the current CPU.
7
7
//! See <https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/making-the-most-of-the-arm-architecture-in-gcc-10#:~:text=out%20of%20line%20atomics> for more discussion.
8
8
//!
9
-
//! Currently we only support LL/SC, because LSE requires `getauxval` from libc in order to do runtime detection.
10
-
//! Use the `compiler-rt` intrinsics if you want LSE support.
11
-
//!
12
9
//! Ported from `aarch64/lse.S` in LLVM's compiler-rt.
13
10
//!
14
11
//! Generate functions for each of the following symbols:
@@ -24,7 +21,18 @@
24
21
//! We do something similar, but with macro arguments.
25
22
#![cfg_attr(feature = "c", allow(unused_macros))]// avoid putting the macros into a submodule
26
23
27
-
// We don't do runtime dispatch so we don't have to worry about the `__aarch64_have_lse_atomics` global ctor.
0 commit comments