From 951cd4503ff3c4cc93c1a36cf06138b1ddd739d7 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 9 Jun 2025 14:28:34 +0000 Subject: Make OPENSSL_IA32_SSE2 the default for i386 and remove the flag. The OPENSSL_IA32_SSE2 flag controls whether a number of the perlasm scripts generate additional implementations that use SSE2 functionality. In all cases except ghash, the code checks OPENSSL_ia32cap_P for SSE2 support, before trying to run SSE2 code. For ghash it generates a CLMUL based implementation in addition to different MMX version (one MMX version hides behind OPENSSL_IA32_SSE2, the other does not), however this does not appear to actually use SSE2. We also disable AES-NI on i386 if OPENSSL_IA32_SSE2. On OpenBSD, we've always defined OPENSSL_IA32_SSE2 so this is effectively a no-op. The only change is that we now check MMX rather than SSE2 for the ghash MMX implementation. ok bcook@ beck@ --- src/lib/libcrypto/bn/asm/bn-586.pl | 3 +-- src/lib/libcrypto/bn/asm/x86-mont.pl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib/libcrypto/bn/asm') diff --git a/src/lib/libcrypto/bn/asm/bn-586.pl b/src/lib/libcrypto/bn/asm/bn-586.pl index 71b775af8d..19a1afdbbe 100644 --- a/src/lib/libcrypto/bn/asm/bn-586.pl +++ b/src/lib/libcrypto/bn/asm/bn-586.pl @@ -6,8 +6,7 @@ require "x86asm.pl"; &asm_init($ARGV[0],$0); -$sse2=0; -for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } +$sse2=1; &external_label("OPENSSL_ia32cap_P") if ($sse2); diff --git a/src/lib/libcrypto/bn/asm/x86-mont.pl b/src/lib/libcrypto/bn/asm/x86-mont.pl index 6524651748..3be440f11f 100755 --- a/src/lib/libcrypto/bn/asm/x86-mont.pl +++ b/src/lib/libcrypto/bn/asm/x86-mont.pl @@ -32,8 +32,7 @@ require "x86asm.pl"; &asm_init($ARGV[0],$0); -$sse2=0; -for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } +$sse2=1; &external_label("OPENSSL_ia32cap_P") if ($sse2); -- cgit v1.2.3-55-g6feb