Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ jobs:
target: i686-unknown-linux-gnu
- rust: nightly
target: hexagon-unknown-linux-musl
- rust: nightly-2023-08-23 # The last nightly version that doesn't support MaybeUninit registers.
target: hexagon-unknown-linux-musl
- rust: '1.72' # inline asm for loongarch has been stabilized in Rust 1.72
target: loongarch64-unknown-linux-gnu
- rust: stable
Expand Down Expand Up @@ -163,6 +165,8 @@ jobs:
target: powerpc64le-unknown-linux-gnu
- rust: nightly
target: riscv32gc-unknown-linux-gnu
- rust: nightly-2023-08-23 # The last nightly version that doesn't support MaybeUninit registers.
target: riscv32gc-unknown-linux-gnu
- rust: '1.59'
target: riscv64gc-unknown-linux-gnu
- rust: stable
Expand Down Expand Up @@ -246,6 +250,12 @@ jobs:
RUSTFLAGS: ${{ env.RUSTFLAGS }} -C target-feature=+v8
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -C target-feature=+v8
if: matrix.target == 'armv7-unknown-linux-gnueabi'
# arm v6 with legacy cp15_barrier
- run: tools/test.sh -vv --tests $TARGET $BUILD_STD $RELEASE
env:
RUSTFLAGS: ${{ env.RUSTFLAGS }} --cfg atomic_maybe_uninit_use_cp15_barrier
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} --cfg atomic_maybe_uninit_use_cp15_barrier
if: matrix.target == 'arm-unknown-linux-gnueabi'
# arm v7 big endian
# armeb-unknown-linux-gnueabi is v8 by default, use custom target instead
- run: tools/test.sh -vv --tests --target armebv7-unknown-linux-gnueabi -Z build-std $RELEASE
Expand Down Expand Up @@ -292,6 +302,8 @@ jobs:
- '1.59'
- stable
- beta
- nightly-2023-08-23 # The last nightly version that doesn't support MaybeUninit registers.
- nightly-2023-08-24 # The oldest nightly version that supports MaybeUninit registers: https://github.com/rust-lang/rust/pull/114790
- nightly
runs-on: ubuntu-latest
timeout-minutes: 60
Expand Down
9 changes: 6 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ fn main() {
if !version.probe(61, 2022, 3, 7) {
println!("cargo:rustc-cfg=atomic_maybe_uninit_no_const_fn_trait_bound");
}
// https://github.com/rust-lang/rust/pull/114790 merged in nightly-2023-08-24
if !version.probe(74, 2023, 8, 23) {
println!("cargo:rustc-cfg=atomic_maybe_uninit_no_asm_maybe_uninit");
}

match target_arch {
"loongarch64" => {
Expand All @@ -70,8 +74,8 @@ fn main() {
_ => {}
}

let is_apple =
target_os == "macos" || target_os == "ios" || target_os == "tvos" || target_os == "watchos";
let is_macos = target_os == "macos";
let is_apple = is_macos || target_os == "ios" || target_os == "tvos" || target_os == "watchos";
match target_arch {
"x86_64" => {
// x86_64 Apple targets always support CMPXCHG16B:
Expand Down Expand Up @@ -126,7 +130,6 @@ fn main() {
"aarch64" => {
// aarch64 macOS always supports FEAT_LSE/FEAT_LSE2/FEAT_LRCPC because it is armv8.5-a:
// https://github.com/llvm/llvm-project/blob/llvmorg-17.0.0-rc2/llvm/include/llvm/TargetParser/AArch64TargetParser.h#L494
let is_macos = target_os == "macos";
let mut has_lse = is_macos;
let mut has_rcpc = is_macos;
// FEAT_LSE2 doesn't imply FEAT_LSE. FEAT_LSE128 implies FEAT_LSE but not FEAT_LSE2. FEAT_LRCPC3 implies FEAT_LRCPC.
Expand Down
415 changes: 160 additions & 255 deletions src/arch/aarch64.rs

Large diffs are not rendered by default.

Loading