1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-12 14:46:15 +02:00

Add #ifdef guards to enable multi-arch compilation on macOS

This commit is contained in:
Patrick Stewart 2022-05-31 16:03:57 +01:00
parent b776e8f328
commit 36ecfb829b
6 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,4 @@
#if defined(__x86_64__)
#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",%progbits
#endif
@ -1813,3 +1814,4 @@ CMP_MSB_MASK:
BLAKE3_IV:
.long 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A
#endif

View File

@ -1,3 +1,4 @@
#if defined(__x86_64__)
#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",%progbits
#endif
@ -2583,3 +2584,5 @@ BLAKE3_IV_2:
.long 0x3C6EF372
BLAKE3_IV_3:
.long 0xA54FF53A
#endif

View File

@ -38,7 +38,7 @@ enum blake3_flags {
#define IS_X86_32
#endif
#if defined(__aarch64__) || defined(_M_ARM64)
#if defined(__aarch64__) || defined(_M_ARM64) || defined(__arm64__)
#define IS_AARCH64
#endif

View File

@ -1,4 +1,5 @@
#include "blake3_impl.h"
#if BLAKE3_USE_NEON
#include <arm_neon.h>
@ -349,3 +350,5 @@ void blake3_hash_many_neon(const uint8_t *const *inputs, size_t num_inputs,
out = &out[BLAKE3_OUT_LEN];
}
}
#endif

View File

@ -1,3 +1,4 @@
#if defined(__x86_64__)
#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",%progbits
#endif
@ -2289,3 +2290,5 @@ PBLENDW_0x3F_MASK:
.long 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000
PBLENDW_0xC0_MASK:
.long 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF
#endif

View File

@ -1,3 +1,4 @@
#if defined(__x86_64__)
#if defined(__ELF__) && defined(__linux__)
.section .note.GNU-stack,"",%progbits
#endif
@ -2026,3 +2027,4 @@ BLAKE3_BLOCK_LEN:
.long 64, 64, 64, 64
CMP_MSB_MASK:
.long 0x80000000, 0x80000000, 0x80000000, 0x80000000
#endif