Remove the aes feature from many arm intrinsics#2110
Conversation
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
This changes public, stable signatures. I don't think it can be observed (it's just removing a constraint), but we should be careful. Is there any way to validate that the new versions in fact work? I suspect that our CI just has the aes feature available anyway, so if any of these functions did still generate an |
This comment has been minimized.
This comment has been minimized.
242f4a3 to
f950ee6
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
f950ee6 to
da89d24
Compare
The exceptions to this are the vaes* intrinsics, and ones using the P64 variants of PMULL[2] instructions
da89d24 to
4e13a78
Compare
A few cases I can think of where removing a target feature could cause a breaking change:
I did test this locally with some qemu cpus that don't support the crypto extension and it worked. I wanted to push it to CI to demonstrate it working but it's quite annoying to do so If we rely on LLVM, it will fail to generate any instructions that require the aes feature when it's not available. intrinsic-test does not put target features on its test wrappers nor build with -Ctarget-feature, so those intrinics are running without the aes feature present. Also, sayantn's concern at #2109 (comment) regarding GCC isn't fully resolved yet |
Fixes #2109
The aes rust feature represents FEAT_AES and FEAT_PMULL - from the architecture reference manual, these just add 4 new aes* instructions, and the p64 variants of PMULL/PMULL2.
Clang's header doesn't seem to gate any poly types on the aes feature, and many of the intrinsics with the aes feature are nops or just load/stores, for which the aes feature shouldn't matter. Accordingly, I've removed the aes feature from all intrinsics except the vaes* intrinsics, and ones using the p64 variants of PMULL[2] instructions