Skip to content

Commit

Permalink
rustc_target: Add the fp16 target feature for AArch32
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkajetanp committed Feb 7, 2025
1 parent 5ff18d0 commit 53f9852
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_codegen_llvm/src/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
("aarch64", "fp16") => Some(LLVMFeature::new("fullfp16")),
// Filter out features that are not supported by the current LLVM version
("aarch64", "fpmr") if get_version().0 != 18 => None,
("arm", "fp16") => Some(LLVMFeature::new("fullfp16")),
// In LLVM 18, `unaligned-scalar-mem` was merged with `unaligned-vector-mem` into a single
// feature called `fast-unaligned-access`. In LLVM 19, it was split back out.
("riscv32" | "riscv64", "unaligned-scalar-mem") if get_version().0 == 18 => {
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_target/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const ARM_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
("dotprod", Unstable(sym::arm_target_feature), &["neon"]),
("dsp", Unstable(sym::arm_target_feature), &[]),
("fp-armv8", Unstable(sym::arm_target_feature), &["vfp4"]),
("fp16", Unstable(sym::arm_target_feature), &["neon"]),
("fpregs", Unstable(sym::arm_target_feature), &[]),
("i8mm", Unstable(sym::arm_target_feature), &["neon"]),
("mclass", Unstable(sym::arm_target_feature), &[]),
Expand Down

0 comments on commit 53f9852

Please sign in to comment.