Skip to content

The AArch64 feature list is incomplete. #993

@jacobbramley

Description

@jacobbramley
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?

Activity

Amanieu

Amanieu commented on Feb 3, 2021

@Amanieu
Member

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

jacobbramley commented on Feb 4, 2021

@jacobbramley
ContributorAuthor

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

Amanieu commented on Feb 4, 2021

@Amanieu
Member

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

jacobbramley commented on Feb 4, 2021

@jacobbramley
ContributorAuthor

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

Amanieu commented on Feb 15, 2021

@Amanieu
Member

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

added a commit that references this issue on May 19, 2021
c9a2c81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Amanieu@jacobbramley@sayantn

        Issue actions

          The AArch64 feature list is incomplete. · Issue #993 · rust-lang/stdarch