Skip to content

The v8a feature should be enabled by default on aarch64 #57904

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

Closed
adamgemmell opened this issue Sep 22, 2022 · 4 comments
Closed

The v8a feature should be enabled by default on aarch64 #57904

adamgemmell opened this issue Sep 22, 2022 · 4 comments

Comments

@adamgemmell
Copy link

The TTBR0_EL2 register is locked behind el2vmsa when it should be available on all aarch64 platforms. This has been noticed in Rust which does not currently enable the feature by default or expose a stable way to enable it, though I feel here is a better place to solve the issue.

The v8a feature, added about a year ago, seems to want to represent features enabled on ARM v8.0 processors, but these features should really be enabled by default if this is the case.

@llvmbot
Copy link
Member

llvmbot commented Sep 22, 2022

@llvm/issue-subscribers-backend-aarch64

@oToToT
Copy link
Member

oToToT commented Nov 28, 2022

I believe this issue is similar to #53956.

LLVM currently takes the intersection of v8a and v8r as default. 4a31af8 tried to provide some backward compatibility (i.e. v8a as default) after 8689f5e landed.
However, the use case of Rust is not covered in that patch (which I misunderstood then), so either we need to figure out a better solution to provide backward compatibility or we could simply modify the target spec of Rust.

@lenary
Copy link
Member

lenary commented Nov 28, 2022

just for context: the AArch64 backend now supports both v8-r and v8-a, which have significant overlap. For this reason, the backend cannot always assume that it has v8-a, because you might be compiling for v8-r. The same goes for disassembly.

In fact, disassembly is harder because v8-a and v8-r have some conflicts in their system register name/encoding space, so you have to know if you're aiming for r-profile or a-profile when disassembling. We recently added functionality to objdump to turn on all features, but this was probably incorrectly designed because it does indeed switch on everything, across both A and R profile, even though there are conflicts.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 2, 2022
v8a as default aarch64 target

After llvm/llvm-project@8689f5e landed, LLVM takes the intersection of v8a and v8r as default. This commit brings back v8a support by explicitly specifying v8a in the feature list.

This should solve rust-lang#97724.

p.s. a bit more context can also be found in llvm/llvm-project#57904 (comment).
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 2, 2022
v8a as default aarch64 target

After llvm/llvm-project@8689f5e landed, LLVM takes the intersection of v8a and v8r as default. This commit brings back v8a support by explicitly specifying v8a in the feature list.

This should solve rust-lang#97724.

p.s. a bit more context can also be found in llvm/llvm-project#57904 (comment).
@adamgemmell
Copy link
Author

Thanks @oToToT!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants