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

The AArch64 feature list is incomplete. #993

Open
jacobbramley opened this issue Feb 3, 2021 · 5 comments
Open

The AArch64 feature list is incomplete. #993

jacobbramley opened this issue Feb 3, 2021 · 5 comments

Comments

@jacobbramley
Copy link
Contributor

The set of features in arch/aarch64.rs is rather behind the architecture (and what's described by Linux's auxv).

I went to bring the list up to date, and noticed that a few are actually listed (in os/linux/aarch64.rs), but commented out. Are they deliberately omitted? If so, what criteria are used for inclusion here?

@Amanieu
Copy link
Member

Amanieu commented Feb 3, 2021

It's just because these features are not supported here in the compiler. You are welcome to update both to add the latest features.

@jacobbramley
Copy link
Contributor Author

Oh, thanks for that pointer! I will do that; it makes sense to keep these in agreement.

Actually making use of them in the compiler will be rather more difficult, of course. Can I assume that all that is required is awareness (e.g. for asm!)?

@Amanieu
Copy link
Member

Amanieu commented Feb 4, 2021

The main concern is that the compiler and stdarch (and LLVM to some extent) agree on the same name for a particular feature. You should check against the feature names that LLVM uses in https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AArch64/AArch64.td, though rustc has some renaming logic for some feature names.

@jacobbramley
Copy link
Contributor Author

Yes, I saw reference to that in a comment in rustc (in your first link).
I think there may be a missing translation there, actually: "fp16" is called "fphp" in Linux and the tests don't detect it (when other tools do). I've not followed the logic through the whole stack yet; consider it a strong hunch :-) Since finding hardware with all of the features is difficult, I intend to test what I can, and audit the the whole list to check that there aren't similar issues elsewhere.

@Amanieu
Copy link
Member

Amanieu commented Feb 15, 2021

The feature detection code was fixed in #1005. However the submodule in rust-lang/rust hasn't been updated yet.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue May 19, 2021
…nieu

Update list of allowed aarch64 features

I recently added these features to std_detect for aarch64 linux, pending [review](rust-lang/stdarch#1146).

I have commented any features not supported by LLVM 9, the current minimum version for Rust. Some (PAuth at least) were renamed between 9 & 12 and I've left them disabled. TME, however, is not in LLVM 9 but I've left it enabled.

See rust-lang/stdarch#993
bors added a commit to rust-lang-ci/rust that referenced this issue May 20, 2021
Update list of allowed aarch64 features

I recently added these features to std_detect for aarch64 linux, pending [review](rust-lang/stdarch#1146).

I have commented any features not supported by LLVM 9, the current minimum version for Rust. Some (PAuth at least) were renamed between 9 & 12 and I've left them disabled. TME, however, is not in LLVM 9 but I've left it enabled.

See rust-lang/stdarch#993
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants