Latest update.

This commit is contained in:
2019-09-21 00:43:47 +09:00
parent 2e57f602ae
commit 62515c7d8d
1131 changed files with 47556 additions and 24957 deletions
+102 -100
View File
@@ -70,9 +70,10 @@
# Cortex-Mx, x>=3. Otherwise, non-NEON results for NEON-capable
# processors are presented mostly for reference purposes.
$flavour = shift;
if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} }
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour && $flavour ne "void") {
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
@@ -80,9 +81,10 @@ if ($flavour && $flavour ne "void") {
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";
open STDOUT,"| \"$^X\" $xlate $flavour $output";
open STDOUT,"| \"$^X\" $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
} else {
open STDOUT,">$output";
$output and open STDOUT,">$output";
}
my @C = map("r$_",(0..9));
@@ -1132,9 +1134,9 @@ KeccakF1600_neon:
.align 4
.Loop_neon:
@ Theta
vst1.64 {q4}, [r0:64] @ offload A[0..1][4]
vst1.64 {q4}, [r0,:64] @ offload A[0..1][4]
veor q13, q0, q5 @ A[0..1][0]^A[2..3][0]
vst1.64 {d18}, [r1:64] @ offload A[2][4]
vst1.64 {d18}, [r1,:64] @ offload A[2][4]
veor q14, q1, q6 @ A[0..1][1]^A[2..3][1]
veor q15, q2, q7 @ A[0..1][2]^A[2..3][2]
veor d26, d26, d27 @ C[0]=A[0][0]^A[1][0]^A[2][0]^A[3][0]
@@ -1177,10 +1179,10 @@ KeccakF1600_neon:
veor d16, d16, d28 @ A[2][3] ^= C[2]
veor d17, d17, d28 @ A[3][3] ^= C[2]
veor d23, d23, d28 @ A[4][3] ^= C[2]
vld1.64 {q4}, [r0:64] @ restore A[0..1][4]
vld1.64 {q4}, [r0,:64] @ restore A[0..1][4]
vmov d28, d29
vld1.64 {d18}, [r1:64] @ restore A[2][4]
vld1.64 {d18}, [r1,:64] @ restore A[2][4]
veor q2, q2, q13 @ A[0..1][2] ^= D[2]
veor q7, q7, q13 @ A[2..3][2] ^= D[2]
veor d22, d22, d27 @ A[4][2] ^= D[2]
@@ -1255,7 +1257,7 @@ KeccakF1600_neon:
veor q13, q13, q0 @ A[0..1][0] ^ (~A[0..1][1] & A[0..1][2])
veor q14, q14, q1 @ A[0..1][1] ^ (~A[0..1][2] & A[0..1][3])
veor q2, q2, q15 @ A[0..1][2] ^= (~A[0..1][3] & A[0..1][4])
vst1.64 {q13}, [r0:64] @ offload A[0..1][0]
vst1.64 {q13}, [r0,:64] @ offload A[0..1][0]
vbic q13, q0, q4
vbic q15, q1, q0
vmov q1, q14 @ A[0..1][1]
@@ -1276,10 +1278,10 @@ KeccakF1600_neon:
vmov q14, q10 @ A[4][0..1]
veor q9, q9, q13 @ A[2..3][4] ^= (~A[2..3][0] & A[2..3][1])
vld1.64 d25, [r2:64]! @ Iota[i++]
vld1.64 d25, [r2,:64]! @ Iota[i++]
vbic d26, d22, d21
vbic d27, d23, d22
vld1.64 {q0}, [r0:64] @ restore A[0..1][0]
vld1.64 {q0}, [r0,:64] @ restore A[0..1][0]
veor d20, d20, d26 @ A[4][0] ^= (~A[4][1] & A[4][2])
vbic d26, d24, d23
veor d21, d21, d27 @ A[4][1] ^= (~A[4][2] & A[4][3])
@@ -1307,32 +1309,32 @@ SHA3_absorb_neon:
mov r5, r2 @ len
mov r6, r3 @ bsz
vld1.32 {d0}, [r0:64]! @ A[0][0]
vld1.32 {d2}, [r0:64]! @ A[0][1]
vld1.32 {d4}, [r0:64]! @ A[0][2]
vld1.32 {d6}, [r0:64]! @ A[0][3]
vld1.32 {d8}, [r0:64]! @ A[0][4]
vld1.32 {d0}, [r0,:64]! @ A[0][0]
vld1.32 {d2}, [r0,:64]! @ A[0][1]
vld1.32 {d4}, [r0,:64]! @ A[0][2]
vld1.32 {d6}, [r0,:64]! @ A[0][3]
vld1.32 {d8}, [r0,:64]! @ A[0][4]
vld1.32 {d1}, [r0:64]! @ A[1][0]
vld1.32 {d3}, [r0:64]! @ A[1][1]
vld1.32 {d5}, [r0:64]! @ A[1][2]
vld1.32 {d7}, [r0:64]! @ A[1][3]
vld1.32 {d9}, [r0:64]! @ A[1][4]
vld1.32 {d1}, [r0,:64]! @ A[1][0]
vld1.32 {d3}, [r0,:64]! @ A[1][1]
vld1.32 {d5}, [r0,:64]! @ A[1][2]
vld1.32 {d7}, [r0,:64]! @ A[1][3]
vld1.32 {d9}, [r0,:64]! @ A[1][4]
vld1.32 {d10}, [r0:64]! @ A[2][0]
vld1.32 {d12}, [r0:64]! @ A[2][1]
vld1.32 {d14}, [r0:64]! @ A[2][2]
vld1.32 {d16}, [r0:64]! @ A[2][3]
vld1.32 {d18}, [r0:64]! @ A[2][4]
vld1.32 {d10}, [r0,:64]! @ A[2][0]
vld1.32 {d12}, [r0,:64]! @ A[2][1]
vld1.32 {d14}, [r0,:64]! @ A[2][2]
vld1.32 {d16}, [r0,:64]! @ A[2][3]
vld1.32 {d18}, [r0,:64]! @ A[2][4]
vld1.32 {d11}, [r0:64]! @ A[3][0]
vld1.32 {d13}, [r0:64]! @ A[3][1]
vld1.32 {d15}, [r0:64]! @ A[3][2]
vld1.32 {d17}, [r0:64]! @ A[3][3]
vld1.32 {d19}, [r0:64]! @ A[3][4]
vld1.32 {d11}, [r0,:64]! @ A[3][0]
vld1.32 {d13}, [r0,:64]! @ A[3][1]
vld1.32 {d15}, [r0,:64]! @ A[3][2]
vld1.32 {d17}, [r0,:64]! @ A[3][3]
vld1.32 {d19}, [r0,:64]! @ A[3][4]
vld1.32 {d20-d23}, [r0:64]! @ A[4][0..3]
vld1.32 {d24}, [r0:64] @ A[4][4]
vld1.32 {d20-d23}, [r0,:64]! @ A[4][0..3]
vld1.32 {d24}, [r0,:64] @ A[4][4]
sub r0, r0, #24*8 @ rewind
b .Loop_absorb_neon
@@ -1439,32 +1441,32 @@ SHA3_absorb_neon:
.align 4
.Labsorbed_neon:
vst1.32 {d0}, [r0:64]! @ A[0][0..4]
vst1.32 {d2}, [r0:64]!
vst1.32 {d4}, [r0:64]!
vst1.32 {d6}, [r0:64]!
vst1.32 {d8}, [r0:64]!
vst1.32 {d0}, [r0,:64]! @ A[0][0..4]
vst1.32 {d2}, [r0,:64]!
vst1.32 {d4}, [r0,:64]!
vst1.32 {d6}, [r0,:64]!
vst1.32 {d8}, [r0,:64]!
vst1.32 {d1}, [r0:64]! @ A[1][0..4]
vst1.32 {d3}, [r0:64]!
vst1.32 {d5}, [r0:64]!
vst1.32 {d7}, [r0:64]!
vst1.32 {d9}, [r0:64]!
vst1.32 {d1}, [r0,:64]! @ A[1][0..4]
vst1.32 {d3}, [r0,:64]!
vst1.32 {d5}, [r0,:64]!
vst1.32 {d7}, [r0,:64]!
vst1.32 {d9}, [r0,:64]!
vst1.32 {d10}, [r0:64]! @ A[2][0..4]
vst1.32 {d12}, [r0:64]!
vst1.32 {d14}, [r0:64]!
vst1.32 {d16}, [r0:64]!
vst1.32 {d18}, [r0:64]!
vst1.32 {d10}, [r0,:64]! @ A[2][0..4]
vst1.32 {d12}, [r0,:64]!
vst1.32 {d14}, [r0,:64]!
vst1.32 {d16}, [r0,:64]!
vst1.32 {d18}, [r0,:64]!
vst1.32 {d11}, [r0:64]! @ A[3][0..4]
vst1.32 {d13}, [r0:64]!
vst1.32 {d15}, [r0:64]!
vst1.32 {d17}, [r0:64]!
vst1.32 {d19}, [r0:64]!
vst1.32 {d11}, [r0,:64]! @ A[3][0..4]
vst1.32 {d13}, [r0,:64]!
vst1.32 {d15}, [r0,:64]!
vst1.32 {d17}, [r0,:64]!
vst1.32 {d19}, [r0,:64]!
vst1.32 {d20-d23}, [r0:64]! @ A[4][0..4]
vst1.32 {d24}, [r0:64]
vst1.32 {d20-d23}, [r0,:64]! @ A[4][0..4]
vst1.32 {d24}, [r0,:64]
mov r0, r5 @ return value
vldmia sp!, {d8-d15}
@@ -1499,64 +1501,64 @@ SHA3_squeeze_neon:
vstmdb sp!, {d8-d15}
vld1.32 {d0}, [r0:64]! @ A[0][0..4]
vld1.32 {d2}, [r0:64]!
vld1.32 {d4}, [r0:64]!
vld1.32 {d6}, [r0:64]!
vld1.32 {d8}, [r0:64]!
vld1.32 {d0}, [r0,:64]! @ A[0][0..4]
vld1.32 {d2}, [r0,:64]!
vld1.32 {d4}, [r0,:64]!
vld1.32 {d6}, [r0,:64]!
vld1.32 {d8}, [r0,:64]!
vld1.32 {d1}, [r0:64]! @ A[1][0..4]
vld1.32 {d3}, [r0:64]!
vld1.32 {d5}, [r0:64]!
vld1.32 {d7}, [r0:64]!
vld1.32 {d9}, [r0:64]!
vld1.32 {d1}, [r0,:64]! @ A[1][0..4]
vld1.32 {d3}, [r0,:64]!
vld1.32 {d5}, [r0,:64]!
vld1.32 {d7}, [r0,:64]!
vld1.32 {d9}, [r0,:64]!
vld1.32 {d10}, [r0:64]! @ A[2][0..4]
vld1.32 {d12}, [r0:64]!
vld1.32 {d14}, [r0:64]!
vld1.32 {d16}, [r0:64]!
vld1.32 {d18}, [r0:64]!
vld1.32 {d10}, [r0,:64]! @ A[2][0..4]
vld1.32 {d12}, [r0,:64]!
vld1.32 {d14}, [r0,:64]!
vld1.32 {d16}, [r0,:64]!
vld1.32 {d18}, [r0,:64]!
vld1.32 {d11}, [r0:64]! @ A[3][0..4]
vld1.32 {d13}, [r0:64]!
vld1.32 {d15}, [r0:64]!
vld1.32 {d17}, [r0:64]!
vld1.32 {d19}, [r0:64]!
vld1.32 {d11}, [r0,:64]! @ A[3][0..4]
vld1.32 {d13}, [r0,:64]!
vld1.32 {d15}, [r0,:64]!
vld1.32 {d17}, [r0,:64]!
vld1.32 {d19}, [r0,:64]!
vld1.32 {d20-d23}, [r0:64]! @ A[4][0..4]
vld1.32 {d24}, [r0:64]
vld1.32 {d20-d23}, [r0,:64]! @ A[4][0..4]
vld1.32 {d24}, [r0,:64]
sub r0, r0, #24*8 @ rewind
bl KeccakF1600_neon
mov r12, r0 @ A_flat
vst1.32 {d0}, [r0:64]! @ A[0][0..4]
vst1.32 {d2}, [r0:64]!
vst1.32 {d4}, [r0:64]!
vst1.32 {d6}, [r0:64]!
vst1.32 {d8}, [r0:64]!
vst1.32 {d0}, [r0,:64]! @ A[0][0..4]
vst1.32 {d2}, [r0,:64]!
vst1.32 {d4}, [r0,:64]!
vst1.32 {d6}, [r0,:64]!
vst1.32 {d8}, [r0,:64]!
vst1.32 {d1}, [r0:64]! @ A[1][0..4]
vst1.32 {d3}, [r0:64]!
vst1.32 {d5}, [r0:64]!
vst1.32 {d7}, [r0:64]!
vst1.32 {d9}, [r0:64]!
vst1.32 {d1}, [r0,:64]! @ A[1][0..4]
vst1.32 {d3}, [r0,:64]!
vst1.32 {d5}, [r0,:64]!
vst1.32 {d7}, [r0,:64]!
vst1.32 {d9}, [r0,:64]!
vst1.32 {d10}, [r0:64]! @ A[2][0..4]
vst1.32 {d12}, [r0:64]!
vst1.32 {d14}, [r0:64]!
vst1.32 {d16}, [r0:64]!
vst1.32 {d18}, [r0:64]!
vst1.32 {d10}, [r0,:64]! @ A[2][0..4]
vst1.32 {d12}, [r0,:64]!
vst1.32 {d14}, [r0,:64]!
vst1.32 {d16}, [r0,:64]!
vst1.32 {d18}, [r0,:64]!
vst1.32 {d11}, [r0:64]! @ A[3][0..4]
vst1.32 {d13}, [r0:64]!
vst1.32 {d15}, [r0:64]!
vst1.32 {d17}, [r0:64]!
vst1.32 {d19}, [r0:64]!
vst1.32 {d11}, [r0,:64]! @ A[3][0..4]
vst1.32 {d13}, [r0,:64]!
vst1.32 {d15}, [r0,:64]!
vst1.32 {d17}, [r0,:64]!
vst1.32 {d19}, [r0,:64]!
vst1.32 {d20-d23}, [r0:64]! @ A[4][0..4]
vst1.32 {d20-d23}, [r0,:64]! @ A[4][0..4]
mov r14, r6 @ bsz
vst1.32 {d24}, [r0:64]
vst1.32 {d24}, [r0,:64]
mov r0, r12 @ rewind
vldmia sp!, {d8-d15}
+6 -3
View File
@@ -59,15 +59,18 @@
# Cortex-A57 to 25% on Cortex-A53. While in comparison to older
# compiler this code is at least 2x faster...
$flavour = shift;
$output = shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";
open OUT,"| \"$^X\" $xlate $flavour $output";
open OUT,"| \"$^X\" $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
*STDOUT=*OUT;
my @rhotates = ([ 0, 1, 62, 28, 27 ],
+1 -2
View File
@@ -476,7 +476,6 @@ iotas:
.asciz "Keccak-1600 absorb and squeeze for AVX2, CRYPTOGAMS by <appro\@openssl.org>"
___
$output=pop;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
print $code;
close STDOUT;
+1 -2
View File
@@ -545,7 +545,6 @@ iotas:
.asciz "Keccak-1600 absorb and squeeze for AVX-512F, CRYPTOGAMS by <appro\@openssl.org>"
___
$output=pop;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
print $code;
close STDOUT;
+1 -2
View File
@@ -386,7 +386,6 @@ iotas:
.asciz "Keccak-1600 absorb and squeeze for AVX512VL, CRYPTOGAMS by <appro\@openssl.org>"
___
$output=pop;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
print $code;
close STDOUT;
+1 -2
View File
@@ -879,7 +879,6 @@ iotas:
.align 4
___
$output=pop;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
print $code;
close STDOUT;
+1 -2
View File
@@ -65,8 +65,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
push(@INC,"${dir}","${dir}../../perlasm");
require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386");
+6 -2
View File
@@ -37,7 +37,10 @@
# much better (but watch out for them generating code specific
# to processor they execute on).
$flavour = shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour =~ /64/) {
$SIZE_T =8;
@@ -53,7 +56,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl";
open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
open STDOUT,"| $^X $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
$FRAME=24*$SIZE_T+6*$SIZE_T+32;
$LOCALS=6*$SIZE_T;
+5 -3
View File
@@ -30,7 +30,10 @@
# amount of instruction and assumed instruction issue rate. It's ~2.5x
# faster than compiler-generated code.
$flavour = shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour =~ /3[12]/) {
$SIZE_T=4;
@@ -40,8 +43,7 @@ if ($flavour =~ /3[12]/) {
$g="g";
}
while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output";
$output and open STDOUT,">$output";
my @A = map([ 8*$_, 8*($_+1), 8*($_+2), 8*($_+3), 8*($_+4) ], (0,5,10,15,20));
+6 -4
View File
@@ -50,9 +50,10 @@
# improved by 14% by replacing rotates with double-precision
# shift with same register as source and destination.
$flavour = shift;
$output = shift;
if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
@@ -61,7 +62,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
die "can't locate x86_64-xlate.pl";
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""
or die "can't call $xlate: $!";
*STDOUT=*OUT;
my @A = map([ 8*$_-100, 8*($_+1)-100, 8*($_+2)-100,
+6 -2
View File
@@ -25,7 +25,10 @@
# successor can achieve higher scalar instruction issue rate, then
# this module will loose... And it does on POWER9 with 12.0 vs. 9.4.
$flavour = shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour =~ /64/) {
$SIZE_T =8;
@@ -48,7 +51,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl";
open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
open STDOUT,"| $^X $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
$FRAME=6*$SIZE_T+13*16; # 13*16 is for v20-v31 offload
+1 -2
View File
@@ -123,8 +123,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
push(@INC,"${dir}","${dir}../../perlasm");
require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386");
+7 -5
View File
@@ -75,9 +75,10 @@
#
# Add ARMv8 code path performing at 2.35 cpb on Apple A7.
$flavour = shift;
if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} }
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour && $flavour ne "void") {
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
@@ -85,9 +86,10 @@ if ($flavour && $flavour ne "void") {
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";
open STDOUT,"| \"$^X\" $xlate $flavour $output";
open STDOUT,"| \"$^X\" $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
} else {
open STDOUT,">$output";
$output and open STDOUT,">$output";
}
$ctx="r0";
+6 -3
View File
@@ -33,15 +33,18 @@
# (**) Keep in mind that Denver relies on binary translation, which
# optimizes compiler output at run-time.
$flavour = shift;
$output = shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";
open OUT,"| \"$^X\" $xlate $flavour $output";
open OUT,"| \"$^X\" $xlate $flavour \"$output\""
or die "can't call $xlate: $1";
*STDOUT=*OUT;
($ctx,$inp,$num)=("x0","x1","x2");
+1 -2
View File
@@ -32,8 +32,7 @@
# service routines are expected to preserve it and for own well-being
# zero it upon entry.
while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output";
$output = pop and open STDOUT,">$output";
($CTX,$INP,$NUM) = ("A4","B4","A6"); # arguments
+2 -1
View File
@@ -21,7 +21,8 @@
# Performance under big-endian OS such as HP-UX is 179MBps*1GHz, which
# is >50% better than HP C and >2x better than gcc.
$output = pop;
# $output is the last argument if it looks like a file (it has an extension)
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$code=<<___;
.ident \"sha1-ia64.s, version 1.3\"
+6 -4
View File
@@ -38,9 +38,10 @@
# in real-life application are somewhat lower, e.g. for 2KB
# fragments they range from 30% to 100% (on Haswell);
$flavour = shift;
$output = shift;
if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
@@ -70,7 +71,8 @@ if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([
$avx = ($2>=3.0) + ($2>3.0);
}
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""
or die "can't call $xlate: $!";
*STDOUT=*OUT;
# void sha1_multi_block (
+7 -4
View File
@@ -52,8 +52,12 @@
# ($t0,$t1,$t2,$t3,$t8,$t9)=map("\$$_",(12..15,24,25));
# ($s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7)=map("\$$_",(16..23));
# ($gp,$sp,$fp,$ra)=map("\$$_",(28..31));
#
$flavour = shift || "o32"; # supported flavours are o32,n32,64,nubi32,nubi64
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
# supported flavours are o32,n32,64,nubi32,nubi64, default is o32
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : "o32";
if ($flavour =~ /64|n32/i) {
$PTR_ADD="daddu"; # incidentally works even on n32
@@ -77,8 +81,7 @@ if ($flavour =~ /64|n32/i) {
$big_endian=(`echo MIPSEB | $ENV{CC} -E -`=~/MIPSEB/)?0:1 if ($ENV{CC});
for (@ARGV) { $output=$_ if (/\w[\w\-]*\.\w+$/); }
open STDOUT,">$output";
$output and open STDOUT,">$output";
if (!defined($big_endian))
{ $big_endian=(unpack('L',pack('N',1))==1); }
+6 -3
View File
@@ -26,9 +26,12 @@
#
# Special thanks to polarhome.com for providing HP-UX account.
$flavour = shift;
$output = shift;
open STDOUT,">$output";
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
$output and open STDOUT,">$output";
if ($flavour =~ /64/) {
$LEVEL ="2.0W";
+6 -2
View File
@@ -26,7 +26,10 @@
# PPC970,gcc-4.0.0 +76% +59%
# Power6,xlc-7 +68% +33%
$flavour = shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour =~ /64/) {
$SIZE_T =8;
@@ -53,7 +56,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl";
open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!";
open STDOUT,"| $^X $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
$FRAME=24*$SIZE_T+64;
$LOCALS=6*$SIZE_T;
+5 -3
View File
@@ -40,7 +40,10 @@
$kimdfunc=1; # magic function code for kimd instruction
$flavour = shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour =~ /3[12]/) {
$SIZE_T=4;
@@ -50,8 +53,7 @@ if ($flavour =~ /3[12]/) {
$g="g";
}
while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output";
$output and open STDOUT,">$output";
$K_00_39="%r0"; $K=$K_00_39;
$K_40_79="%r1";
+1 -2
View File
@@ -32,8 +32,7 @@
# single-process result on 8-core processor, or ~9GBps per 2.85GHz
# socket.
$output=pop;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
@X=("%o0","%o1","%o2","%o3","%o4","%o5","%g1","%o7");
$rot1m="%g2";
+1 -2
View File
@@ -47,8 +47,7 @@ for (@ARGV) { $bits=64 if (/\-m64/ || /\-xarch\=v9/); }
if ($bits==64) { $bias=2047; $frame=192; }
else { $bias=0; $frame=112; }
$output=shift;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
$ctx="%i0";
$inp="%i1";
+1 -2
View File
@@ -26,8 +26,7 @@
# by over 40%, while code increases by only 10% or 32 bytes. But once
# again, the goal was to establish _size_ benchmark, not performance.
$output=shift;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
$inline=0;
#$cheat_on_binutils=1;
+6 -4
View File
@@ -93,9 +93,10 @@
# because SSSE3 code is compiled unconditionally;
# (**) SHAEXT result
$flavour = shift;
$output = shift;
if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
@@ -126,7 +127,8 @@ if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([
$shaext=1; ### set to zero if compiling for 1.0.1
$avx=1 if (!$shaext && $avx);
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""
or die "can't call $xlate: $!";
*STDOUT=*OUT;
$ctx="%rdi"; # 1st arg
+1 -2
View File
@@ -73,8 +73,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
push(@INC,"${dir}","${dir}../../perlasm");
require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386");
+7 -5
View File
@@ -44,9 +44,10 @@
#
# Add ARMv8 code path performing at 2.0 cpb on Apple A7.
$flavour = shift;
if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} }
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour && $flavour ne "void") {
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
@@ -54,9 +55,10 @@ if ($flavour && $flavour ne "void") {
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";
open STDOUT,"| \"$^X\" $xlate $flavour $output";
open STDOUT,"| \"$^X\" $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
} else {
open STDOUT,">$output";
$output and open STDOUT,">$output";
}
$ctx="r0"; $t0="r0";
+1 -2
View File
@@ -26,8 +26,7 @@
# service routines are expected to preserve it and for own well-being
# zero it upon entry.
while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output";
$output = pop and open STDOUT,">$output";
($CTXA,$INP,$NUM) = ("A4","B4","A6"); # arguments
$K256="A3";
+6 -4
View File
@@ -39,9 +39,10 @@
# in real-life application are somewhat lower, e.g. for 2KB
# fragments they range from 75% to 130% (on Haswell);
$flavour = shift;
$output = shift;
if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
@@ -71,7 +72,8 @@ if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([
$avx = ($2>=3.0) + ($2>3.0);
}
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""
or die "can't call $xlate: $!";
*STDOUT=*OUT;
# void sha256_multi_block (
+1 -2
View File
@@ -59,8 +59,7 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
push(@INC,"${dir}","${dir}../../perlasm");
require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
$output=pop and open STDOUT,">$output";
&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386");
+7 -5
View File
@@ -57,9 +57,10 @@ $hi="HI";
$lo="LO";
# ====================================================================
$flavour = shift;
if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; }
else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} }
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour && $flavour ne "void") {
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
@@ -67,9 +68,10 @@ if ($flavour && $flavour ne "void") {
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";
open STDOUT,"| \"$^X\" $xlate $flavour $output";
open STDOUT,"| \"$^X\" $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
} else {
open STDOUT,">$output";
$output and open STDOUT,">$output";
}
$ctx="r0"; # parameter block
+7 -4
View File
@@ -54,8 +54,10 @@
# deliver much less improvement, likely *negative* on Cortex-A5x.
# Which is why NEON support is limited to SHA256.]
$output=pop;
$flavour=pop;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour && $flavour ne "void") {
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
@@ -63,10 +65,11 @@ if ($flavour && $flavour ne "void") {
( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or
die "can't locate arm-xlate.pl";
open OUT,"| \"$^X\" $xlate $flavour $output";
open OUT,"| \"$^X\" $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
*STDOUT=*OUT;
} else {
open STDOUT,">$output";
$output and open STDOUT,">$output";
}
if ($output =~ /512/) {
+1 -2
View File
@@ -29,8 +29,7 @@
# service routines are expected to preserve it and for own well-being
# zero it upon entry.
while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output";
($output = pop) =~ m|\.\w+$| and open STDOUT,">$output";
($CTXA,$INP,$NUM) = ("A4","B4","A6"); # arguments
$K512="A3";
+3 -2
View File
@@ -75,7 +75,8 @@
# To generate code, pass the file name with either 256 or 512 in its
# name and compiler flags.
$output=pop;
# $output is the last argument if it looks like a file (it has an extension)
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
if ($output =~ /512.*\.[s|asm]/) {
$SZ=8;
@@ -107,7 +108,7 @@ if ($output =~ /512.*\.[s|asm]/) {
$rounds=64;
} else { die "nonsense $output"; }
open STDOUT,">$output" || die "can't open $output: $!";
$output and (open STDOUT,">$output" or die "can't open $output: $!");
if ($^O eq "hpux") {
$ADDP="addp4";
+8 -2
View File
@@ -56,7 +56,14 @@
# ($s0,$s1,$s2,$s3,$s4,$s5,$s6,$s7)=map("\$$_",(16..23));
# ($gp,$sp,$fp,$ra)=map("\$$_",(28..31));
#
$flavour = shift || "o32"; # supported flavours are o32,n32,64,nubi32,nubi64
# if $output doesn't have an extension, it's not an output file
# so use it for $flavour.
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
# supported flavours are o32,n32,64,nubi32,nubi64, default is o32
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : "o32";
if ($flavour =~ /64|n32/i) {
$PTR_LA="dla";
@@ -83,7 +90,6 @@ $pf = ($flavour =~ /nubi/i) ? $t0 : $t2;
$big_endian=(`echo MIPSEB | $ENV{CC} -E -`=~/MIPSEB/)?0:1 if ($ENV{CC});
for (@ARGV) { $output=$_ if (/\w[\w\-]*\.\w+$/); }
open STDOUT,">$output";
if (!defined($big_endian)) { $big_endian=(unpack('L',pack('N',1))==1); }
+6 -3
View File
@@ -32,9 +32,12 @@
#
# Special thanks to polarhome.com for providing HP-UX account.
$flavour = shift;
$output = shift;
open STDOUT,">$output";
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
$output and open STDOUT,">$output";
if ($flavour =~ /64/) {
$LEVEL ="2.0W";
+6 -3
View File
@@ -41,8 +41,10 @@
# block signals prior calling this routine. For the record, in 32-bit
# context R2 serves as TLS pointer, while in 64-bit context - R13.
$flavour=shift;
$output =shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour =~ /64/) {
$SIZE_T=8;
@@ -69,7 +71,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl";
open STDOUT,"| $^X $xlate $flavour $output" || die "can't call $xlate: $!";
open STDOUT,"| $^X $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
if ($output =~ /512/) {
$func="sha512_block_ppc";
+4 -2
View File
@@ -43,7 +43,10 @@
# remains z/Architecture specific. On z990 SHA256 was measured to
# perform 2.4x and SHA512 - 13x better than code generated by gcc 4.3.
$flavour = shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour =~ /3[12]/) {
$SIZE_T=4;
@@ -71,7 +74,6 @@ $tbl="%r13";
$T1="%r14";
$sp="%r15";
while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output";
if ($output =~ /512/) {
+4 -2
View File
@@ -56,8 +56,10 @@
# saturates at 11.5x single-process result on 8-core processor, or
# ~11/16GBps per 2.85GHz socket.
$output=pop;
open STDOUT,">$output";
# $output is the last argument if it looks like a file (it has an extension)
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$output and open STDOUT,">$output";
if ($output =~ /512/) {
$label="512";
+6 -4
View File
@@ -109,9 +109,10 @@
# below certain limit makes no difference/sense; to conserve
# space SHA256 XOP code path is therefore omitted;
$flavour = shift;
$output = shift;
if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
@@ -142,7 +143,8 @@ if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([
$shaext=1; ### set to zero if compiling for 1.0.1
$avx=1 if (!$shaext && $avx);
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\""
or die "can't call $xlate: $!";
*STDOUT=*OUT;
if ($output =~ /512/) {
+6 -3
View File
@@ -40,8 +40,10 @@
# SHA256 9.7 [15.8] 11.2 [12.5]
# SHA512 6.1 [10.3] 7.0 [7.9]
$flavour=shift;
$output =shift;
# $output is the last argument if it looks like a file (it has an extension)
# $flavour is the first argument if it doesn't look like a file
$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
if ($flavour =~ /64/) {
$SIZE_T=8;
@@ -64,7 +66,8 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or
die "can't locate ppc-xlate.pl";
open STDOUT,"| $^X $xlate $flavour $output" || die "can't call $xlate: $!";
open STDOUT,"| $^X $xlate $flavour \"$output\""
or die "can't call $xlate: $!";
if ($output =~ /512/) {
$bits=512;
+51 -54
View File
@@ -79,89 +79,86 @@ DEFINE[../../libcrypto]=$SHA1DEF $KECCAK1600DEF
SOURCE[../../providers/fips]= $COMMON
DEFINE[../../providers/fips]= $SHA1DEF $KECCAK1600DEF
GENERATE[sha1-586.s]=asm/sha1-586.pl \
$(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)
GENERATE[sha1-586.s]=asm/sha1-586.pl
DEPEND[sha1-586.s]=../perlasm/x86asm.pl
GENERATE[sha256-586.s]=asm/sha256-586.pl \
$(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)
GENERATE[sha256-586.s]=asm/sha256-586.pl
DEPEND[sha256-586.s]=../perlasm/x86asm.pl
GENERATE[sha512-586.s]=asm/sha512-586.pl \
$(PERLASM_SCHEME) $(LIB_CFLAGS) $(LIB_CPPFLAGS) $(PROCESSOR)
GENERATE[sha512-586.s]=asm/sha512-586.pl
DEPEND[sha512-586.s]=../perlasm/x86asm.pl
GENERATE[sha1-ia64.s]=asm/sha1-ia64.pl $(LIB_CFLAGS) $(LIB_CPPFLAGS)
GENERATE[sha256-ia64.s]=asm/sha512-ia64.pl $(LIB_CFLAGS) $(LIB_CPPFLAGS)
GENERATE[sha512-ia64.s]=asm/sha512-ia64.pl $(LIB_CFLAGS) $(LIB_CPPFLAGS)
GENERATE[sha1-ia64.s]=asm/sha1-ia64.pl
GENERATE[sha256-ia64.s]=asm/sha512-ia64.pl
GENERATE[sha512-ia64.s]=asm/sha512-ia64.pl
GENERATE[sha1-alpha.S]=asm/sha1-alpha.pl $(PERLASM_SCHEME)
GENERATE[sha1-alpha.S]=asm/sha1-alpha.pl
GENERATE[sha1-x86_64.s]=asm/sha1-x86_64.pl $(PERLASM_SCHEME)
GENERATE[sha1-mb-x86_64.s]=asm/sha1-mb-x86_64.pl $(PERLASM_SCHEME)
GENERATE[sha256-x86_64.s]=asm/sha512-x86_64.pl $(PERLASM_SCHEME)
GENERATE[sha256-mb-x86_64.s]=asm/sha256-mb-x86_64.pl $(PERLASM_SCHEME)
GENERATE[sha512-x86_64.s]=asm/sha512-x86_64.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-x86_64.s]=asm/keccak1600-x86_64.pl $(PERLASM_SCHEME)
GENERATE[sha1-x86_64.s]=asm/sha1-x86_64.pl
GENERATE[sha1-mb-x86_64.s]=asm/sha1-mb-x86_64.pl
GENERATE[sha256-x86_64.s]=asm/sha512-x86_64.pl
GENERATE[sha256-mb-x86_64.s]=asm/sha256-mb-x86_64.pl
GENERATE[sha512-x86_64.s]=asm/sha512-x86_64.pl
GENERATE[keccak1600-x86_64.s]=asm/keccak1600-x86_64.pl
GENERATE[sha1-sparcv9a.S]=asm/sha1-sparcv9a.pl $(PERLASM_SCHEME)
GENERATE[sha1-sparcv9.S]=asm/sha1-sparcv9.pl $(PERLASM_SCHEME)
GENERATE[sha1-sparcv9a.S]=asm/sha1-sparcv9a.pl
GENERATE[sha1-sparcv9.S]=asm/sha1-sparcv9.pl
INCLUDE[sha1-sparcv9.o]=..
GENERATE[sha256-sparcv9.S]=asm/sha512-sparcv9.pl $(PERLASM_SCHEME)
GENERATE[sha256-sparcv9.S]=asm/sha512-sparcv9.pl
INCLUDE[sha256-sparcv9.o]=..
GENERATE[sha512-sparcv9.S]=asm/sha512-sparcv9.pl $(PERLASM_SCHEME)
GENERATE[sha512-sparcv9.S]=asm/sha512-sparcv9.pl
INCLUDE[sha512-sparcv9.o]=..
GENERATE[sha1-ppc.s]=asm/sha1-ppc.pl $(PERLASM_SCHEME)
GENERATE[sha256-ppc.s]=asm/sha512-ppc.pl $(PERLASM_SCHEME)
GENERATE[sha512-ppc.s]=asm/sha512-ppc.pl $(PERLASM_SCHEME)
GENERATE[sha256p8-ppc.s]=asm/sha512p8-ppc.pl $(PERLASM_SCHEME)
GENERATE[sha512p8-ppc.s]=asm/sha512p8-ppc.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-ppc64.s]=asm/keccak1600-ppc64.pl $(PERLASM_SCHEME)
GENERATE[sha1-ppc.s]=asm/sha1-ppc.pl
GENERATE[sha256-ppc.s]=asm/sha512-ppc.pl
GENERATE[sha512-ppc.s]=asm/sha512-ppc.pl
GENERATE[sha256p8-ppc.s]=asm/sha512p8-ppc.pl
GENERATE[sha512p8-ppc.s]=asm/sha512p8-ppc.pl
GENERATE[keccak1600-ppc64.s]=asm/keccak1600-ppc64.pl
GENERATE[sha1-parisc.s]=asm/sha1-parisc.pl $(PERLASM_SCHEME)
GENERATE[sha256-parisc.s]=asm/sha512-parisc.pl $(PERLASM_SCHEME)
GENERATE[sha512-parisc.s]=asm/sha512-parisc.pl $(PERLASM_SCHEME)
GENERATE[sha1-parisc.s]=asm/sha1-parisc.pl
GENERATE[sha256-parisc.s]=asm/sha512-parisc.pl
GENERATE[sha512-parisc.s]=asm/sha512-parisc.pl
GENERATE[sha1-mips.S]=asm/sha1-mips.pl $(PERLASM_SCHEME)
GENERATE[sha1-mips.S]=asm/sha1-mips.pl
INCLUDE[sha1-mips.o]=..
GENERATE[sha256-mips.S]=asm/sha512-mips.pl $(PERLASM_SCHEME)
GENERATE[sha256-mips.S]=asm/sha512-mips.pl
INCLUDE[sha256-mips.o]=..
GENERATE[sha512-mips.S]=asm/sha512-mips.pl $(PERLASM_SCHEME)
GENERATE[sha512-mips.S]=asm/sha512-mips.pl
INCLUDE[sha512-mips.o]=..
GENERATE[sha1-armv4-large.S]=asm/sha1-armv4-large.pl $(PERLASM_SCHEME)
GENERATE[sha1-armv4-large.S]=asm/sha1-armv4-large.pl
INCLUDE[sha1-armv4-large.o]=..
GENERATE[sha256-armv4.S]=asm/sha256-armv4.pl $(PERLASM_SCHEME)
GENERATE[sha256-armv4.S]=asm/sha256-armv4.pl
INCLUDE[sha256-armv4.o]=..
GENERATE[sha512-armv4.S]=asm/sha512-armv4.pl $(PERLASM_SCHEME)
GENERATE[sha512-armv4.S]=asm/sha512-armv4.pl
INCLUDE[sha512-armv4.o]=..
GENERATE[keccak1600-armv4.S]=asm/keccak1600-armv4.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-armv4.S]=asm/keccak1600-armv4.pl
INCLUDE[keccak1600-armv4.o]=..
GENERATE[sha1-armv8.S]=asm/sha1-armv8.pl $(PERLASM_SCHEME)
GENERATE[sha1-armv8.S]=asm/sha1-armv8.pl
INCLUDE[sha1-armv8.o]=..
GENERATE[sha256-armv8.S]=asm/sha512-armv8.pl $(PERLASM_SCHEME)
GENERATE[sha256-armv8.S]=asm/sha512-armv8.pl
INCLUDE[sha256-armv8.o]=..
GENERATE[sha512-armv8.S]=asm/sha512-armv8.pl $(PERLASM_SCHEME)
GENERATE[sha512-armv8.S]=asm/sha512-armv8.pl
INCLUDE[sha512-armv8.o]=..
GENERATE[keccak1600-armv8.S]=asm/keccak1600-armv8.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-armv8.S]=asm/keccak1600-armv8.pl
GENERATE[sha1-s390x.S]=asm/sha1-s390x.pl $(PERLASM_SCHEME)
GENERATE[sha1-s390x.S]=asm/sha1-s390x.pl
INCLUDE[sha1-s390x.o]=..
GENERATE[sha256-s390x.S]=asm/sha512-s390x.pl $(PERLASM_SCHEME)
GENERATE[sha256-s390x.S]=asm/sha512-s390x.pl
INCLUDE[sha256-s390x.o]=..
GENERATE[sha512-s390x.S]=asm/sha512-s390x.pl $(PERLASM_SCHEME)
GENERATE[sha512-s390x.S]=asm/sha512-s390x.pl
INCLUDE[sha512-s390x.o]=..
GENERATE[keccak1600-s390x.S]=asm/keccak1600-s390x.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-s390x.S]=asm/keccak1600-s390x.pl
GENERATE[sha1-c64xplus.S]=asm/sha1-c64xplus.pl $(PERLASM_SCHEME)
GENERATE[sha256-c64xplus.S]=asm/sha256-c64xplus.pl $(PERLASM_SCHEME)
GENERATE[sha512-c64xplus.S]=asm/sha512-c64xplus.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-c64x.S]=asm/keccak1600-c64x.pl $(PERLASM_SCHEME)
GENERATE[sha1-c64xplus.S]=asm/sha1-c64xplus.pl
GENERATE[sha256-c64xplus.S]=asm/sha256-c64xplus.pl
GENERATE[sha512-c64xplus.S]=asm/sha512-c64xplus.pl
GENERATE[keccak1600-c64x.S]=asm/keccak1600-c64x.pl
# These are not yet used
GENERATE[keccak1600-avx2.S]=asm/keccak1600-avx2.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-avx512.S]=asm/keccak1600-avx512.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-avx512vl.S]=asm/keccak1600-avx512vl.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-mmx.S]=asm/keccak1600-mmx.pl $(PERLASM_SCHEME)
GENERATE[keccak1600p8-ppc.S]=asm/keccak1600p8-ppc.pl $(PERLASM_SCHEME)
GENERATE[sha1-thumb.S]=asm/sha1-thumb.pl $(PERLASM_SCHEME)
GENERATE[keccak1600-avx2.S]=asm/keccak1600-avx2.pl
GENERATE[keccak1600-avx512.S]=asm/keccak1600-avx512.pl
GENERATE[keccak1600-avx512vl.S]=asm/keccak1600-avx512vl.pl
GENERATE[keccak1600-mmx.S]=asm/keccak1600-mmx.pl
GENERATE[keccak1600p8-ppc.S]=asm/keccak1600p8-ppc.pl
GENERATE[sha1-thumb.S]=asm/sha1-thumb.pl
+3
View File
@@ -89,6 +89,9 @@ int sha3_final(unsigned char *md, KECCAK1600_CTX *ctx)
size_t bsz = ctx->block_size;
size_t num = ctx->bufsz;
if (ctx->md_size == 0)
return 1;
/*
* Pad the data with 10*1. Note that |num| can be |bsz - 1|
* in which case both byte operations below are performed on