Skip to content

Commit f906511

Browse files
Fold aarch64 feature +fp into +neon
Arm's FEAT_FP and Feat_AdvSIMD describe the same thing on AArch64: The Neon unit, which handles both floating point and SIMD instructions. Moreover, a configuration for AArch64 must include both or neither. Arm says "entirely proprietary" toolchains may omit floating point: https://developer.arm.com/documentation/102374/0101/Data-processing---floating-point In the Programmer's Guide for Armv8-A, Arm says AArch64 can have both FP and Neon or neither in custom implementations: https://developer.arm.com/documentation/den0024/a/AArch64-Floating-point-and-NEON In "Bare metal boot code for Armv8-A", enabling Neon and FP is just disabling the same trap flag: https://developer.arm.com/documentation/dai0527/a In an unlikely future where "Neon and FP" become unrelated, we can add "[+-]fp" as its own feature flag. Until then, we can simplify programming with Rust on AArch64 by folding both into "[+-]neon", which is valid as it supersets both. "[+-]neon" is retained for niche uses such as firmware, kernels, "I just hate floats", and so on.
1 parent 6cdb5d9 commit f906511

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

std/tests/run-time-detect.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ fn aarch64_linux() {
2929
println!("neon: {}", is_aarch64_feature_detected!("neon"));
3030
println!("asimd: {}", is_aarch64_feature_detected!("asimd"));
3131
println!("pmull: {}", is_aarch64_feature_detected!("pmull"));
32-
println!("fp: {}", is_aarch64_feature_detected!("fp"));
3332
println!("fp16: {}", is_aarch64_feature_detected!("fp16"));
3433
println!("sve: {}", is_aarch64_feature_detected!("sve"));
3534
println!("crc: {}", is_aarch64_feature_detected!("crc"));

0 commit comments

Comments
 (0)