1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
https://bugs.gentoo.org/972756
https://github.com/openssl/openssl/issues/31199
--- a/crypto/evp/encode.c
+++ b/crypto/evp/encode.c
@@ -175,7 +175,7 @@ int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
j = evp_encodeblock_int(ctx, out, in, inl - (inl % EVP_ENCODE_B64_LENGTH),
&wrap_cnt);
} else {
-#if defined(__AVX2__) && defined(HAVE_AVX2_INTRINSICS)
+#if defined(__AVX2__) && defined(HAVE_AVX2_INTRINSICS) && (defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64))
const int newlines = !(ctx->flags & EVP_ENCODE_CTX_NO_NEWLINES) ? EVP_ENCODE_B64_LENGTH : 0;
j = encode_base64_avx2(ctx,
@@ -243,7 +243,7 @@ int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen)
{
int wrap_cnt = 0;
-#if defined(__AVX2__) && defined(HAVE_AVX2_INTRINSICS)
+#if defined(__AVX2__) && defined(HAVE_AVX2_INTRINSICS) && (defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64))
return (int)encode_base64_avx2(NULL, t, f, dlen, 0, &wrap_cnt);
#elif defined(HAS_IA32CAP_IS_64) && defined(HAVE_AVX2_INTRINSICS)
if ((OPENSSL_ia32cap_P[2] & (1u << 5)) != 0)
|