Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #165 +/- ##
=======================================
Coverage 99.76% 99.76%
=======================================
Files 184 184
Lines 50832 50918 +86
=======================================
+ Hits 50714 50800 +86
Misses 118 118 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
I made this as an attempt to speed up AES-GCM for larger input sizes on Arm (context: issue #163). In my testing with |
brian-pane
commented
Apr 11, 2026
Comment on lines
+339
to
+347
| // Reverse the order of the bytes in each of the two 64-bit lanes in `u`. | ||
| let u = vrev64q_u8(u); | ||
| let u = vreinterpretq_u64_u8(u); | ||
|
|
||
| // Swap the locations of the two 64-bit lanes to finish reversing the bytes. | ||
| let lane0 = vgetq_lane_u64(u, 0); | ||
| let lane1 = vgetq_lane_u64(u, 1); | ||
| let reversed = vsetq_lane_u64(lane0, u, 1); | ||
| vsetq_lane_u64(lane1, reversed, 0) |
Contributor
Author
There was a problem hiding this comment.
This is slow, but I haven't figured out a better alternative yet. I tried doing a shuffle operation, similar to what the x86_64 version does:
const SHUFFLE_MAP: uint8x16_t = unsafe { mem::transmute([15u8, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) };
let mut reversed: uint8x16_t;
unsafe {
core::arch::asm!(
"tbl {reversed:v}.16B, {{ {u:v}.16B }}, {map:v}.16B",
reversed = out(vreg) reversed,
u = in(vreg) u,
map = in(vreg) SHUFFLE_MAP,
);
}
vreinterpretq_u64_u8(reversed)
but that ran even slower.
Contributor
Author
|
This patch assumes that the aarch64 target system is little-endian. Does Graviola support ARM running in big-endian mode? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.