From fe7f8263afc2ad906ac9b834ae6dc7a2ed25c6b7 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 7 Mar 2016 15:49:34 +0100 Subject: [PATCH] Unified - adapt the generation of ripemd assembler to use GENERATE This gets rid of the BEGINRAW..ENDRAW sections in crypto/ripemd/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 --- crypto/ripemd/Makefile.in | 2 +- crypto/ripemd/asm/rmd-586.pl | 5 +++++ crypto/ripemd/build.info | 8 ++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/crypto/ripemd/Makefile.in b/crypto/ripemd/Makefile.in index 8158a7303a..ba77fe4f36 100644 --- a/crypto/ripemd/Makefile.in +++ b/crypto/ripemd/Makefile.in @@ -40,7 +40,7 @@ lib: $(LIBOBJ) @touch lib rmd-586.s: asm/rmd-586.pl ../perlasm/x86asm.pl - $(PERL) asm/rmd-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@ + $(PERL) asm/rmd-586.pl $(PERLASM_SCHEME) $(CFLAGS) $@ files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/ripemd/asm/rmd-586.pl b/crypto/ripemd/asm/rmd-586.pl index e8b2bc2db2..fd32a73606 100644 --- a/crypto/ripemd/asm/rmd-586.pl +++ b/crypto/ripemd/asm/rmd-586.pl @@ -9,6 +9,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; push(@INC,"${dir}","${dir}../../perlasm"); require "x86asm.pl"; +$output=pop; +open STDOUT,">$output"; + &asm_init($ARGV[0],$0); $A="ecx"; @@ -60,6 +63,8 @@ $KR3=0x7A6D76E9; &ripemd160_block("ripemd160_block_asm_data_order"); &asm_finish(); +close STDOUT; + sub Xv { local($n)=@_; diff --git a/crypto/ripemd/build.info b/crypto/ripemd/build.info index e39f9bd223..f71f313961 100644 --- a/crypto/ripemd/build.info +++ b/crypto/ripemd/build.info @@ -2,9 +2,5 @@ LIBS=../../libcrypto SOURCE[../../libcrypto]=\ rmd_dgst.c rmd_one.c {- $target{rmd160_asm_src} -} -BEGINRAW[Makefile] -##### RMD160 assembler implementations - -{- $builddir -}/rmd-586.s: {- $sourcedir -}/asm/rmd-586.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/rmd-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@ -ENDRAW[Makefile] +GENERATE[rmd-586.s]=asm/rmd-586.pl $(PERLASM_SCHEME) $(CFLAGS) +DEPEND[rmd-586.s]=../perlasm/x86asm.pl -- 2.25.1