Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aarch64: Support FEAT_LRCPC3/FEAT_LSE128 with pre-16 LLVM #178

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/.cspell/project-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ kuser
ldar
ldaxp
ldclrp
ldclrpa
ldclrpal
ldclrpl
ldiapp
ldsetp
ldsetpa
ldsetpal
ldsetpl
ldxp
lghi
libatomic
Expand Down Expand Up @@ -149,6 +155,9 @@ subfe
subfic
subfze
swpp
swppa
swppal
swppl
syscall
sysctlbyname
sysctlnode
Expand Down
9 changes: 2 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,8 @@ fn main() {
let is_macos = target_os == "macos";
let mut has_lse = is_macos;
target_feature_fallback("lse2", is_macos);
// LLVM supports FEAT_LRCPC3 and FEAT_LSE128 on LLVM 16+:
// https://github.com/llvm/llvm-project/commit/a6aaa969f7caec58a994142f8d855861cf3a1463
// https://github.com/llvm/llvm-project/commit/7fea6f2e0e606e5339c3359568f680eaf64aa306
if version.llvm >= 16 {
has_lse |= target_feature_fallback("lse128", false);
target_feature_fallback("rcpc3", false);
}
has_lse |= target_feature_fallback("lse128", false);
target_feature_fallback("rcpc3", false);
// aarch64_target_feature stabilized in Rust 1.61.
if needs_target_feature_fallback(&version, Some(61)) {
target_feature_fallback("lse", has_lse);
Expand Down
Loading