Skip to content

Commit

Permalink
Extend #1869, update Intel SDE; Enable Linux AVX512 IFMA usage (#1871)
Browse files Browse the repository at this point in the history
### Description of changes: 
This extends the work done on #1869.
* Updates to latest version of Intel SDE;
* Fixes minor bug in Go test script.
* Disables use of AVX512 IFMA on Windows.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.

---------

Co-authored-by: Dan Pittman <[email protected]>
Co-authored-by: Justin Smith <[email protected]>
  • Loading branch information
3 people authored Sep 25, 2024
1 parent 266228a commit 2df0b55
Show file tree
Hide file tree
Showing 9 changed files with 805 additions and 807 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ concurrency:
cancel-in-progress: true
env:
GOPROXY: https://proxy.golang.org,direct
SDE_MIRROR_URL: "https://downloadmirror.intel.com/813591/sde-external-9.33.0-2024-01-07-win.tar.xz"
SDE_VERSION_TAG: sde-external-9.33.0-2024-01-07-win
SDE_MIRROR_URL: "https://downloadmirror.intel.com/831748/sde-external-9.44.0-2024-08-22-win.tar.xz"
SDE_VERSION_TAG: sde-external-9.44.0-2024-08-22-win
PACKAGE_NAME: aws-lc
# Used to enable ASAN test dimension.
AWSLC_NO_ASM_FIPS: 1
Expand Down
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
10 changes: 6 additions & 4 deletions crypto/fipsmodule/cpucap/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,12 @@ 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;
#if defined(OPENSSL_WINDOWS)
return 0;
#else
return (OPENSSL_ia32cap_get()[2] & CPU_CAP_AVX512IFMA_BITFLAGS) ==
CPU_CAP_AVX512IFMA_BITFLAGS;
#endif
}

OPENSSL_INLINE int CRYPTO_is_VBMI2_capable(void) {
Expand Down
Loading

0 comments on commit 2df0b55

Please sign in to comment.