From: Richard Levitte Date: Mon, 7 Mar 2016 14:50:21 +0000 (+0100) Subject: Unified - adapt the generation of whirlpool assembler to use GENERATE X-Git-Tag: OpenSSL_1_1_0-pre4~177 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=81e61d7cb51988a0cde11c3b924052213b50d979;p=oweals%2Fopenssl.git Unified - adapt the generation of whirlpool assembler to use GENERATE This gets rid of the BEGINRAW..ENDRAW sections in crypto/whrlpool/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/whrlpool/Makefile.in b/crypto/whrlpool/Makefile.in index a1be9fef93..fa51f08f30 100644 --- a/crypto/whrlpool/Makefile.in +++ b/crypto/whrlpool/Makefile.in @@ -40,10 +40,10 @@ lib: $(LIBOBJ) @touch lib wp-mmx.s: asm/wp-mmx.pl ../perlasm/x86asm.pl - $(PERL) asm/wp-mmx.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ + $(PERL) asm/wp-mmx.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@ wp-x86_64.s: asm/wp-x86_64.pl - $(PERL) asm/wp-x86_64.pl $(PERLASM_SCHEME) > $@ + $(PERL) asm/wp-x86_64.pl $(PERLASM_SCHEME) $@ $(LIBOBJ): $(LIBSRC) diff --git a/crypto/whrlpool/asm/wp-mmx.pl b/crypto/whrlpool/asm/wp-mmx.pl index 7725951d6b..a71a29f522 100644 --- a/crypto/whrlpool/asm/wp-mmx.pl +++ b/crypto/whrlpool/asm/wp-mmx.pl @@ -49,6 +49,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; push(@INC,"${dir}","${dir}../../perlasm"); require "x86asm.pl"; +$output=pop; +open STDOUT,">$output"; + &asm_init($ARGV[0],"wp-mmx.pl"); sub L() { &data_byte(@_); } @@ -493,3 +496,5 @@ for($i=0;$i<8;$i++) { &function_end_B("whirlpool_block_mmx"); &asm_finish(); + +close STDOUT; diff --git a/crypto/whrlpool/build.info b/crypto/whrlpool/build.info index 5cf6000cb7..ff9d052d10 100644 --- a/crypto/whrlpool/build.info +++ b/crypto/whrlpool/build.info @@ -1,10 +1,7 @@ LIBS=../../libcrypto SOURCE[../../libcrypto]=wp_dgst.c {- $target{wp_asm_src} -} -BEGINRAW[Makefile] -{- $builddir -}/wp-mmx.s: {- $sourcedir -}/asm/wp-mmx.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/wp-mmx.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ +GENERATE[wp-mmx.s]=asm/wp-mmx.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) +DEPEND[wp-mmx.s]=../perlasm/x86asm.pl -{- $builddir -}/wp-x86_64.s: {- $sourcedir -}/asm/wp-x86_64.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/wp-x86_64.pl $(PERLASM_SCHEME) > $@ -ENDRAW[Makefile] +GENERATE[wp-x86_64.s]=asm/wp-x86_64.pl $(PERLASM_SCHEME)