Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal abi used in amm functions, no need for OS differentiation #1869

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions crypto/fipsmodule/bn/asm/rsaz-2k-avx512.pl
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@

if ($avx512ifma>0) {{{

@_6_args_universal_ABI = $win64 ?
("%rcx","%rdx","%r8","%r9","%r10","%r11") :
("%rdi","%rsi","%rdx","%rcx","%r8","%r9");
@_6_args_universal_ABI = ("%rdi","%rsi","%rdx","%rcx","%r8","%r9");

###############################################################################
# void rsaz_amm52x20_x1_ifma256(BN_ULONG *res,
Expand Down
5 changes: 2 additions & 3 deletions crypto/fipsmodule/bn/asm/rsaz-3k-avx512.pl
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@
*STDOUT=*OUT;

if ($avx512ifma>0) {{{
@_6_args_universal_ABI = $win64 ?
("%rcx","%rdx","%r8","%r9","%r10","%r11") :
("%rdi","%rsi","%rdx","%rcx","%r8","%r9");

@_6_args_universal_ABI = ("%rdi","%rsi","%rdx","%rcx","%r8","%r9");

###############################################################################
# void rsaz_amm52x30_x1_ifma256(BN_ULONG *res,
Expand Down
4 changes: 1 addition & 3 deletions crypto/fipsmodule/bn/asm/rsaz-4k-avx512.pl
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@
*STDOUT=*OUT;

if ($avx512ifma>0) {{{
@_6_args_universal_ABI = $win64 ?
("%rcx","%rdx","%r8","%r9","%r10","%r11") :
("%rdi","%rsi","%rdx","%rcx","%r8","%r9");
@_6_args_universal_ABI = ("%rdi","%rsi","%rdx","%rcx","%r8","%r9");

###############################################################################
# void rsaz_amm52x40_x1_ifma256(BN_ULONG *res,
Expand Down
6 changes: 2 additions & 4 deletions crypto/fipsmodule/cpucap/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,8 @@ OPENSSL_INLINE int CRYPTO_is_VPCLMULQDQ_capable(void) {
// 1100_0000_0010_0011_0000_0000_0000_0000
#define CPU_CAP_AVX512IFMA_BITFLAGS 0xC0230000
OPENSSL_INLINE int CRYPTO_is_AVX512IFMA_capable(void) {
return 0;
// TODO: Re-enable once we understand Windows test failures.
// return (OPENSSL_ia32cap_get()[2] & CPU_CAP_AVX512IFMA_BITFLAGS) ==
// CPU_CAP_AVX512IFMA_BITFLAGS;
return (OPENSSL_ia32cap_get()[2] & CPU_CAP_AVX512IFMA_BITFLAGS) ==
CPU_CAP_AVX512IFMA_BITFLAGS;
}

OPENSSL_INLINE int CRYPTO_is_VBMI2_capable(void) {
Expand Down
Loading
Loading