diff options
Diffstat (limited to 'crypto/openssl/crypto/md5/asm/md5-x86_64.pl')
-rwxr-xr-x | crypto/openssl/crypto/md5/asm/md5-x86_64.pl | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/crypto/openssl/crypto/md5/asm/md5-x86_64.pl b/crypto/openssl/crypto/md5/asm/md5-x86_64.pl index c6a172d448c6..6625fb7d08aa 100755 --- a/crypto/openssl/crypto/md5/asm/md5-x86_64.pl +++ b/crypto/openssl/crypto/md5/asm/md5-x86_64.pl @@ -2,7 +2,7 @@ # Author: Marc Bevand <bevand_m (at) epita.fr> # Copyright 2005-2020 The OpenSSL Project Authors. All Rights Reserved. # -# Licensed under the OpenSSL license (the "License"). You may not use +# Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html @@ -119,9 +119,10 @@ EOF } no warnings qw(uninitialized); -my $flavour = shift; -my $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 +my $output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef; +my $flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef; my $win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/); @@ -130,16 +131,17 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate; ( $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; $code .= <<EOF; .text .align 16 -.globl md5_block_asm_data_order -.type md5_block_asm_data_order,\@function,3 -md5_block_asm_data_order: +.globl ossl_md5_block_asm_data_order +.type ossl_md5_block_asm_data_order,\@function,3 +ossl_md5_block_asm_data_order: .cfi_startproc push %rbp .cfi_push %rbp @@ -281,7 +283,7 @@ $code .= <<EOF; .Lepilogue: ret .cfi_endproc -.size md5_block_asm_data_order,.-md5_block_asm_data_order +.size ossl_md5_block_asm_data_order,.-ossl_md5_block_asm_data_order EOF # EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame, @@ -376,13 +378,13 @@ se_handler: .section .pdata .align 4 - .rva .LSEH_begin_md5_block_asm_data_order - .rva .LSEH_end_md5_block_asm_data_order - .rva .LSEH_info_md5_block_asm_data_order + .rva .LSEH_begin_ossl_md5_block_asm_data_order + .rva .LSEH_end_ossl_md5_block_asm_data_order + .rva .LSEH_info_ossl_md5_block_asm_data_order .section .xdata .align 8 -.LSEH_info_md5_block_asm_data_order: +.LSEH_info_ossl_md5_block_asm_data_order: .byte 9,0,0,0 .rva se_handler ___ |