|
| 1 | +--- a/third_party/fiat/p256_64.h |
| 2 | ++++ b/third_party/fiat/p256_64.h |
| 3 | +@@ -3,7 +3,7 @@ |
| 4 | + #include "p256_field_64.br.c.inc" |
| 5 | + #include "../../crypto/internal.h" |
| 6 | + |
| 7 | +-#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) |
| 8 | ++#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) && !defined(__MINGW32__) |
| 9 | + extern "C" { |
| 10 | + void fiat_p256_adx_mul(uint64_t*, const uint64_t*, const uint64_t*); |
| 11 | + void fiat_p256_adx_sqr(uint64_t*, const uint64_t*); |
| 12 | +@@ -181,7 +181,7 @@ |
| 13 | + */ |
| 14 | + static FIAT_P256_FIAT_INLINE void fiat_p256_mul(fiat_p256_montgomery_domain_field_element out1, const fiat_p256_montgomery_domain_field_element arg1, const fiat_p256_montgomery_domain_field_element arg2) { |
| 15 | + // NOTE: edited by hand, see third_party/fiat/README.md |
| 16 | +-#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) |
| 17 | ++#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) && !defined(__MINGW32__) |
| 18 | + if (CRYPTO_is_BMI1_capable() && CRYPTO_is_BMI2_capable() && |
| 19 | + CRYPTO_is_ADX_capable()) { |
| 20 | + fiat_p256_adx_mul(out1, arg1, arg2); |
| 21 | +@@ -497,7 +497,7 @@ |
| 22 | + */ |
| 23 | + static FIAT_P256_FIAT_INLINE void fiat_p256_square(fiat_p256_montgomery_domain_field_element out1, const fiat_p256_montgomery_domain_field_element arg1) { |
| 24 | + // NOTE: edited by hand, see third_party/fiat/README.md |
| 25 | +-#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) |
| 26 | ++#if !defined(OPENSSL_NO_ASM) && defined(__GNUC__) && defined(__x86_64__) && !defined(__MINGW32__) |
| 27 | + if (CRYPTO_is_BMI1_capable() && CRYPTO_is_BMI2_capable() && |
| 28 | + CRYPTO_is_ADX_capable()) { |
| 29 | + fiat_p256_adx_sqr(out1, arg1); |
0 commit comments