-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scalar AArch64 Keccak-f1600 ASM (#133)
* Add first AArch64 Keccak-f1600 ASM Signed-off-by: Hanno Becker <[email protected]> * Update scalar Keccak ASM with A55-optimized version This should perform decent on most microarchitectures. Signed-off-by: Hanno Becker <[email protected]> * Minor cleanup of auto-generated scalar Keccak-f1600 assembly Signed-off-by: Hanno Becker <[email protected]> --------- Signed-off-by: Hanno Becker <[email protected]>
- Loading branch information
1 parent
640005d
commit 861095b
Showing
7 changed files
with
527 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
#if __APPLE__ | ||
#define ASM_LOAD(dst, symbol) \ | ||
adrp dst, symbol @PAGE %% add dst, dst, symbol @PAGEOFF | ||
#else | ||
#define ASM_LOAD(dst, symbol) \ | ||
adrp dst, symbol; \ | ||
add dst, dst, : lo12 : symbol; | ||
.endm | ||
|
||
#endif |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#ifndef ASM_H | ||
#define ASM_H | ||
|
||
#include <stdint.h> | ||
#include "params.h" | ||
#include "config.h" | ||
|
||
#ifdef MLKEM_USE_AARCH64_ASM | ||
void keccak_f1600_x1_scalar_slothy_opt_a55(uint64_t *state); | ||
|
||
#define keccak_f1600_x1_asm keccak_f1600_x1_scalar_slothy_opt_a55 | ||
#endif /* MLKEM_USE_AARCH64_ASM */ | ||
|
||
|
||
#endif |
This file contains 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
This file contains 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
This file contains 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
This file contains 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