Implement AES backend for ARMv9 using SVE2-AES #403
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements an AES backend for ARMv9 using the SVE2-AES feature.
The overall design is similar to RVV implementation since they are both VLA-style.
Most of the comments I made in that PR are relevant here as well, especially with regard to the use of
global_asm!
and the opportunity for an addition to the interface for supporting N-ary parallel operations (although maybe this doesn't need to be a user-facing change, depending on the specifics).One thing to note for anyone checking the CI logs: there's unfortunately an annoying issue that causes some part of the LLVM code-gen to complain about assembly using extensions (when compiled in release mode), indicating there is an error in compilation, although the code actually compiles and runs fine and all the tests pass.
More details with link to an upstream issue: rust-lang/rust#80608
In fact this was also a problem for the RVV implementation but I was able to use the RISC-V assembly
.architecture
directive to silence the errors, like so:Unfortunately, ARMv9 assembly doesn't have an analogous directive, AFAIK. However, something could be added to the job to filter out the noise from these spurious notices if desired.
Also relevant (for switching to intrinsics in the future): rust-lang/rust#118917