-
Notifications
You must be signed in to change notification settings - Fork 70
Add intrinsic support for the SVE multi-vector Advanced Encryption Standard (AES) instructions #411
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e8fb4e7
Add intrinsics for the FEAT_SVE_AES2 feature introduced by the 2024 d…
amilendra 4505e29
Fix the AES2 review comments.
amilendra 9612674
Add SVE2 AES2 support status (Alpha) to the content
amilendra 1a26687
[PMLAL] Add svuint64x2_t zda which acts as both input/output
amilendra 3909c74
Address further AES2 review comments
amilendra 91e71c0
Fix Typos: SVE2 -> SVE
amilendra cc7d01c
Add [_n] optional suffix for PMULL, PMLAL intrinsics. Make _u64x2 non…
amilendra e294d8f
Match parameter names with instruction operand names
amilendra e9d11c2
Fix pmull/pmlal intrinsics
Lukacma 3fbc4e2
remove wrong pmull pmlal variants
Lukacma f782d8b
Adjust feat definition
Lukacma 2adfa86
added full stops
Lukacma 2d51784
Fix aes zm types
Lukacma 033f829
Merge remote-tracking branch 'acle/main' into 2025-acle-sve-aes2
Lukacma 8800c76
Merge branch 'main' into 2025-acle-sve-aes2
vhscampos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -465,6 +465,8 @@ Armv8.4-A [[ARMARMv84]](#ARMARMv84). Support is added for the Dot Product intrin | |
|
|
||
| * Added feature test macro for FEAT_SSVE_FEXPA. | ||
| * Added feature test macro for FEAT_CSSC. | ||
| * Added [**Alpha**](#current-status-and-anticipated-changes) support | ||
| for FEAT_SVE_AES2, FEAT_SSVE_AES intrinsics. | ||
|
|
||
| ### References | ||
|
|
||
|
|
@@ -2147,6 +2149,18 @@ support for the SVE2 AES (FEAT_SVE_AES) instructions and if the associated | |
| ACLE intrinsics are available. This implies that `__ARM_FEATURE_AES` | ||
| and `__ARM_FEATURE_SVE2` are both nonzero. | ||
|
|
||
| In addition, `__ARM_FEATURE_SVE_AES2` is defined to `1` if there is hardware | ||
| support for the SVE AES2 (FEAT_SVE_AES2) instructions and if the associated | ||
| ACLE intrinsics are available. | ||
|
|
||
| `__ARM_FEATURE_SSVE_AES` is defined to 1 if there is hardware support for | ||
| SVE AES2 (FEAT_SVE_AES2) instructions in Streaming SVE mode (FEAT_SSVE_AES) | ||
| and if the associated ACLE intrinsics are available. | ||
|
|
||
| The specification for SVE AES2 (FEAT_SVE_AES2, FEAT_SSVE_AES) instructions is in | ||
| [**Alpha** state](#current-status-and-anticipated-changes) and might change or be | ||
| extended in the future. | ||
|
|
||
| #### SHA2 extension | ||
|
|
||
| `__ARM_FEATURE_SHA2` is defined to 1 if the SHA1 & SHA2-256 Crypto | ||
|
|
@@ -2642,6 +2656,8 @@ be found in [[BA]](#BA). | |
| | [`__ARM_FEATURE_SVE_VECTOR_OPERATORS`](#scalable-vector-extension-sve) | Level of support for C and C++ operators on SVE predicate types | 1 | | ||
| | [`__ARM_FEATURE_SVE2`](#sve2) | SVE version 2 (FEAT_SVE2) | 1 | | ||
| | [`__ARM_FEATURE_SVE2_AES`](#aes-extension) | SVE2 support for the AES cryptographic extension (FEAT_SVE_AES) | 1 | | ||
| | [`__ARM_FEATURE_SVE_AES2`](#aes-extension) | SVE support for the multi-vector AES cryptographic and 128-bit polynomial multiply long extension (FEAT_SVE_AES2) | 1 | | ||
| | [`__ARM_FEATURE_SSVE_AES`](#aes-extension) | SVE support for the multi-vector AES cryptographic and 128-bit polynomial multiply long extension (FEAT_SSVE_AES) | 1 | | ||
| | [`__ARM_FEATURE_SVE2_BITPERM`](#bit-permute-extension) | SVE2 bit permute extension | 1 | | ||
| | [`__ARM_FEATURE_SSVE_BITPERM`](#bit-permute-extension) | SVE2 bit permute extension | 1 | | ||
| | [`__ARM_FEATURE_SSVE_FEXPA`](#streaming-sve-fexpa-extension) | Streaming SVE FEXPA extension | 1 | | ||
|
|
@@ -9712,6 +9728,43 @@ Lookup table read with 4-bit indices. | |
| svint16_t svluti4_lane[_s16_x2](svint16x2_t table, svuint8_t indices, uint64_t imm_idx); | ||
| ``` | ||
|
|
||
| ### SVE2 Multi-vector AES and 128-bit polynomial multiply long instructions | ||
|
|
||
| The specification for SVE2 Multi-vector AES and 128-bit polynomial multiply long instructions is in | ||
| [**Alpha** state](#current-status-and-anticipated-changes) and might change or be | ||
| extended in the future. | ||
|
|
||
| #### AESE, AESD, AESEMC, AESDIMC | ||
|
|
||
| Multi-vector Advanced Encryption Standard instructions | ||
|
|
||
| ```c | ||
| // Only if __ARM_FEATURE_SVE_AES2 != 0 | ||
|
|
||
| svuint8x2_t svaese_lane[_u8_x2] (svuint8x2_t zdn, svuint64_t zm, uint64_t index); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the zm be svuint8_t?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| svuint8x4_t svaese_lane[_u8_x4] (svuint8x4_t zdn, svuint64_t zm, uint64_t index); | ||
| svuint8x2_t svaesd_lane[_u8_x2] (svuint8x2_t zdn, svuint64_t zm, uint64_t index); | ||
| svuint8x4_t svaesd_lane[_u8_x4] (svuint8x4_t zdn, svuint64_t zm, uint64_t index); | ||
| svuint8x2_t svaesemc_lane[_u8_x2] (svuint8x2_t zdn, svuint64_t zm, uint64_t index); | ||
| svuint8x4_t svaesemc_lane[_u8_x4] (svuint8x4_t zdn, svuint64_t zm, uint64_t index); | ||
| svuint8x2_t svaesdimc_lane[_u8_x2] (svuint8x2_t zdn, svuint64_t zm, uint64_t index); | ||
| svuint8x4_t svaesdimc_lane[_u8_x4] (svuint8x4_t zdn, svuint64_t zm, uint64_t index); | ||
| ``` | ||
|
|
||
| #### PMULL, PMLAL | ||
|
|
||
| Multi-vector 128-bit polynomial multiply long instructions | ||
|
|
||
| ``` c | ||
| // Only if __ARM_FEATURE_SVE_AES2 != 0 | ||
|
|
||
| svuint64x2_t svpmull_pair[_u64_x2](svuint64_t zn, svuint64_t zm); | ||
| svuint64x2_t svpmull_pair[_n_u64_x2](svuint64_t zn, uint64_t zm); | ||
|
|
||
| svuint64x2_t svpmlal_pair[_u64_x2](svuint64x2_t zda, svuint64_t zn, svuint64_t zm); | ||
| svuint64x2_t svpmlal_pair[_n_u64_x2](svuint64x2_t zda, svuint64_t zn, uint64_t zm); | ||
| ``` | ||
|
|
||
| # SME language extensions and intrinsics | ||
|
|
||
| The specification for SME is in | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence and the one above are similar.
Maybe change to:
Streaming SVE support
for the __ARM_FEATURE_SSVE_AES