Skip to content

Commit

Permalink
universal abi used in amm functions, no need for OS dffn
Browse files Browse the repository at this point in the history
  • Loading branch information
pittma committed Sep 20, 2024
1 parent c187579 commit 2e8d424
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
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

0 comments on commit 2e8d424

Please sign in to comment.