Add the power8-crypto target feature

This commit is contained in:
Sayantan Chakraborty 2024-12-09 00:41:35 +05:30 committed by GitHub
parent f33a8c6426
commit 1220f393cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 0 deletions

View file

@ -230,6 +230,8 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
"aarch64"
} else if sess.target.arch == "sparc64" {
"sparc"
} else if sess.target.arch == "powerpc64" {
"powerpc"
} else {
&*sess.target.arch
};
@ -289,6 +291,7 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
// https://github.com/llvm/llvm-project/blob/llvmorg-18.1.0/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp#L26
("sparc", "v8plus") if get_version().0 == 19 => Some(LLVMFeature::new("v9")),
("sparc", "v8plus") if get_version().0 < 19 => None,
("powerpc", "power8-crypto") => Some(LLVMFeature::new("crypto")),
(_, s) => Some(LLVMFeature::new(s)),
}
}