From 583c12ea974de502c99f336e6f8f20cfbffe471e Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 11 May 2017 18:19:53 -0400 Subject: [PATCH] Remove filename argument to x86 asm_init. 43e5a26b535f8eeee33c3106de786aea4f5023c8 removed the .file directive from x86asm.pl. This removes the parameter from asm_init altogether. See also upstream's e195c8a2562baef0fdcae330556ed60b1e922b0e. Change-Id: I65761bc962d09f9210661a38ecf6df23eae8743d Reviewed-on: https://boringssl-review.googlesource.com/16247 Reviewed-by: Steven Valdez Commit-Queue: Steven Valdez CQ-Verified: CQ bot account: commit-bot@chromium.org --- crypto/chacha/asm/chacha-x86.pl | 2 +- crypto/fipsmodule/aes/asm/aes-586.pl | 2 +- crypto/fipsmodule/aes/asm/aesni-x86.pl | 2 +- crypto/fipsmodule/aes/asm/vpaes-x86.pl | 2 +- crypto/fipsmodule/bn/asm/bn-586.pl | 2 +- crypto/fipsmodule/bn/asm/co-586.pl | 2 +- crypto/fipsmodule/bn/asm/x86-mont.pl | 2 +- crypto/fipsmodule/md5/asm/md5-586.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-x86.pl | 2 +- crypto/fipsmodule/sha/asm/sha1-586.pl | 2 +- crypto/fipsmodule/sha/asm/sha256-586.pl | 2 +- crypto/fipsmodule/sha/asm/sha512-586.pl | 2 +- crypto/perlasm/readme | 4 ++-- crypto/perlasm/x86asm.pl | 8 +++----- crypto/perlasm/x86masm.pl | 1 - 15 files changed, 17 insertions(+), 20 deletions(-) diff --git a/crypto/chacha/asm/chacha-x86.pl b/crypto/chacha/asm/chacha-x86.pl index f8bbb76d..a776b267 100755 --- a/crypto/chacha/asm/chacha-x86.pl +++ b/crypto/chacha/asm/chacha-x86.pl @@ -38,7 +38,7 @@ require "x86asm.pl"; $output=pop; open STDOUT,">$output"; -&asm_init($ARGV[0],"chacha-x86.pl",$ARGV[$#ARGV] eq "386"); +&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386"); $xmm=$ymm=1; $gasver=999; # enable everything diff --git a/crypto/fipsmodule/aes/asm/aes-586.pl b/crypto/fipsmodule/aes/asm/aes-586.pl index a2c6eb54..f015762f 100755 --- a/crypto/fipsmodule/aes/asm/aes-586.pl +++ b/crypto/fipsmodule/aes/asm/aes-586.pl @@ -195,7 +195,7 @@ $output = pop; open OUT,">$output"; *STDOUT=*OUT; -&asm_init($ARGV[0],"aes-586.pl",$x86only = $ARGV[$#ARGV] eq "386"); +&asm_init($ARGV[0],$x86only = $ARGV[$#ARGV] eq "386"); &static_label("AES_Te"); &static_label("AES_Td"); diff --git a/crypto/fipsmodule/aes/asm/aesni-x86.pl b/crypto/fipsmodule/aes/asm/aesni-x86.pl index 66af51b1..ca4e57c9 100644 --- a/crypto/fipsmodule/aes/asm/aesni-x86.pl +++ b/crypto/fipsmodule/aes/asm/aesni-x86.pl @@ -69,7 +69,7 @@ $output = pop; open OUT,">$output"; *STDOUT=*OUT; -&asm_init($ARGV[0],$0); +&asm_init($ARGV[0]); &external_label("OPENSSL_ia32cap_P"); &static_label("key_const"); diff --git a/crypto/fipsmodule/aes/asm/vpaes-x86.pl b/crypto/fipsmodule/aes/asm/vpaes-x86.pl index 58b90a3d..5a5e1f2e 100644 --- a/crypto/fipsmodule/aes/asm/vpaes-x86.pl +++ b/crypto/fipsmodule/aes/asm/vpaes-x86.pl @@ -55,7 +55,7 @@ $output = pop; open OUT,">$output"; *STDOUT=*OUT; -&asm_init($ARGV[0],"vpaes-x86.pl",$x86only = $ARGV[$#ARGV] eq "386"); +&asm_init($ARGV[0],$x86only = $ARGV[$#ARGV] eq "386"); $PREFIX="vpaes"; diff --git a/crypto/fipsmodule/bn/asm/bn-586.pl b/crypto/fipsmodule/bn/asm/bn-586.pl index f46923c5..2a202fcd 100644 --- a/crypto/fipsmodule/bn/asm/bn-586.pl +++ b/crypto/fipsmodule/bn/asm/bn-586.pl @@ -7,7 +7,7 @@ require "x86asm.pl"; $output = pop; open STDOUT,">$output"; -&asm_init($ARGV[0],$0); +&asm_init($ARGV[0]); $sse2=0; for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } diff --git a/crypto/fipsmodule/bn/asm/co-586.pl b/crypto/fipsmodule/bn/asm/co-586.pl index d1bc8f03..10167ae9 100644 --- a/crypto/fipsmodule/bn/asm/co-586.pl +++ b/crypto/fipsmodule/bn/asm/co-586.pl @@ -7,7 +7,7 @@ require "x86asm.pl"; $output = pop; open STDOUT,">$output"; -&asm_init($ARGV[0],$0); +&asm_init($ARGV[0]); &bn_mul_comba("bn_mul_comba8",8); &bn_mul_comba("bn_mul_comba4",4); diff --git a/crypto/fipsmodule/bn/asm/x86-mont.pl b/crypto/fipsmodule/bn/asm/x86-mont.pl index f0f82433..dfdf56ea 100755 --- a/crypto/fipsmodule/bn/asm/x86-mont.pl +++ b/crypto/fipsmodule/bn/asm/x86-mont.pl @@ -33,7 +33,7 @@ require "x86asm.pl"; $output = pop; open STDOUT,">$output"; -&asm_init($ARGV[0],$0); +&asm_init($ARGV[0]); $sse2=0; for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } diff --git a/crypto/fipsmodule/md5/asm/md5-586.pl b/crypto/fipsmodule/md5/asm/md5-586.pl index 4ba08ecb..ded94425 100644 --- a/crypto/fipsmodule/md5/asm/md5-586.pl +++ b/crypto/fipsmodule/md5/asm/md5-586.pl @@ -14,7 +14,7 @@ require "x86asm.pl"; $output=pop; open STDOUT,">$output"; -&asm_init($ARGV[0],$0); +&asm_init($ARGV[0]); $A="eax"; $B="ebx"; diff --git a/crypto/fipsmodule/modes/asm/ghash-x86.pl b/crypto/fipsmodule/modes/asm/ghash-x86.pl index dab88ef4..5c3aead9 100644 --- a/crypto/fipsmodule/modes/asm/ghash-x86.pl +++ b/crypto/fipsmodule/modes/asm/ghash-x86.pl @@ -132,7 +132,7 @@ require "x86asm.pl"; $output=pop; open STDOUT,">$output"; -&asm_init($ARGV[0],"ghash-x86.pl",$x86only = $ARGV[$#ARGV] eq "386"); +&asm_init($ARGV[0],$x86only = $ARGV[$#ARGV] eq "386"); $sse2=0; for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } diff --git a/crypto/fipsmodule/sha/asm/sha1-586.pl b/crypto/fipsmodule/sha/asm/sha1-586.pl index 4221e276..d0f6b8f7 100644 --- a/crypto/fipsmodule/sha/asm/sha1-586.pl +++ b/crypto/fipsmodule/sha/asm/sha1-586.pl @@ -120,7 +120,7 @@ require "x86asm.pl"; $output=pop; open STDOUT,">$output"; -&asm_init($ARGV[0],"sha1-586.pl",$ARGV[$#ARGV] eq "386"); +&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386"); $xmm=$ymm=0; for (@ARGV) { $xmm=1 if (/-DOPENSSL_IA32_SSE2/); } diff --git a/crypto/fipsmodule/sha/asm/sha256-586.pl b/crypto/fipsmodule/sha/asm/sha256-586.pl index 834d00fa..644683e1 100644 --- a/crypto/fipsmodule/sha/asm/sha256-586.pl +++ b/crypto/fipsmodule/sha/asm/sha256-586.pl @@ -69,7 +69,7 @@ require "x86asm.pl"; $output=pop; open STDOUT,">$output"; -&asm_init($ARGV[0],"sha512-586.pl",$ARGV[$#ARGV] eq "386"); +&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386"); $xmm=$avx=0; for (@ARGV) { $xmm=1 if (/-DOPENSSL_IA32_SSE2/); } diff --git a/crypto/fipsmodule/sha/asm/sha512-586.pl b/crypto/fipsmodule/sha/asm/sha512-586.pl index a757ee71..cd12a739 100644 --- a/crypto/fipsmodule/sha/asm/sha512-586.pl +++ b/crypto/fipsmodule/sha/asm/sha512-586.pl @@ -55,7 +55,7 @@ require "x86asm.pl"; $output=pop; open STDOUT,">$output"; -&asm_init($ARGV[0],"sha512-586.pl",$ARGV[$#ARGV] eq "386"); +&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386"); $sse2=0; for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } diff --git a/crypto/perlasm/readme b/crypto/perlasm/readme index 57d2083c..4fb6fa25 100644 --- a/crypto/perlasm/readme +++ b/crypto/perlasm/readme @@ -9,7 +9,7 @@ require "x86asm.pl"; The first thing we do is setup the file and type of assembler -&asm_init($ARGV[0],$0); +&asm_init($ARGV[0]); The first argument is the 'type'. Currently 'cpp', 'sol', 'a.out', 'elf' or 'win32'. @@ -62,7 +62,7 @@ So a very simple version of this function could be coded as push(@INC,"perlasm","../../perlasm"); require "x86asm.pl"; - &asm_init($ARGV[0],"cacl.pl"); + &asm_init($ARGV[0]); &external_label("other"); diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl index dc10d990..6a2755df 100644 --- a/crypto/perlasm/x86asm.pl +++ b/crypto/perlasm/x86asm.pl @@ -8,7 +8,7 @@ # require 'x86asm.pl'; -# &asm_init(,"des-586.pl"[,$i386only]); +# &asm_init([,$i386only]); # &function_begin("foo"); # ... # &function_end("foo"); @@ -261,9 +261,8 @@ sub ::asm_finish } sub ::asm_init -{ my ($type,$fn,$cpu)=@_; +{ my ($type,$cpu)=@_; - $filename=$fn; $i386=$cpu; $elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=$android=0; @@ -303,8 +302,7 @@ EOF $pic=0; for (@ARGV) { $pic=1 if (/\-[fK]PIC/i); } - $filename =~ s/\.pl$//; - &file($filename); + &file(); } sub ::hidden {} diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl index d352f470..dffee762 100644 --- a/crypto/perlasm/x86masm.pl +++ b/crypto/perlasm/x86masm.pl @@ -85,7 +85,6 @@ sub ::DWC { "@_"; } sub ::file { my $tmp=<<___; -TITLE $_[0].asm IF \@Version LT 800 ECHO MASM version 8.00 or later is strongly recommended. ENDIF