From: Richard Levitte Date: Mon, 7 Mar 2016 14:47:09 +0000 (+0100) Subject: Unified - adapt the generation of ec assembler to use GENERATE X-Git-Tag: OpenSSL_1_1_0-pre4~186 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=73d2fb66efdb63d419f0663b3f41b7db4b14fcd3;p=oweals%2Fopenssl.git 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 --- 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]