mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
gh-123748: Add conditional compilation rules for HACL SIMD256 and SIMD128 on macOS (#123989)
Add conditional compilation rules to allow HACL SIMD256 and SIMD128 to be ignored on the ARM64 pass of universal2 macOS builds.
This commit is contained in:
parent
56470004e5
commit
ef530ce7c6
7 changed files with 143 additions and 4 deletions
|
|
@ -41,6 +41,16 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
// SIMD256 can't be compiled on macOS 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
|
||||
// symbols.
|
||||
#if defined(__APPLE__) && defined(__arm64__)
|
||||
# undef HACL_CAN_COMPILE_SIMD128
|
||||
# undef HACL_CAN_COMPILE_SIMD256
|
||||
#endif
|
||||
|
||||
// ECX
|
||||
#define ECX_SSE3 (1 << 0)
|
||||
#define ECX_SSSE3 (1 << 9)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue