Skip to content

Commit

Permalink
Rollup merge of #100622 - taiki-e:aarch64-atomic-128, r=Amanieu
Browse files Browse the repository at this point in the history
Support 128-bit atomics on all aarch64 targets

Some aarch64 targets currently set `max_atomic_width` to 64, but aarch64 always supports 128-bit atomics.

r? ``@Amanieu``
  • Loading branch information
TaKO8Ki authored Aug 16, 2022
2 parents 64fc068 + 5bb04f3 commit 7e100c1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::spec::Target;

pub fn target() -> Target {
let mut base = super::windows_gnullvm_base::opts();
base.max_atomic_width = Some(64);
base.max_atomic_width = Some(128);
base.features = "+neon,+fp-armv8".into();
base.linker = Some("aarch64-w64-mingw32-clang".into());

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::spec::Target;

pub fn target() -> Target {
let mut base = super::windows_msvc_base::opts();
base.max_atomic_width = Some(64);
base.max_atomic_width = Some(128);
base.features = "+neon,+fp-armv8".into();

Target {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/aarch64_unknown_uefi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::spec::{LinkerFlavor, Target};
pub fn target() -> Target {
let mut base = uefi_msvc_base::opts();

base.max_atomic_width = Some(64);
base.max_atomic_width = Some(128);
base.add_pre_link_args(LinkerFlavor::Msvc, &["/machine:arm64"]);

Target {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::spec::Target;

pub fn target() -> Target {
let mut base = super::windows_uwp_msvc_base::opts();
base.max_atomic_width = Some(64);
base.max_atomic_width = Some(128);

Target {
llvm_target: "aarch64-pc-windows-msvc".into(),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub fn target() -> Target {
arch: "aarch64".into(),
options: TargetOptions {
features: "+neon,+fp-armv8,+apple-a7".into(),
max_atomic_width: Some(64),
max_atomic_width: Some(128),
forces_embed_bitcode: true,
// These arguments are not actually invoked - they just have
// to look right to pass App Store validation.
Expand Down

0 comments on commit 7e100c1

Please sign in to comment.