Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Keccak test on MacOS #11

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/keccak-neon/keccak-neon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ KECCAK_NEON_PLATFORMS += cross-v8a
KECCAK_NEON_PLATFORMS += cross-v84a
KECCAK_NEON_PLATFORMS += native-linux-v8a
KECCAK_NEON_PLATFORMS += native-linux-v84a
# TODO: this currently does not work; likely because some are using x18
#KECCAK_NEON_PLATFORMS += native-mac
KECCAK_NEON_PLATFORMS += native-mac

# C sources required for this test
KECCAK_NEON_SOURCES += main.c
Expand Down
12 changes: 12 additions & 0 deletions tests/keccak-neon/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ int main(void)
return( 1 );
if( validate_keccak_f1600_x1_scalar_C_v1() != 0 )
return( 1 );
// TODO: These implementations are using x18 which is reserved on Apple Silicon
#ifndef __APPLE__
if( validate_keccak_f1600_x1_scalar_asm_v1() != 0 )
return( 1 );
if( validate_keccak_f1600_x1_scalar_asm_v2() != 0 )
Expand All @@ -55,6 +57,7 @@ int main(void)
return( 1 );
if( validate_keccak_f1600_x1_scalar_asm_v5() != 0 )
return( 1 );
#endif
if( validate_keccak_f1600_x2_v84a_asm_v1() != 0 )
return( 1 );
if( validate_keccak_f1600_x2_v84a_asm_v1p0() != 0 )
Expand Down Expand Up @@ -103,8 +106,11 @@ int main(void)
return( 1 );
if( validate_keccak_f1600_x3_hybrid_asm_v6() != 0 )
return( 1 );

#ifndef __APPLE__
if( validate_keccak_f1600_x3_hybrid_asm_v7() != 0 )
return( 1 );
#endif
if( validate_keccak_f1600_x4_hybrid_asm_v1() != 0 )
return( 1 );
if( validate_keccak_f1600_x4_hybrid_asm_v2() != 0 )
Expand All @@ -113,18 +119,24 @@ int main(void)
return( 1 );
if( validate_keccak_f1600_x4_hybrid_asm_v3p() != 0 )
return( 1 );
#ifndef __APPLE__
if( validate_keccak_f1600_x4_hybrid_asm_v3pp() != 0 )
return( 1 );
#endif
if( validate_keccak_f1600_x4_hybrid_asm_v4() != 0 )
return( 1 );
if( validate_keccak_f1600_x4_hybrid_asm_v4p() != 0 )
return( 1 );
#ifndef __APPLE__
if( validate_keccak_f1600_x4_hybrid_asm_v5() != 0 )
return( 1 );
#endif
if( validate_keccak_f1600_x4_hybrid_asm_v5p() != 0 )
return( 1 );
#ifndef __APPLE__
if( validate_keccak_f1600_x4_hybrid_asm_v6() != 0 )
return( 1 );
#endif
if( validate_keccak_f1600_x4_hybrid_asm_v7() != 0 )
return( 1 );
if( validate_keccak_f1600_x4_hybrid_asm_v8() != 0 )
Expand Down
Loading