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

Enable the SHA extension implementation of SHA-256/512 on x86 #81

Merged
merged 7 commits into from
Jan 8, 2021
8 changes: 3 additions & 5 deletions crypto/fipsmodule/sha/asm/sha512-x86_64.pl
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,7 @@
# necessary to disable AVX2 code when SHA Extensions code is disabled? Upstream
# did not tie them together until after $shaext was added.
$avx = 1;

# TODO(davidben): Consider enabling the Intel SHA Extensions code once it's
# been tested.
$shaext=0; ### set to zero if compiling for 1.0.1
$avx=1 if (!$shaext && $avx);
$shaext=1; ### set to zero if compiling for 1.0.1
nebeid marked this conversation as resolved.
Show resolved Hide resolved

open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
*STDOUT=*OUT;
Expand Down Expand Up @@ -560,6 +556,7 @@ ()
.align 64
sha256_block_data_order_shaext:
_shaext_shortcut:
.cfi_startproc
___
$code.=<<___ if ($win64);
lea `-8-5*16`(%rsp),%rsp
Expand Down Expand Up @@ -703,6 +700,7 @@ ()
___
$code.=<<___;
ret
.cfi_endproc
.size sha256_block_data_order_shaext,.-sha256_block_data_order_shaext
___
}}}
Expand Down