Skip to content

Commit 4db09cb

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 <[email protected]>
1 parent 6e2ef4a commit 4db09cb

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

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+
-c constraints.spill_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+
-c constraints.spill_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+
-c constraints.spill_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+
-c constraints.spill_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+
-c constraints.spill_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+
-c constraints.spill_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-Vq/hbMsTTuwm1ms0yn8DIu2KAqcfKlUOhhwxqrr5Cls=";
2626
};
2727

2828
nativeBuildInputs = [ pkgs.makeWrapper ];

scripts/autogen

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

20322032
# 1. Makefiles use MLK_SOURCE_XXX to list source files
20332033
if is_autogen or filename.endswith("/Makefile"):
2034-
if m.startswith("MLK_SOURCE") or m.startswith("MLK_OBJ"):
2034+
if (
2035+
m.startswith("MLK_SOURCE")
2036+
or m.startswith("MLK_OBJ")
2037+
or "STACK_LOC" in m
2038+
):
20352039
return True
20362040

20372041
# 2. libOQS specific identifier

0 commit comments

Comments
 (0)