Commit 81e61d7c authored by Richard Levitte's avatar Richard Levitte
Browse files

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: default avatarAndy Polyakov <appro@openssl.org>
parent e87e380a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)

+5 −0
Original line number Diff line number Diff line
@@ -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;
+3 −6
Original line number Diff line number Diff line
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)