Skip to content

gh-135032: Disable the SIMD128/SIMD256 for Linux arm64 explictly #135033

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions Modules/blake2module.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@

#include <stdbool.h>

// SIMD256 can't be compiled on macOS ARM64, and performance of SIMD128 isn't
// SIMD256 can't be compiled on macOS and Linux ARM64, and performance of SIMD128 isn't
// great; but when compiling a universal2 binary, autoconf will set
// HACL_CAN_COMPILE_SIMD128 and HACL_CAN_COMPILE_SIMD256 because they *can* be
// compiled on x86_64. If we're on macOS ARM64, disable these preprocessor
// compiled on x86_64. If we're on macOS and Linux ARM6, disable these preprocessor
// symbols.
#if defined(__APPLE__) && defined(__arm64__)
#if (defined(__APPLE__) || defined(__linux__)) && defined(__arm64__)
# undef HACL_CAN_COMPILE_SIMD128
# undef HACL_CAN_COMPILE_SIMD256
#endif
Expand Down
2 changes: 1 addition & 1 deletion Modules/hmacmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# include <intrin.h>
#endif

#if defined(__APPLE__) && defined(__arm64__)
#if (defined(__APPLE__) || defined(__linux__)) && defined(__arm64__)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide evidence that Linux/aarch64 performance are poorer.

# undef HACL_CAN_COMPILE_SIMD128
# undef HACL_CAN_COMPILE_SIMD256
#endif
Expand Down
Loading