diff options
author | Richard Levitte <levitte@openssl.org> | 2016-03-07 15:47:09 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-03-09 11:09:26 +0100 |
commit | 73d2fb66efdb63d419f0663b3f41b7db4b14fcd3 (patch) | |
tree | a1050f67f1302e1e3fa7ff6421989ce77546fc9d | |
parent | 5384d1e4ebd58f31a06b2f5d1f6c4b28f63d72ed (diff) | |
download | openssl-new-73d2fb66efdb63d419f0663b3f41b7db4b14fcd3.tar.gz |
Unified - adapt the generation of ec assembler to use GENERATE
This gets rid of the BEGINRAW..ENDRAW sections in crypto/ec/build.info.
This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.
Reviewed-by: Andy Polyakov <appro@openssl.org>
-rw-r--r-- | crypto/ec/Makefile.in | 6 | ||||
-rwxr-xr-x | crypto/ec/asm/ecp_nistz256-x86.pl | 5 | ||||
-rw-r--r-- | crypto/ec/build.info | 14 |
3 files changed, 13 insertions, 12 deletions
diff --git a/crypto/ec/Makefile.in b/crypto/ec/Makefile.in index 342b98d316..48091d21f0 100644 --- a/crypto/ec/Makefile.in +++ b/crypto/ec/Makefile.in @@ -49,13 +49,13 @@ lib: $(LIBOBJ) @touch lib ecp_nistz256-x86.s: asm/ecp_nistz256-x86.pl - $(PERL) asm/ecp_nistz256-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ + $(PERL) asm/ecp_nistz256-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@ ecp_nistz256-x86_64.s: asm/ecp_nistz256-x86_64.pl - $(PERL) asm/ecp_nistz256-x86_64.pl $(PERLASM_SCHEME) > $@ + $(PERL) asm/ecp_nistz256-x86_64.pl $(PERLASM_SCHEME) $@ ecp_nistz256-avx2.s: asm/ecp_nistz256-avx2.pl - $(PERL) asm/ecp_nistz256-avx2.pl $(PERLASM_SCHEME) > $@ + $(PERL) asm/ecp_nistz256-avx2.pl $(PERLASM_SCHEME) $@ ecp_nistz256-sparcv9.S: asm/ecp_nistz256-sparcv9.pl $(PERL) asm/ecp_nistz256-sparcv9.pl $(PERLASM_SCHEME) $@ diff --git a/crypto/ec/asm/ecp_nistz256-x86.pl b/crypto/ec/asm/ecp_nistz256-x86.pl index 4d55f82ef8..7aa9b0f78c 100755 --- a/crypto/ec/asm/ecp_nistz256-x86.pl +++ b/crypto/ec/asm/ecp_nistz256-x86.pl @@ -35,6 +35,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; push(@INC,"${dir}","${dir}../../perlasm"); require "x86asm.pl"; +$output=pop; +open STDOUT,">$output"; + &asm_init($ARGV[0],"ecp_nistz256-x86.pl",$ARGV[$#ARGV] eq "386"); $sse2=0; @@ -1829,3 +1832,5 @@ for ($i=0;$i<7;$i++) { } &function_end("ecp_nistz256_point_add_affine"); &asm_finish(); + +close STDOUT; diff --git a/crypto/ec/build.info b/crypto/ec/build.info index 469a7ddc5e..e8588a11c1 100644 --- a/crypto/ec/build.info +++ b/crypto/ec/build.info @@ -8,19 +8,15 @@ SOURCE[../../libcrypto]=\ ecdsa_ossl.c ecdsa_sign.c ecdsa_vrf.c ec_25519.c curve25519.c \ {- $target{ec_asm_src} -} -BEGINRAW[Makefile] -{- $builddir -}/ecp_nistz256-x86.s: {- $sourcedir -}/asm/ecp_nistz256-x86.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ecp_nistz256-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ +GENERATE[ecp_nistz256-x86.s]=asm/ecp_nistz256-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) -{- $builddir -}/ecp_nistz256-x86_64.s: {- $sourcedir -}/asm/ecp_nistz256-x86_64.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ecp_nistz256-x86_64.pl $(PERLASM_SCHEME) > $@ +GENERATE[ecp_nistz256-x86_64.s]=asm/ecp_nistz256-x86_64.pl $(PERLASM_SCHEME) -{- $builddir -}/ecp_nistz256-avx2.s: {- $sourcedir -}/asm/ecp_nistz256-avx2.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ecp_nistz256-avx2.pl $(PERLASM_SCHEME) > $@ +GENERATE[ecp_nistz256-avx2.s]=asm/ecp_nistz256-avx2.pl $(PERLASM_SCHEME) -{- $builddir -}/ecp_nistz256-sparcv9.S: {- $sourcedir -}/asm/ecp_nistz256-sparcv9.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ecp_nistz256-sparcv9.pl $(PERLASM_SCHEME) $@ +GENERATE[ecp_nistz256-sparcv9.S]=asm/ecp_nistz256-sparcv9.pl $(PERLASM_SCHEME) +BEGINRAW[Makefile] {- $builddir -}/ecp_nistz256-%.S: {- $sourcedir -}/asm/ecp_nistz256-%.pl CC="$(CC)" $(PERL) $< $(PERLASM_SCHEME) $@ ENDRAW[Makefile] |