Browse Source

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@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3431)
master
David Benjamin 5 years ago
committed by Rich Salz
parent
commit
e195c8a256
33 changed files with 35 additions and 38 deletions
  1. +1
    -1
      crypto/aes/asm/aes-586.pl
  2. +1
    -1
      crypto/aes/asm/aesni-x86.pl
  3. +1
    -1
      crypto/aes/asm/vpaes-x86.pl
  4. +1
    -1
      crypto/bf/asm/bf-586.pl
  5. +1
    -1
      crypto/bn/asm/bn-586.pl
  6. +1
    -1
      crypto/bn/asm/co-586.pl
  7. +1
    -1
      crypto/bn/asm/via-mont.pl
  8. +1
    -1
      crypto/bn/asm/x86-gf2m.pl
  9. +1
    -1
      crypto/bn/asm/x86-mont.pl
  10. +1
    -1
      crypto/bn/asm/x86.pl
  11. +1
    -1
      crypto/camellia/asm/cmll-x86.pl
  12. +1
    -1
      crypto/cast/asm/cast-586.pl
  13. +1
    -1
      crypto/chacha/asm/chacha-x86.pl
  14. +1
    -1
      crypto/des/asm/crypt586.pl
  15. +1
    -1
      crypto/des/asm/des-586.pl
  16. +1
    -1
      crypto/ec/asm/ecp_nistz256-x86.pl
  17. +1
    -1
      crypto/md5/asm/md5-586.pl
  18. +1
    -1
      crypto/modes/asm/ghash-x86.pl
  19. +2
    -2
      crypto/perlasm/README
  20. +3
    -5
      crypto/perlasm/x86asm.pl
  21. +1
    -1
      crypto/perlasm/x86gas.pl
  22. +0
    -1
      crypto/perlasm/x86masm.pl
  23. +1
    -1
      crypto/poly1305/asm/poly1305-x86.pl
  24. +1
    -1
      crypto/rc4/asm/rc4-586.pl
  25. +1
    -1
      crypto/rc5/asm/rc5-586.pl
  26. +1
    -1
      crypto/ripemd/asm/rmd-586.pl
  27. +1
    -1
      crypto/sha/asm/sha1-586.pl
  28. +1
    -1
      crypto/sha/asm/sha256-586.pl
  29. +1
    -1
      crypto/sha/asm/sha512-586.pl
  30. +1
    -1
      crypto/whrlpool/asm/wp-mmx.pl
  31. +1
    -1
      crypto/x86cpuid.pl
  32. +1
    -1
      engines/asm/e_padlock-x86.pl
  33. +1
    -1
      ms/uplink-x86.pl

+ 1
- 1
crypto/aes/asm/aes-586.pl View File

@ -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");


+ 1
- 1
crypto/aes/asm/aesni-x86.pl View File

@ -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");


+ 1
- 1
crypto/aes/asm/vpaes-x86.pl View File

@ -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";


+ 1
- 1
crypto/bf/asm/bf-586.pl View File

@ -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;


+ 1
- 1
crypto/bn/asm/bn-586.pl View File

@ -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/); }


+ 1
- 1
crypto/bn/asm/co-586.pl View File

@ -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);


+ 1
- 1
crypto/bn/asm/via-mont.pl View File

@ -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";


+ 1
- 1
crypto/bn/asm/x86-gf2m.pl View File

@ -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/); }


+ 1
- 1
crypto/bn/asm/x86-mont.pl View File

@ -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/); }


+ 1
- 1
crypto/bn/asm/x86.pl View File

@ -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");


+ 1
- 1
crypto/camellia/asm/cmll-x86.pl View File

@ -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";


+ 1
- 1
crypto/cast/asm/cast-586.pl View File

@ -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";


+ 1
- 1
crypto/chacha/asm/chacha-x86.pl View File

@ -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/); }


+ 1
- 1
crypto/des/asm/crypt586.pl View File

@ -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";


+ 1
- 1
crypto/des/asm/des-586.pl View File

@ -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";


+ 1
- 1
crypto/ec/asm/ecp_nistz256-x86.pl View File

@ -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/); }


+ 1
- 1
crypto/md5/asm/md5-586.pl View File

@ -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";


+ 1
- 1
crypto/modes/asm/ghash-x86.pl View File

@ -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/); }


+ 2
- 2
crypto/perlasm/README View File

@ -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");


+ 3
- 5
crypto/perlasm/x86asm.pl View File

@ -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 {}


+ 1
- 1
crypto/perlasm/x86gas.pl View File

@ -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;


+ 0
- 1
crypto/perlasm/x86masm.pl View File

@ -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


+ 1
- 1
crypto/poly1305/asm/poly1305-x86.pl View File

@ -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/); }


+ 1
- 1
crypto/rc4/asm/rc4-586.pl View File

@ -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";


+ 1
- 1
crypto/rc5/asm/rc5-586.pl View File

@ -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;


+ 1
- 1
crypto/ripemd/asm/rmd-586.pl View File

@ -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";


+ 1
- 1
crypto/sha/asm/sha1-586.pl View File

@ -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/); }


+ 1
- 1
crypto/sha/asm/sha256-586.pl View File

@ -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/); }


+ 1
- 1
crypto/sha/asm/sha512-586.pl View File

@ -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/); }


+ 1
- 1
crypto/whrlpool/asm/wp-mmx.pl View File

@ -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()


+ 1
- 1
crypto/x86cpuid.pl View File

@ -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/); }


+ 1
- 1
engines/asm/e_padlock-x86.pl View File

@ -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


+ 1
- 1
ms/uplink-x86.pl View File

@ -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");


Loading…
Cancel
Save