Skip to content

Commit 51d6903

Browse files
Remove x86_64 features in target aarch64
1 parent c20b710 commit 51d6903

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

compiler/rustc_target/src/spec/aarch64_unknown_uefi.rs

-13
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,8 @@ use crate::spec::{CodeModel, LinkerFlavor, LldFlavor, Target};
1111
pub fn target() -> Target {
1212
let mut base = uefi_msvc_base::opts();
1313

14-
base.cpu = "aarch64".to_string();
1514
base.max_atomic_width = Some(64);
1615

17-
// We disable MMX and SSE for now, even though UEFI allows using them. Problem is, you have to
18-
// enable these CPU features explicitly before their first use, otherwise their instructions
19-
// will trigger an exception. Rust does not inject any code that enables AVX/MMX/SSE
20-
// instruction sets, so this must be done by the firmware. However, existing firmware is known
21-
// to leave these uninitialized, thus triggering exceptions if we make use of them. Which is
22-
// why we avoid them and instead use soft-floats. This is also what GRUB and friends did so
23-
// far.
24-
//
25-
// If you initialize FP units yourself, you can override these flags with custom linker
26-
// arguments, thus giving you access to full MMX/SSE acceleration.
27-
base.features = "-mmx,-sse,+soft-float".to_string();
28-
2916
let pre_link_args_msvc = vec!["/machine:arm64".to_string()];
3017

3118
base.pre_link_args.get_mut(&LinkerFlavor::Msvc).unwrap().extend(pre_link_args_msvc.clone());

0 commit comments

Comments
 (0)