diff options
author | Richard Levitte <levitte@openssl.org> | 2016-03-07 15:46:17 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-03-09 11:09:26 +0100 |
commit | df0cb57ca3528ed0dd5ba47e77d724dc761a454d (patch) | |
tree | a1275c7135800025c19f2b73c69a5dbb318818ba | |
parent | a4b4bb086bf9de74b3fce00c32d427c003506272 (diff) |
Unified - adapt the generation of chacha assembler to use GENERATE
This gets rid of the BEGINRAW..ENDRAW sections in crypto/chacha/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/chacha/Makefile.in | 4 | ||||
-rwxr-xr-x | crypto/chacha/asm/chacha-c64xplus.pl | 3 | ||||
-rwxr-xr-x | crypto/chacha/asm/chacha-x86.pl | 5 | ||||
-rw-r--r-- | crypto/chacha/build.info | 11 |
4 files changed, 14 insertions, 9 deletions
diff --git a/crypto/chacha/Makefile.in b/crypto/chacha/Makefile.in index 33e41d5940..c34224cfc6 100644 --- a/crypto/chacha/Makefile.in +++ b/crypto/chacha/Makefile.in @@ -37,9 +37,9 @@ lib: $(LIBOBJ) @touch lib chacha-x86.s: asm/chacha-x86.pl - $(PERL) asm/chacha-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ + $(PERL) asm/chacha-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@ chacha-x86_64.s: asm/chacha-x86_64.pl - $(PERL) asm/chacha-x86_64.pl $(PERLASM_SCHEME) > $@ + $(PERL) asm/chacha-x86_64.pl $(PERLASM_SCHEME) $@ chacha-ppc.s: asm/chacha-ppc.pl $(PERL) asm/chacha-ppc.pl $(PERLASM_SCHEME) $@ diff --git a/crypto/chacha/asm/chacha-c64xplus.pl b/crypto/chacha/asm/chacha-c64xplus.pl index 55854d0b9e..b2ea40666f 100755 --- a/crypto/chacha/asm/chacha-c64xplus.pl +++ b/crypto/chacha/asm/chacha-c64xplus.pl @@ -17,6 +17,9 @@ # dependent on input length. This module on the other hand is free # from such limiation. +$output=pop; +open STDOUT,">$output"; + ($OUT,$INP,$LEN,$KEYB,$COUNTERA)=("A4","B4","A6","B6","A8"); ($KEYA,$COUNTERB,$STEP)=("A7","B7","A3"); diff --git a/crypto/chacha/asm/chacha-x86.pl b/crypto/chacha/asm/chacha-x86.pl index 850c917264..8b9696ff02 100755 --- a/crypto/chacha/asm/chacha-x86.pl +++ b/crypto/chacha/asm/chacha-x86.pl @@ -31,6 +31,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; push(@INC,"${dir}","${dir}../../perlasm"); require "x86asm.pl"; +$output=pop; +open STDOUT,">$output"; + &asm_init($ARGV[0],"chacha-x86.pl",$ARGV[$#ARGV] eq "386"); $xmm=$ymm=0; @@ -1130,3 +1133,5 @@ sub XOPROUND { } &asm_finish(); + +close STDOUT; diff --git a/crypto/chacha/build.info b/crypto/chacha/build.info index f2db5f0201..3dd1f747a8 100644 --- a/crypto/chacha/build.info +++ b/crypto/chacha/build.info @@ -1,16 +1,13 @@ LIBS=../../libcrypto SOURCE[../../libcrypto]={- $target{chacha_asm_src} -} +GENERATE[chacha-x86.s]=asm/chacha-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) +GENERATE[chacha-x86_64.s]=asm/chacha-x86_64.pl $(PERLASM_SCHEME) +GENERATE[chacha-ppc.s]=asm/chacha-ppc.pl $(PERLASM_SCHEME) + BEGINRAW[Makefile(unix)] ##### CHACHA assembler implementations -{- $builddir -}/chacha-x86.s: {- $sourcedir -}/asm/chacha-x86.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/chacha-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ -{- $builddir -}/chacha-x86_64.s: {- $sourcedir -}/asm/chacha-x86_64.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/chacha-x86_64.pl $(PERLASM_SCHEME) > $@ -{- $builddir -}/chacha-ppc.s: {- $sourcedir -}/asm/chacha-ppc.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/chacha-ppc.pl $(PERLASM_SCHEME) $@ - {- $builddir -}/chacha-%.S: {- $sourcedir -}/asm/chacha-%.pl CC="$(CC)" $(PERL) $< $(PERLASM_SCHEME) $@ ENDRAW[Makefile(unix)] |