[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Thu May 11 21:00:51 UTC 2017
The branch master has been updated
via e195c8a2562baef0fdcae330556ed60b1e922b0e (commit)
from 07fbdfe94d65b125a21488273d70eecf62fec447 (commit)
- Log -----------------------------------------------------------------
commit e195c8a2562baef0fdcae330556ed60b1e922b0e
Author: David Benjamin <davidben at google.com>
Date: Wed May 10 14:24:56 2017 -0400
Remove filename argument to x86 asm_init.
The assembler already knows the actual path to the generated file and,
in other perlasm architectures, is left to manage debug symbols itself.
Notably, in OpenSSL 1.1.x's new build system, which allows a separate
build directory, converting .pl to .s as the scripts currently do result
in the wrong paths.
This also avoids inconsistencies from some of the files using $0 and
some passing in the filename.
Reviewed-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Andy Polyakov <appro at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3431)
-----------------------------------------------------------------------
Summary of changes:
crypto/aes/asm/aes-586.pl | 2 +-
crypto/aes/asm/aesni-x86.pl | 2 +-
crypto/aes/asm/vpaes-x86.pl | 2 +-
crypto/bf/asm/bf-586.pl | 2 +-
crypto/bn/asm/bn-586.pl | 2 +-
crypto/bn/asm/co-586.pl | 2 +-
crypto/bn/asm/via-mont.pl | 2 +-
crypto/bn/asm/x86-gf2m.pl | 2 +-
crypto/bn/asm/x86-mont.pl | 2 +-
crypto/bn/asm/x86.pl | 2 +-
crypto/camellia/asm/cmll-x86.pl | 2 +-
crypto/cast/asm/cast-586.pl | 2 +-
crypto/chacha/asm/chacha-x86.pl | 2 +-
crypto/des/asm/crypt586.pl | 2 +-
crypto/des/asm/des-586.pl | 2 +-
crypto/ec/asm/ecp_nistz256-x86.pl | 2 +-
crypto/md5/asm/md5-586.pl | 2 +-
crypto/modes/asm/ghash-x86.pl | 2 +-
crypto/perlasm/README | 4 ++--
crypto/perlasm/x86asm.pl | 8 +++-----
crypto/perlasm/x86gas.pl | 2 +-
crypto/perlasm/x86masm.pl | 1 -
crypto/poly1305/asm/poly1305-x86.pl | 2 +-
crypto/rc4/asm/rc4-586.pl | 2 +-
crypto/rc5/asm/rc5-586.pl | 2 +-
crypto/ripemd/asm/rmd-586.pl | 2 +-
crypto/sha/asm/sha1-586.pl | 2 +-
crypto/sha/asm/sha256-586.pl | 2 +-
crypto/sha/asm/sha512-586.pl | 2 +-
crypto/whrlpool/asm/wp-mmx.pl | 2 +-
crypto/x86cpuid.pl | 2 +-
engines/asm/e_padlock-x86.pl | 2 +-
ms/uplink-x86.pl | 2 +-
33 files changed, 35 insertions(+), 38 deletions(-)
diff --git a/crypto/aes/asm/aes-586.pl b/crypto/aes/asm/aes-586.pl
index 61bdce8..51fde64 100755
--- a/crypto/aes/asm/aes-586.pl
+++ b/crypto/aes/asm/aes-586.pl
@@ -202,7 +202,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/aes/asm/aesni-x86.pl b/crypto/aes/asm/aesni-x86.pl
index b1eca63..81c1cd6 100644
--- a/crypto/aes/asm/aesni-x86.pl
+++ b/crypto/aes/asm/aesni-x86.pl
@@ -80,7 +80,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/aes/asm/vpaes-x86.pl b/crypto/aes/asm/vpaes-x86.pl
index d9157fa..7d57edc 100644
--- a/crypto/aes/asm/vpaes-x86.pl
+++ b/crypto/aes/asm/vpaes-x86.pl
@@ -62,7 +62,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/bf/asm/bf-586.pl b/crypto/bf/asm/bf-586.pl
index ebc24f4..4e913ae 100644
--- a/crypto/bf/asm/bf-586.pl
+++ b/crypto/bf/asm/bf-586.pl
@@ -15,7 +15,7 @@ require "cbc.pl";
$output = pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"bf-586.pl",$ARGV[$#ARGV] eq "386");
+&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386");
$BF_ROUNDS=16;
$BF_OFF=($BF_ROUNDS+2)*4;
diff --git a/crypto/bn/asm/bn-586.pl b/crypto/bn/asm/bn-586.pl
index 1350bcd..58effc8 100644
--- a/crypto/bn/asm/bn-586.pl
+++ b/crypto/bn/asm/bn-586.pl
@@ -14,7 +14,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/bn/asm/co-586.pl b/crypto/bn/asm/co-586.pl
index 6f34c37..97f5e3a 100644
--- a/crypto/bn/asm/co-586.pl
+++ b/crypto/bn/asm/co-586.pl
@@ -13,7 +13,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/bn/asm/via-mont.pl b/crypto/bn/asm/via-mont.pl
index 558501c..94775d3 100644
--- a/crypto/bn/asm/via-mont.pl
+++ b/crypto/bn/asm/via-mont.pl
@@ -91,7 +91,7 @@ require "x86asm.pl";
$output = pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"via-mont.pl");
+&asm_init($ARGV[0]);
# int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np,const BN_ULONG *n0, int num);
$func="bn_mul_mont_padlock";
diff --git a/crypto/bn/asm/x86-gf2m.pl b/crypto/bn/asm/x86-gf2m.pl
index f464368..562f539 100644
--- a/crypto/bn/asm/x86-gf2m.pl
+++ b/crypto/bn/asm/x86-gf2m.pl
@@ -46,7 +46,7 @@ require "x86asm.pl";
$output = pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],$0,$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/bn/asm/x86-mont.pl b/crypto/bn/asm/x86-mont.pl
index a8b402d..9c495ca 100755
--- a/crypto/bn/asm/x86-mont.pl
+++ b/crypto/bn/asm/x86-mont.pl
@@ -40,7 +40,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/bn/asm/x86.pl b/crypto/bn/asm/x86.pl
index d57571d..274099f 100644
--- a/crypto/bn/asm/x86.pl
+++ b/crypto/bn/asm/x86.pl
@@ -20,7 +20,7 @@ require("x86/comba.pl");
$output = pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],$0);
+&asm_init($ARGV[0]);
&bn_mul_add_words("bn_mul_add_words");
&bn_mul_words("bn_mul_words");
diff --git a/crypto/camellia/asm/cmll-x86.pl b/crypto/camellia/asm/cmll-x86.pl
index 26afad8..55af9b4 100644
--- a/crypto/camellia/asm/cmll-x86.pl
+++ b/crypto/camellia/asm/cmll-x86.pl
@@ -52,7 +52,7 @@ $OPENSSL=1;
$output = pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"cmll-586.pl",$ARGV[$#ARGV] eq "386");
+&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386");
@T=("eax","ebx","ecx","edx");
$idx="esi";
diff --git a/crypto/cast/asm/cast-586.pl b/crypto/cast/asm/cast-586.pl
index 1fc2b1a..d5d3896 100644
--- a/crypto/cast/asm/cast-586.pl
+++ b/crypto/cast/asm/cast-586.pl
@@ -21,7 +21,7 @@ require "cbc.pl";
$output=pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"cast-586.pl",$ARGV[$#ARGV] eq "386");
+&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386");
$CAST_ROUNDS=16;
$L="edi";
diff --git a/crypto/chacha/asm/chacha-x86.pl b/crypto/chacha/asm/chacha-x86.pl
index d606db8..e177a22 100755
--- a/crypto/chacha/asm/chacha-x86.pl
+++ b/crypto/chacha/asm/chacha-x86.pl
@@ -43,7 +43,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=0;
for (@ARGV) { $xmm=1 if (/-DOPENSSL_IA32_SSE2/); }
diff --git a/crypto/des/asm/crypt586.pl b/crypto/des/asm/crypt586.pl
index ad89eeb..3914047 100644
--- a/crypto/des/asm/crypt586.pl
+++ b/crypto/des/asm/crypt586.pl
@@ -16,7 +16,7 @@ require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"crypt586.pl");
+&asm_init($ARGV[0]);
$L="edi";
$R="esi";
diff --git a/crypto/des/asm/des-586.pl b/crypto/des/asm/des-586.pl
index d45102c..4ce889c 100644
--- a/crypto/des/asm/des-586.pl
+++ b/crypto/des/asm/des-586.pl
@@ -23,7 +23,7 @@ require "desboth.pl";
$output=pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"des-586.pl");
+&asm_init($ARGV[0]);
$L="edi";
$R="esi";
diff --git a/crypto/ec/asm/ecp_nistz256-x86.pl b/crypto/ec/asm/ecp_nistz256-x86.pl
index f637c84..a89a9f9 100755
--- a/crypto/ec/asm/ecp_nistz256-x86.pl
+++ b/crypto/ec/asm/ecp_nistz256-x86.pl
@@ -45,7 +45,7 @@ require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"ecp_nistz256-x86.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/md5/asm/md5-586.pl b/crypto/md5/asm/md5-586.pl
index de5758f..15e1486 100644
--- a/crypto/md5/asm/md5-586.pl
+++ b/crypto/md5/asm/md5-586.pl
@@ -21,7 +21,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/modes/asm/ghash-x86.pl b/crypto/modes/asm/ghash-x86.pl
index 66307ae..5765e3f 100644
--- a/crypto/modes/asm/ghash-x86.pl
+++ b/crypto/modes/asm/ghash-x86.pl
@@ -139,7 +139,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/perlasm/README b/crypto/perlasm/README
index e90bd8e..3177c37 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 1ff46c9..fef94b3 100644
--- a/crypto/perlasm/x86asm.pl
+++ b/crypto/perlasm/x86asm.pl
@@ -8,7 +8,7 @@
# require 'x86asm.pl';
-# &asm_init(<flavor>,"des-586.pl"[,$i386only]);
+# &asm_init(<flavor>[,$i386only]);
# &function_begin("foo");
# ...
# &function_end("foo");
@@ -259,9 +259,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;
@@ -301,8 +300,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/x86gas.pl b/crypto/perlasm/x86gas.pl
index 2c8fce0..5c7ea38 100644
--- a/crypto/perlasm/x86gas.pl
+++ b/crypto/perlasm/x86gas.pl
@@ -104,7 +104,7 @@ sub ::BC { @_; }
sub ::DWC { @_; }
sub ::file
-{ push(@out,".file\t\"$_[0].s\"\n.text\n"); }
+{ push(@out,".text\n"); }
sub ::function_begin_B
{ my $func=shift;
diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl
index d352f47..dffee76 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
diff --git a/crypto/poly1305/asm/poly1305-x86.pl b/crypto/poly1305/asm/poly1305-x86.pl
index 9db38b5..b6f09bf 100755
--- a/crypto/poly1305/asm/poly1305-x86.pl
+++ b/crypto/poly1305/asm/poly1305-x86.pl
@@ -50,7 +50,7 @@ require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"poly1305-x86.pl",$ARGV[$#ARGV] eq "386");
+&asm_init($ARGV[0],$ARGV[$#ARGV] eq "386");
$sse2=$avx=0;
for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
diff --git a/crypto/rc4/asm/rc4-586.pl b/crypto/rc4/asm/rc4-586.pl
index 7d6f97c..ab16a97 100644
--- a/crypto/rc4/asm/rc4-586.pl
+++ b/crypto/rc4/asm/rc4-586.pl
@@ -73,7 +73,7 @@ require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"rc4-586.pl",$x86only = $ARGV[$#ARGV] eq "386");
+&asm_init($ARGV[0],$x86only = $ARGV[$#ARGV] eq "386");
$xx="eax";
$yy="ebx";
diff --git a/crypto/rc5/asm/rc5-586.pl b/crypto/rc5/asm/rc5-586.pl
index e3e1c64..e58a98b 100644
--- a/crypto/rc5/asm/rc5-586.pl
+++ b/crypto/rc5/asm/rc5-586.pl
@@ -15,7 +15,7 @@ require "cbc.pl";
$output = pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"rc5-586.pl");
+&asm_init($ARGV[0]);
$RC5_MAX_ROUNDS=16;
$RC5_32_OFF=($RC5_MAX_ROUNDS+2)*4;
diff --git a/crypto/ripemd/asm/rmd-586.pl b/crypto/ripemd/asm/rmd-586.pl
index f19fdc9..72bcbcc 100644
--- a/crypto/ripemd/asm/rmd-586.pl
+++ b/crypto/ripemd/asm/rmd-586.pl
@@ -19,7 +19,7 @@ require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],$0);
+&asm_init($ARGV[0]);
$A="ecx";
$B="esi";
diff --git a/crypto/sha/asm/sha1-586.pl b/crypto/sha/asm/sha1-586.pl
index 59e1155..8225e3a 100644
--- a/crypto/sha/asm/sha1-586.pl
+++ b/crypto/sha/asm/sha1-586.pl
@@ -127,7 +127,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/sha/asm/sha256-586.pl b/crypto/sha/asm/sha256-586.pl
index 705de2a..bc25b2d 100644
--- a/crypto/sha/asm/sha256-586.pl
+++ b/crypto/sha/asm/sha256-586.pl
@@ -76,7 +76,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/sha/asm/sha512-586.pl b/crypto/sha/asm/sha512-586.pl
index 9401777..35006e8 100644
--- a/crypto/sha/asm/sha512-586.pl
+++ b/crypto/sha/asm/sha512-586.pl
@@ -62,7 +62,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/whrlpool/asm/wp-mmx.pl b/crypto/whrlpool/asm/wp-mmx.pl
index d628d56..468cae8 100644
--- a/crypto/whrlpool/asm/wp-mmx.pl
+++ b/crypto/whrlpool/asm/wp-mmx.pl
@@ -59,7 +59,7 @@ require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"wp-mmx.pl");
+&asm_init($ARGV[0]);
sub L() { &data_byte(@_); }
sub LL()
diff --git a/crypto/x86cpuid.pl b/crypto/x86cpuid.pl
index 9d2f34e..1266d76 100644
--- a/crypto/x86cpuid.pl
+++ b/crypto/x86cpuid.pl
@@ -14,7 +14,7 @@ $output = pop;
open OUT,">$output";
*STDOUT=*OUT;
-&asm_init($ARGV[0],"x86cpuid");
+&asm_init($ARGV[0]);
for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); }
diff --git a/engines/asm/e_padlock-x86.pl b/engines/asm/e_padlock-x86.pl
index bf6b312..c4129e8 100644
--- a/engines/asm/e_padlock-x86.pl
+++ b/engines/asm/e_padlock-x86.pl
@@ -45,7 +45,7 @@ require "x86asm.pl";
$output=pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],$0);
+&asm_init($ARGV[0]);
%PADLOCK_PREFETCH=(ecb=>128, cbc=>64); # prefetch errata
$PADLOCK_CHUNK=512; # Must be a power of 2 larger than 16
diff --git a/ms/uplink-x86.pl b/ms/uplink-x86.pl
index e25668e..440bf7d 100755
--- a/ms/uplink-x86.pl
+++ b/ms/uplink-x86.pl
@@ -15,7 +15,7 @@ require "uplink-common.pl";
$output = pop;
open STDOUT,">$output";
-&asm_init($ARGV[0],"uplink-x86");
+&asm_init($ARGV[0]);
&external_label("OPENSSL_Uplink");
&public_label("OPENSSL_UplinkTable");
More information about the openssl-commits
mailing list