Skip to content

Commit

Permalink
Tie neon with fp-armv8.
Browse files Browse the repository at this point in the history
In rust-lang#91608 the fp-armv8 feature was removed as it's tied to the neon
feature. However disabling neon didn't actually disable the use of
floating point registers and instructions, for this `-fp-armv8` is
required.
  • Loading branch information
JamieCunliffe committed May 22, 2023
1 parent 48ec50a commit 4cca436
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions compiler/rustc_codegen_llvm/src/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ pub fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> SmallVec<[&'a str; 2]
("aarch64", "pmuv3") => smallvec!["perfmon"],
("aarch64", "paca") => smallvec!["pauth"],
("aarch64", "pacg") => smallvec!["pauth"],
// Rust ties fp and neon together. In LLVM neon implicitly enables fp,
// but we manually enable neon when a feature only implicitly enables fp
// Rust ties fp and neon together.
("aarch64", "neon") => smallvec!["neon", "fp-armv8"],
// In LLVM neon implicitly enables fp, but we manually enable
// neon when a feature only implicitly enables fp
("aarch64", "f32mm") => smallvec!["f32mm", "neon"],
("aarch64", "f64mm") => smallvec!["f64mm", "neon"],
("aarch64", "fhm") => smallvec!["fp16fml", "neon"],
Expand Down

0 comments on commit 4cca436

Please sign in to comment.