Skip to content

Commit 1587237

Browse files
authored
Unrolled build for #144613
Rollup merge of #144613 - pantsman0:nintendo_switch_cpu_features, r=wesleywiser aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON). ~~While some NEON and crypto features may not be supported on the Nintendo Switch at boot (e.g. on the a53 cores) and this has not been tested, the features will _always_ be available if running as a sysmodule or homebrew application under Horizon/Atmosphere.~~ EDIT: the a53 cores are fused out, these features are always available. This has been tested with local tools personally, as well as building [emuiibo](https://github.com/XorTroll/emuiibo) as it uses both `sha` and `aes` primitives. This was tested using inline assembly in previous versions, and in current versions by using the `aes`, `ctr`, `hmac`, and `sha2` crates. r? `@jam1garner` This ended up being much delayed from our discussions about updating this. I tested a number of individual features such as the `aes` and `sha2` target-features directly to avoid a warning message with the `crypto` feature, but that appears to be caused by #96472 and is not actually an issue. There is also a decision to make here about explicitly enabling the `neon` feature. I am in favor of it to be explicit, but it is not necessary as it is already enabled by the `v8a` and `crypto` features. I will defer to your decision as it does not change the actual instructions available for codegen.
2 parents 6ba0ce4 + 05cd6e8 commit 1587237

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub(crate) fn target() -> Target {
1919
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
2020
arch: "aarch64".into(),
2121
options: TargetOptions {
22-
features: "+v8a".into(),
22+
features: "+v8a,+neon,+crypto,+crc".into(),
2323
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
2424
linker: Some("rust-lld".into()),
2525
link_script: Some(LINKER_SCRIPT.into()),

0 commit comments

Comments
 (0)