mirror of
https://boringssl.googlesource.com/boringssl
synced 2026-07-21 14:43:51 +00:00
Make the SysV gates for fiat assembly more consistent
__GNUC__ is not a great proxy for SysV because that's about the compiler features. E.g. someone might be building on MinGW. (MinGW is not currently tested or supported.) The assembly files all use __APPLE__ || __ELF__, so match that. Also use our OPENSSL_X86_64 abstraction since that's what the assembly uses. Change-Id: Id8606791a2c316a6af40641c7028167fb6ad4452 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/97047 Commit-Queue: Adam Langley <agl@google.com> Auto-Submit: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
committed by
boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
6bec274e2a
commit
28950bf42f
@@ -30,7 +30,7 @@ extern "C" void x25519_NEON(uint8_t out[32], const uint8_t scalar[32],
|
||||
#endif
|
||||
|
||||
#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_SMALL) && \
|
||||
defined(__GNUC__) && defined(__x86_64__) && !defined(OPENSSL_WINDOWS)
|
||||
(defined(__APPLE__) || defined(__ELF__)) && defined(OPENSSL_X86_64)
|
||||
#define BORINGSSL_FE25519_ADX
|
||||
|
||||
// fiat_curve25519_adx_mul is defined in
|
||||
|
||||
@@ -49,12 +49,12 @@ static inline void p256_coord_sub(br_word_t out, br_word_t x, br_word_t y) {
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && \
|
||||
#if !defined(OPENSSL_NO_ASM) && (defined(__ELF__) || defined(__APPLE__)) && \
|
||||
defined(OPENSSL_X86_64) && !defined(OPENSSL_NANOLIBC)
|
||||
// These functions are only available with gas and SysV ABI, so limit to
|
||||
// __GNUC__. Unlike most of our SysV assembly, they currently rely on the SysV
|
||||
// redzone. This trips one target which looks like it targets SysV but has no
|
||||
// redzone. This happens to define `OPENSSL_NANOLIBC`, so gate on that.
|
||||
// These functions are only available with gas and SysV ABI, used by Apple and
|
||||
// ELF-based platforms. Unlike most of our SysV assembly, they currently rely on
|
||||
// the SysV redzone. This trips one target which looks like it targets SysV but
|
||||
// has no redzone. This happens to define `OPENSSL_NANOLIBC`, so gate on that.
|
||||
//
|
||||
// TODO(crbug.com/522255483): Come up with a clearer story for the redzone
|
||||
// situation.
|
||||
|
||||
Reference in New Issue
Block a user