Skip to content

Commit b6a4787

Browse files
committed
Debug test: using stack-spill for mlkem-native fips202 slothy testing
- This commit change the SLOTHY version in nix/slothy/default.nix to stack-spill: slothy-optimizer/slothy@main...stack-spill This branch in slothy fix the issue: #230, make naming of stack location become configuratable. - In this commit we set the name of stack location as MLK_STACK_LOC by --stack-loc-prefix=MLK_STACK_LOC Signed-off-by: willieyz <willie.zhao@chelpis.com>
1 parent 0878495 commit b6a4787

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

dev/fips202/aarch64/src/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ keccak_f1600_x1_scalar_asm.S: ../../aarch64_symbolic/keccak_f1600_x1_scalar_symb
1010

1111
slothy-cli Arm_AArch64 Arm_Cortex_A55 \
1212
$^ -o $@ \
13+
--stack-loc-prefix=MLK_STACK_LOC \
1314
-c reserved_regs="[x18,sp]" \
1415
-c inputs_are_outputs \
1516
-c variable_size \
@@ -23,6 +24,7 @@ keccak_f1600_x1_scalar_asm.S: ../../aarch64_symbolic/keccak_f1600_x1_scalar_symb
2324

2425
slothy-cli Arm_AArch64 Arm_Cortex_A55 \
2526
$@ -o $@ \
27+
--stack-loc-prefix=MLK_STACK_LOC \
2628
-c reserved_regs="[x18,sp]" \
2729
-c variable_size \
2830
-c inputs_are_outputs \
@@ -38,6 +40,7 @@ keccak_f1600_x1_scalar_asm.S: ../../aarch64_symbolic/keccak_f1600_x1_scalar_symb
3840
keccak_f1600_x4_v8a_scalar_hybrid_asm.S: ../../aarch64_symbolic/keccak_f1600_x4_v8a_scalar_hybrid_clean.S
3941
slothy-cli Arm_AArch64 Arm_Cortex_A55 \
4042
$^ -o $@ \
43+
--stack-loc-prefix=MLK_STACK_LOC \
4144
-c reserved_regs="[x18,sp]" \
4245
-c inputs_are_outputs \
4346
-c variable_size \
@@ -54,6 +57,7 @@ keccak_f1600_x4_v8a_scalar_hybrid_asm.S: ../../aarch64_symbolic/keccak_f1600_x4_
5457

5558
slothy-cli Arm_AArch64 Arm_Cortex_A55 \
5659
$@ -o $@ \
60+
--stack-loc-prefix=MLK_STACK_LOC \
5761
-c reserved_regs="[x18,sp]" \
5862
-c inputs_are_outputs \
5963
-c variable_size \
@@ -71,6 +75,7 @@ keccak_f1600_x4_v8a_scalar_hybrid_asm.S: ../../aarch64_symbolic/keccak_f1600_x4_
7175
keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S: ../../aarch64_symbolic/keccak_f1600_x4_v8a_v84a_scalar_hybrid_clean.S
7276
slothy-cli Arm_AArch64 Arm_Cortex_A55 \
7377
$^ -o $@ \
78+
--stack-loc-prefix=MLK_STACK_LOC \
7479
-c reserved_regs="[x18,sp]" \
7580
-c inputs_are_outputs \
7681
-c variable_size \
@@ -87,6 +92,7 @@ keccak_f1600_x4_v8a_v84a_scalar_hybrid_asm.S: ../../aarch64_symbolic/keccak_f160
8792

8893
slothy-cli Arm_AArch64 Arm_Cortex_A55 \
8994
$@ -o $@ \
95+
--stack-loc-prefix=MLK_STACK_LOC \
9096
-c reserved_regs="[x18,sp]" \
9197
-c inputs_are_outputs \
9298
-c variable_size \

nix/slothy/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ let
1717
in
1818
stdenvNoCC.mkDerivation rec {
1919
pname = "slothy-cli";
20-
version = "915c224166207ce07b31152194305c3b6687d09b";
20+
version = "stack-spill";
2121
src = fetchFromGitHub {
2222
owner = "slothy-optimizer";
2323
repo = "slothy";
24-
rev = version;
25-
sha256 = "sha256-ebZjm+nhmML/+DZF78eN1ezoxbv5Rrc5kWsh0Ycww4U=";
24+
rev = "stack-spill";
25+
sha256 = "sha256-veJ+s7vwRwejF0aE9wPyKk2pU0jmIQxqHT6f8+ndGlg=";
2626
};
2727

2828
nativeBuildInputs = [ pkgs.makeWrapper ];

scripts/autogen

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2029,7 +2029,11 @@ def check_macro_typos():
20292029

20302030
# 1. Makefiles use MLK_SOURCE_XXX to list source files
20312031
if is_autogen or filename.endswith("/Makefile"):
2032-
if m.startswith("MLK_SOURCE") or m.startswith("MLK_OBJ"):
2032+
if (
2033+
m.startswith("MLK_SOURCE")
2034+
or m.startswith("MLK_OBJ")
2035+
or "STACK_LOC" in m
2036+
):
20332037
return True
20342038

20352039
# 2. libOQS specific identifier

0 commit comments

Comments
 (0)