Import OpenSSL 1.1.1f
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -1603,4 +1603,4 @@ foreach (split($/,$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT; # enforce flush
|
||||
close STDOUT or die "error closing STDOUT: $!"; # enforce flush
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -877,4 +877,4 @@ foreach(split("\n",$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -479,4 +479,4 @@ ___
|
||||
$output=pop;
|
||||
open STDOUT,">$output";
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -548,4 +548,4 @@ ___
|
||||
$output=pop;
|
||||
open STDOUT,">$output";
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -389,4 +389,4 @@ ___
|
||||
$output=pop;
|
||||
open STDOUT,">$output";
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -882,4 +882,4 @@ ___
|
||||
$output=pop;
|
||||
open STDOUT,">$output";
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -30,7 +30,7 @@
|
||||
# produce worse code. On the other hand one can wonder why not 128-bit
|
||||
# SSE2? Well, SSE2 won't provide double improvement, rather far from
|
||||
# that, if any at all on some processors, because it will take extra
|
||||
# permutations and inter-bank data trasfers. Besides, contemporary
|
||||
# permutations and inter-bank data transfers. Besides, contemporary
|
||||
# CPUs are better off executing 64-bit code, and it makes lesser sense
|
||||
# to invest into fancy 32-bit code. And the decision doesn't seem to
|
||||
# be inadequate, if one compares below results to "64-bit platforms in
|
||||
@@ -437,4 +437,4 @@ sub Rho() { ######### regular Rho step
|
||||
|
||||
&asm_finish();
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -755,4 +755,4 @@ ___
|
||||
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -557,4 +557,4 @@ ___
|
||||
$code =~ s/(srlg\s+)(%r[0-9]+),/$1$2,$2,/gm;
|
||||
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -44,7 +44,7 @@
|
||||
# Ryzen 8.8
|
||||
#
|
||||
# (*) Corresponds to SHA3-256. Improvement over compiler-generate
|
||||
# varies a lot, most commont coefficient is 15% in comparison to
|
||||
# varies a lot, most common coefficient is 15% in comparison to
|
||||
# gcc-5.x, 50% for gcc-4.x, 90% for gcc-3.x.
|
||||
# (**) Sandy Bridge has broken rotate instruction. Performance can be
|
||||
# improved by 14% by replacing rotates with double-precision
|
||||
@@ -84,6 +84,7 @@ $code.=<<___;
|
||||
.type __KeccakF1600,\@abi-omnipotent
|
||||
.align 32
|
||||
__KeccakF1600:
|
||||
.cfi_startproc
|
||||
mov $A[4][0](%rdi),@C[0]
|
||||
mov $A[4][1](%rdi),@C[1]
|
||||
mov $A[4][2](%rdi),@C[2]
|
||||
@@ -342,6 +343,7 @@ $code.=<<___;
|
||||
|
||||
lea -192($iotas),$iotas # rewind iotas
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size __KeccakF1600,.-__KeccakF1600
|
||||
|
||||
.type KeccakF1600,\@abi-omnipotent
|
||||
@@ -604,4 +606,4 @@ foreach (split("\n",$code)) {
|
||||
print $_, "\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -847,4 +847,4 @@ foreach (split("\n",$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 1998-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -144,7 +144,7 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" &&
|
||||
`ml 2>&1` =~ /Version ([0-9]+)\./ &&
|
||||
$1>=10); # first version supporting AVX
|
||||
|
||||
$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/ &&
|
||||
$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/ &&
|
||||
$2>=3.0); # first version supporting AVX
|
||||
|
||||
$shaext=$xmm; ### set to zero if compiling for 1.0.1
|
||||
@@ -1488,4 +1488,4 @@ sub Xtail_avx()
|
||||
|
||||
&asm_finish();
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2009-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -326,4 +326,4 @@ $code.=<<___;
|
||||
___
|
||||
$output=pop and open STDOUT,">$output";
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -739,4 +739,4 @@ foreach (split($/,$code)) {
|
||||
print $_,$/;
|
||||
}
|
||||
|
||||
close STDOUT; # enforce flush
|
||||
close STDOUT or die "error closing STDOUT: $!"; # enforce flush
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2014-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -361,4 +361,4 @@ foreach(split("\n",$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2012-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -334,4 +334,4 @@ $code.=<<___;
|
||||
___
|
||||
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2013-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2013-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -66,7 +66,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
|
||||
$avx = ($1>=10) + ($1>=11);
|
||||
}
|
||||
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) {
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) {
|
||||
$avx = ($2>=3.0) + ($2>3.0);
|
||||
}
|
||||
|
||||
@@ -1625,4 +1625,4 @@ foreach (split("\n",$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2009-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2009-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -458,4 +458,4 @@ $code.=<<___;
|
||||
.asciiz "SHA1 for MIPS, CRYPTOGAMS by <appro\@openssl.org>"
|
||||
___
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2009-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2009-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -276,4 +276,4 @@ foreach(split("\n",$code)) {
|
||||
|
||||
print $_,"\n";
|
||||
}
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -348,4 +348,4 @@ ___
|
||||
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -246,4 +246,4 @@ ___
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -431,4 +431,4 @@ foreach (split("\n",$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2009-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -605,4 +605,4 @@ $code =~ s/\b(alignaddr)\s+(%[goli][0-7]),(%[goli][0-7]),(%[goli][0-7])/
|
||||
&unalignaddr($1,$2,$3,$4)
|
||||
/gem;
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -263,4 +263,4 @@ $code.=<<___;
|
||||
___
|
||||
|
||||
print $code;
|
||||
close STDOUT; # enforce flush
|
||||
close STDOUT or die "error closing STDOUT: $!"; # enforce flush
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -119,7 +119,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
|
||||
$avx = ($1>=10) + ($1>=11);
|
||||
}
|
||||
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([2-9]\.[0-9]+)/) {
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) {
|
||||
$avx = ($2>=3.0) + ($2>3.0);
|
||||
}
|
||||
|
||||
@@ -468,8 +468,8 @@ $code.=<<___ if ($win64);
|
||||
.Lepilogue_shaext:
|
||||
___
|
||||
$code.=<<___;
|
||||
.cfi_endproc
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size sha1_block_data_order_shaext,.-sha1_block_data_order_shaext
|
||||
___
|
||||
}}}
|
||||
@@ -2129,4 +2129,4 @@ foreach (split("\n",$code)) {
|
||||
|
||||
print $_,"\n";
|
||||
}
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -96,7 +96,7 @@ if ($xmm && !$avx && $ARGV[0] eq "win32" &&
|
||||
$avx = ($1>=10) + ($1>=11);
|
||||
}
|
||||
|
||||
if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) {
|
||||
if ($xmm && !$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([0-9]+\.[0-9]+)/) {
|
||||
$avx = ($2>=3.0) + ($2>3.0);
|
||||
}
|
||||
|
||||
@@ -1293,4 +1293,4 @@ sub bodyx_00_15 () { # +10%
|
||||
|
||||
&asm_finish();
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -729,4 +729,4 @@ foreach (split($/,$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT; # enforce flush
|
||||
close STDOUT or die "error closing STDOUT: $!"; # enforce flush
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2012-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -317,4 +317,4 @@ K256:
|
||||
___
|
||||
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2013-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2013-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -67,7 +67,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
|
||||
$avx = ($1>=10) + ($1>=11);
|
||||
}
|
||||
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) {
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) {
|
||||
$avx = ($2>=3.0) + ($2>3.0);
|
||||
}
|
||||
|
||||
@@ -1611,4 +1611,4 @@ foreach (split("\n",$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -922,4 +922,4 @@ sub BODY_00_15_ssse3 { # "phase-less" copy of BODY_00_15_sse2
|
||||
|
||||
&asm_finish();
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -665,4 +665,4 @@ while(<SELF>) {
|
||||
close SELF;
|
||||
|
||||
print $code;
|
||||
close STDOUT; # enforce flush
|
||||
close STDOUT or die "error closing STDOUT: $!"; # enforce flush
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2014-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2014-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -902,4 +902,4 @@ foreach(split("\n",$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2012-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -435,4 +435,4 @@ K512:
|
||||
___
|
||||
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2010-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -518,4 +518,4 @@ ___
|
||||
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2009-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2009-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -804,4 +804,4 @@ foreach (split("\n",$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -796,4 +796,4 @@ ___
|
||||
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -321,4 +321,4 @@ $code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
$code =~ s/(srlg\s+)(%r[0-9]+),/$1$2,$2,/gm;
|
||||
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -854,4 +854,4 @@ foreach (split("\n",$code)) {
|
||||
print $_,"\n";
|
||||
}
|
||||
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2005-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -135,7 +135,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
|
||||
$avx = ($1>=10) + ($1>=11);
|
||||
}
|
||||
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/) {
|
||||
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) {
|
||||
$avx = ($2>=3.0) + ($2>3.0);
|
||||
}
|
||||
|
||||
@@ -569,6 +569,7 @@ $code.=<<___;
|
||||
.align 64
|
||||
sha256_block_data_order_shaext:
|
||||
_shaext_shortcut:
|
||||
.cfi_startproc
|
||||
___
|
||||
$code.=<<___ if ($win64);
|
||||
lea `-8-5*16`(%rsp),%rsp
|
||||
@@ -712,6 +713,7 @@ $code.=<<___ if ($win64);
|
||||
___
|
||||
$code.=<<___;
|
||||
ret
|
||||
.cfi_endproc
|
||||
.size sha256_block_data_order_shaext,.-sha256_block_data_order_shaext
|
||||
___
|
||||
}}}
|
||||
@@ -1992,7 +1994,23 @@ $code.=<<___;
|
||||
vmovdqa $t0,0x00(%rsp)
|
||||
xor $a1,$a1
|
||||
vmovdqa $t1,0x20(%rsp)
|
||||
___
|
||||
$code.=<<___ if (!$win64);
|
||||
# temporarily use %rdi as frame pointer
|
||||
mov $_rsp,%rdi
|
||||
.cfi_def_cfa %rdi,8
|
||||
___
|
||||
$code.=<<___;
|
||||
lea -$PUSH8(%rsp),%rsp
|
||||
___
|
||||
$code.=<<___ if (!$win64);
|
||||
# the frame info is at $_rsp, but the stack is moving...
|
||||
# so a second frame pointer is saved at -8(%rsp)
|
||||
# that is in the red zone
|
||||
mov %rdi,-8(%rsp)
|
||||
.cfi_cfa_expression %rsp-8,deref,+8
|
||||
___
|
||||
$code.=<<___;
|
||||
mov $B,$a3
|
||||
vmovdqa $t2,0x00(%rsp)
|
||||
xor $C,$a3 # magic
|
||||
@@ -2012,7 +2030,18 @@ my @X = @_;
|
||||
my @insns = (&$body,&$body,&$body,&$body); # 96 instructions
|
||||
my $base = "+2*$PUSH8(%rsp)";
|
||||
|
||||
&lea ("%rsp","-$PUSH8(%rsp)") if (($j%2)==0);
|
||||
if (($j%2)==0) {
|
||||
&lea ("%rsp","-$PUSH8(%rsp)");
|
||||
$code.=<<___ if (!$win64);
|
||||
.cfi_cfa_expression %rsp+`$PUSH8-8`,deref,+8
|
||||
# copy secondary frame pointer to new location again at -8(%rsp)
|
||||
pushq $PUSH8-8(%rsp)
|
||||
.cfi_cfa_expression %rsp,deref,+8
|
||||
lea 8(%rsp),%rsp
|
||||
.cfi_cfa_expression %rsp-8,deref,+8
|
||||
___
|
||||
}
|
||||
|
||||
foreach (Xupdate_256_AVX()) { # 29 instructions
|
||||
eval;
|
||||
eval(shift(@insns));
|
||||
@@ -2083,7 +2112,23 @@ $code.=<<___;
|
||||
vmovdqa $t2,0x40(%rsp)
|
||||
vpaddq 0x40($Tbl),@X[6],$t2
|
||||
vmovdqa $t3,0x60(%rsp)
|
||||
___
|
||||
$code.=<<___ if (!$win64);
|
||||
# temporarily use %rdi as frame pointer
|
||||
mov $_rsp,%rdi
|
||||
.cfi_def_cfa %rdi,8
|
||||
___
|
||||
$code.=<<___;
|
||||
lea -$PUSH8(%rsp),%rsp
|
||||
___
|
||||
$code.=<<___ if (!$win64);
|
||||
# the frame info is at $_rsp, but the stack is moving...
|
||||
# so a second frame pointer is saved at -8(%rsp)
|
||||
# that is in the red zone
|
||||
mov %rdi,-8(%rsp)
|
||||
.cfi_cfa_expression %rsp-8,deref,+8
|
||||
___
|
||||
$code.=<<___;
|
||||
vpaddq 0x60($Tbl),@X[7],$t3
|
||||
vmovdqa $t0,0x00(%rsp)
|
||||
xor $a1,$a1
|
||||
@@ -2107,7 +2152,18 @@ my @X = @_;
|
||||
my @insns = (&$body,&$body); # 48 instructions
|
||||
my $base = "+2*$PUSH8(%rsp)";
|
||||
|
||||
&lea ("%rsp","-$PUSH8(%rsp)") if (($j%4)==0);
|
||||
if (($j%4)==0) {
|
||||
&lea ("%rsp","-$PUSH8(%rsp)");
|
||||
$code.=<<___ if (!$win64);
|
||||
.cfi_cfa_expression %rsp+`$PUSH8-8`,deref,+8
|
||||
# copy secondary frame pointer to new location again at -8(%rsp)
|
||||
pushq $PUSH8-8(%rsp)
|
||||
.cfi_cfa_expression %rsp,deref,+8
|
||||
lea 8(%rsp),%rsp
|
||||
.cfi_cfa_expression %rsp-8,deref,+8
|
||||
___
|
||||
}
|
||||
|
||||
foreach (Xupdate_512_AVX()) { # 23 instructions
|
||||
eval;
|
||||
if ($_ !~ /\;$/) {
|
||||
@@ -2182,6 +2238,8 @@ $code.=<<___;
|
||||
add $a1,$A
|
||||
#mov `2*$SZ*$rounds+8`(%rsp),$inp # $_inp
|
||||
lea `2*$SZ*($rounds-8)`(%rsp),%rsp
|
||||
# restore frame pointer to original location at $_rsp
|
||||
.cfi_cfa_expression $_rsp,deref,+8
|
||||
|
||||
add $SZ*0($ctx),$A
|
||||
add $SZ*1($ctx),$B
|
||||
@@ -2207,22 +2265,24 @@ $code.=<<___;
|
||||
|
||||
jbe .Loop_avx2
|
||||
lea (%rsp),$Tbl
|
||||
# temporarily use $Tbl as index to $_rsp
|
||||
# this avoids the need to save a secondary frame pointer at -8(%rsp)
|
||||
.cfi_cfa_expression $Tbl+`16*$SZ+3*8`,deref,+8
|
||||
|
||||
.Ldone_avx2:
|
||||
lea ($Tbl),%rsp
|
||||
mov $_rsp,%rsi
|
||||
mov `16*$SZ+3*8`($Tbl),%rsi
|
||||
.cfi_def_cfa %rsi,8
|
||||
vzeroupper
|
||||
___
|
||||
$code.=<<___ if ($win64);
|
||||
movaps 16*$SZ+32(%rsp),%xmm6
|
||||
movaps 16*$SZ+48(%rsp),%xmm7
|
||||
movaps 16*$SZ+64(%rsp),%xmm8
|
||||
movaps 16*$SZ+80(%rsp),%xmm9
|
||||
movaps 16*$SZ+32($Tbl),%xmm6
|
||||
movaps 16*$SZ+48($Tbl),%xmm7
|
||||
movaps 16*$SZ+64($Tbl),%xmm8
|
||||
movaps 16*$SZ+80($Tbl),%xmm9
|
||||
___
|
||||
$code.=<<___ if ($win64 && $SZ>4);
|
||||
movaps 16*$SZ+96(%rsp),%xmm10
|
||||
movaps 16*$SZ+112(%rsp),%xmm11
|
||||
movaps 16*$SZ+96($Tbl),%xmm10
|
||||
movaps 16*$SZ+112($Tbl),%xmm11
|
||||
___
|
||||
$code.=<<___;
|
||||
mov -48(%rsi),%r15
|
||||
@@ -2495,4 +2555,4 @@ foreach (split("\n",$code)) {
|
||||
|
||||
print $_,"\n";
|
||||
}
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2014-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
# Copyright 2014-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
@@ -417,4 +417,4 @@ ___
|
||||
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
print $code;
|
||||
close STDOUT;
|
||||
close STDOUT or die "error closing STDOUT: $!";
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
/* The implementation is in ../md32_common.h */
|
||||
|
||||
# include "sha_locl.h"
|
||||
# include "sha_local.h"
|
||||
|
||||
@@ -128,7 +128,7 @@ static
|
||||
#endif
|
||||
void sha256_block_data_order(SHA256_CTX *ctx, const void *in, size_t num);
|
||||
|
||||
#include "internal/md32_common.h"
|
||||
#include "crypto/md32_common.h"
|
||||
|
||||
#ifndef SHA256_ASM
|
||||
static const SHA_LONG K256[64] = {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
#include "internal/cryptlib.h"
|
||||
#include "internal/sha.h"
|
||||
#include "crypto/sha.h"
|
||||
|
||||
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
|
||||
defined(__x86_64) || defined(_M_AMD64) || defined(_M_X64) || \
|
||||
|
||||
@@ -42,7 +42,7 @@ static void sha1_block_data_order(SHA_CTX *c, const void *p, size_t num);
|
||||
void sha1_block_data_order(SHA_CTX *c, const void *p, size_t num);
|
||||
#endif
|
||||
|
||||
#include "internal/md32_common.h"
|
||||
#include "crypto/md32_common.h"
|
||||
|
||||
#define INIT_DATA_h0 0x67452301UL
|
||||
#define INIT_DATA_h1 0xefcdab89UL
|
||||
Reference in New Issue
Block a user