Skip to content

Commit 433dd3f

Browse files
committed
compiler-builtins: Change gating for outline atomic symbols
Build the symbols whenever outline atomics is in our baseline, rather than only on Linux. Since this is no longer Linux-specific, also rename the module.
1 parent 9cd272d commit 433dd3f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library/compiler-builtins/compiler-builtins/src/aarch64_linux.rs renamed to library/compiler-builtins/compiler-builtins/src/aarch64_outline_atomics.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ macro_rules! compare_and_swap {
196196
"cbnz w17, 0b",
197197
"1:",
198198
"ret",
199-
have_lse = sym crate::aarch64_linux::HAVE_LSE_ATOMICS,
199+
have_lse = sym crate::aarch64_outline_atomics::HAVE_LSE_ATOMICS,
200200
}
201201
}
202202
}
@@ -228,7 +228,7 @@ macro_rules! compare_and_swap_i128 {
228228
"cbnz w15, 0b",
229229
"1:",
230230
"ret",
231-
have_lse = sym crate::aarch64_linux::HAVE_LSE_ATOMICS,
231+
have_lse = sym crate::aarch64_outline_atomics::HAVE_LSE_ATOMICS,
232232
}
233233
}
234234
}
@@ -256,7 +256,7 @@ macro_rules! swap {
256256
concat!(stxr!($ordering, $bytes), " w17, ", reg!($bytes, 16), ", [x1]"),
257257
"cbnz w17, 0b",
258258
"ret",
259-
have_lse = sym crate::aarch64_linux::HAVE_LSE_ATOMICS,
259+
have_lse = sym crate::aarch64_outline_atomics::HAVE_LSE_ATOMICS,
260260
}
261261
}
262262
}
@@ -286,7 +286,7 @@ macro_rules! fetch_op {
286286
concat!(stxr!($ordering, $bytes), " w15, ", reg!($bytes, 17), ", [x1]"),
287287
"cbnz w15, 0b",
288288
"ret",
289-
have_lse = sym crate::aarch64_linux::HAVE_LSE_ATOMICS,
289+
have_lse = sym crate::aarch64_outline_atomics::HAVE_LSE_ATOMICS,
290290
}
291291
}
292292
}

library/compiler-builtins/compiler-builtins/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ pub mod arm;
5656
#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec"))]
5757
pub mod aarch64;
5858

59-
#[cfg(all(target_arch = "aarch64", target_os = "linux"))]
60-
pub mod aarch64_linux;
59+
#[cfg(all(target_arch = "aarch64", target_feature = "outline-atomics"))]
60+
pub mod aarch64_outline_atomics;
6161

6262
#[cfg(all(
6363
kernel_user_helpers,

0 commit comments

Comments
 (0)