Skip to content

aarch64: Guard RCPC3 intrinsics with target_has_atomic = "64"#2020

Open
Snehal-Reddy wants to merge 1 commit intorust-lang:mainfrom
Snehal-Reddy:main
Open

aarch64: Guard RCPC3 intrinsics with target_has_atomic = "64"#2020
Snehal-Reddy wants to merge 1 commit intorust-lang:mainfrom
Snehal-Reddy:main

Conversation

@Snehal-Reddy
Copy link

@Snehal-Reddy Snehal-Reddy commented Feb 3, 2026

The vldap1 and vstl1 RCPC3 intrinsics introduced in standard library unconditionally use AtomicI64. This breaks builds on target that do not support 64-bit atomics, such as aarch64-unknown-none with max-atomic-width set to 0.

This commit adds a #[cfg(target_has_atomic = "64")] guard to these intrinsics.

fixes #2019

Open to other suggestions as well!

@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2026

r? @sayantn

rustbot has assigned @sayantn.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

The `vldap1` and `vstl1` RCPC3 intrinsics introduced in standard library unconditionally use `AtomicI64`. This breaks builds on target that do not support 64-bit atomics, such as `aarch64-unknown-none` with `max-atomic-width` set to 0. This commit adds a `#[cfg(target_has_atomic = "64")]` guard to these intrinsics
Copy link
Contributor

@sayantn sayantn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, waiting to confirm that this is not a breaking change (just to be safe)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AArch64] stdarch unconditionally uses AtomicI64 in RCPC3 intrinsics, breaking targets with max-atomic-width = 0

3 participants