-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIPS202: Remove ASM_LOAD from FIPS-202 AArch64 backend
This commit removes ASM_LOAD from the FIPS-202 AArch64 backend and instead passes the address of a round constant table by address. Signed-off-by: Hanno Becker <[email protected]>
- Loading branch information
1 parent
61fbfa1
commit 0bda992
Showing
12 changed files
with
46 additions
and
275 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
This file was deleted.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,49 +24,17 @@ | |
* | ||
*/ | ||
|
||
|
||
// Author: Hanno Becker <[email protected]> | ||
// Author: Matthias Kannwischer <[email protected]> | ||
|
||
#include "common.h" | ||
#if defined(MLKEM_NATIVE_FIPS202_BACKEND_AARCH64_DEFAULT) || \ | ||
defined(MLKEM_NATIVE_FIPS202_BACKEND_AARCH64_A55) | ||
|
||
// Needed to provide ASM_LOAD directive | ||
#include "common.i" | ||
|
||
/********************** CONSTANTS *************************/ | ||
.data | ||
.balign 64 | ||
round_constants: | ||
.quad 0x0000000000000001 | ||
.quad 0x0000000000008082 | ||
.quad 0x800000000000808a | ||
.quad 0x8000000080008000 | ||
.quad 0x000000000000808b | ||
.quad 0x0000000080000001 | ||
.quad 0x8000000080008081 | ||
.quad 0x8000000000008009 | ||
.quad 0x000000000000008a | ||
.quad 0x0000000000000088 | ||
.quad 0x0000000080008009 | ||
.quad 0x000000008000000a | ||
.quad 0x000000008000808b | ||
.quad 0x800000000000008b | ||
.quad 0x8000000000008089 | ||
.quad 0x8000000000008003 | ||
.quad 0x8000000000008002 | ||
.quad 0x8000000000000080 | ||
.quad 0x000000000000800a | ||
.quad 0x800000008000000a | ||
.quad 0x8000000080008081 | ||
.quad 0x8000000000008080 | ||
.quad 0x0000000080000001 | ||
.quad 0x8000000080008008 | ||
|
||
/****************** REGISTER ALLOCATIONS *******************/ | ||
|
||
input_addr .req x0 | ||
input_rc .req x1 | ||
const_addr .req x26 | ||
|
||
/* Mapping of Kecck-f1600 state to scalar registers | ||
|
@@ -205,8 +173,8 @@ _FIPS202_NAMESPACE(keccak_f1600_x1_scalar_asm_opt): | |
save_gprs | ||
|
||
initial: | ||
ASM_LOAD(const_addr, round_constants) | ||
str const_addr, [sp, #STACK_LOC_CONST] | ||
mov const_addr, input_rc | ||
str input_rc, [sp, #STACK_LOC_CONST] | ||
load_state | ||
str input_addr, [sp, #STACK_LOC_INPUT] // @slothy:writes=STACK_LOC_INPUT | ||
|
||
|
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
Oops, something went wrong.