diff options
Diffstat (limited to 'crypto/sha/asm/keccak1600p8-ppc.pl')
-rwxr-xr-x | crypto/sha/asm/keccak1600p8-ppc.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/sha/asm/keccak1600p8-ppc.pl b/crypto/sha/asm/keccak1600p8-ppc.pl index 9a97cfdbf8..0fdc23f689 100755 --- a/crypto/sha/asm/keccak1600p8-ppc.pl +++ b/crypto/sha/asm/keccak1600p8-ppc.pl @@ -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 |