diff --git a/crypto/modes/Makefile.in b/crypto/modes/Makefile.in index a62486ed13d92e3aa98c3a3e618c42c1715f05aa..c37a8c8306cee9999fb6f27b11d7f902433597cb 100644 --- a/crypto/modes/Makefile.in +++ b/crypto/modes/Makefile.in @@ -41,18 +41,18 @@ lib: $(LIBOBJ) @touch lib ghash-ia64.s: asm/ghash-ia64.pl - $(PERL) asm/ghash-ia64.pl $@ $(CFLAGS) + $(PERL) asm/ghash-ia64.pl $(CFLAGS) $@ ghash-x86.s: asm/ghash-x86.pl - $(PERL) asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ + $(PERL) asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@ ghash-x86_64.s: asm/ghash-x86_64.pl - $(PERL) asm/ghash-x86_64.pl $(PERLASM_SCHEME) > $@ + $(PERL) asm/ghash-x86_64.pl $(PERLASM_SCHEME) $@ aesni-gcm-x86_64.s: asm/aesni-gcm-x86_64.pl - $(PERL) asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME) > $@ + $(PERL) asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME) $@ ghash-sparcv9.S: asm/ghash-sparcv9.pl $(PERL) asm/ghash-sparcv9.pl $(PERLASM_SCHEME) $@ ghash-alpha.s: asm/ghash-alpha.pl (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \ - $(PERL) asm/ghash-alpha.pl > $$preproc && \ + $(PERL) asm/ghash-alpha.pl $$preproc && \ $(CC) -E -P $$preproc > $@ && rm $$preproc) ghash-parisc.s: asm/ghash-parisc.pl $(PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@ diff --git a/crypto/modes/asm/ghash-alpha.pl b/crypto/modes/asm/ghash-alpha.pl index aa360293864b5294cd9469efa39dc33b7308b0f1..df6b3a3b6f431eb67188d1a8792580f22e752a11 100644 --- a/crypto/modes/asm/ghash-alpha.pl +++ b/crypto/modes/asm/ghash-alpha.pl @@ -454,7 +454,7 @@ rem_4bit: .align 4 ___ -$output=shift and open STDOUT,">$output"; +$output=pop and open STDOUT,">$output"; print $code; close STDOUT; diff --git a/crypto/modes/asm/ghash-ia64.pl b/crypto/modes/asm/ghash-ia64.pl index 0354c9544485e66d17728fac401ece51cd0c57fe..9d49143c31c9acf212220da93807475faadc13d4 100755 --- a/crypto/modes/asm/ghash-ia64.pl +++ b/crypto/modes/asm/ghash-ia64.pl @@ -32,7 +32,7 @@ # Itanium performance should remain the same as the "256B" version, # i.e. ~8.5 cycles. -$output=shift and (open STDOUT,">$output" or die "can't open $output: $!"); +$output=pop and (open STDOUT,">$output" or die "can't open $output: $!"); if ($^O eq "hpux") { $ADDP="addp4"; diff --git a/crypto/modes/asm/ghash-x86.pl b/crypto/modes/asm/ghash-x86.pl index 0269169fa743b5a1802fe2c526bf7dad50fcc0af..db6eeae0fe4f337c9eac152f0e69c6996e199f75 100644 --- a/crypto/modes/asm/ghash-x86.pl +++ b/crypto/modes/asm/ghash-x86.pl @@ -129,6 +129,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; push(@INC,"${dir}","${dir}../../perlasm"); require "x86asm.pl"; +$output=pop; +open STDOUT,">$output"; + &asm_init($ARGV[0],"ghash-x86.pl",$x86only = $ARGV[$#ARGV] eq "386"); $sse2=0; @@ -1369,6 +1372,8 @@ my ($Xhi,$Xi)=@_; &asciz("GHASH for x86, CRYPTOGAMS by "); &asm_finish(); +close STDOUT; + # A question was risen about choice of vanilla MMX. Or rather why wasn't # SSE2 chosen instead? In addition to the fact that MMX runs on legacy # CPUs such as PIII, "4-bit" MMX version was observed to provide better diff --git a/crypto/modes/build.info b/crypto/modes/build.info index dfce733cd36fd21681455c477fafcaca6264bb32..b59780f8d8c074f32d348f1767695f24da847287 100644 --- a/crypto/modes/build.info +++ b/crypto/modes/build.info @@ -4,28 +4,17 @@ SOURCE[../../libcrypto]=\ ccm128.c xts128.c wrap128.c ocb128.c \ {- $target{modes_asm_src} -} -BEGINRAW[Makefile] -{- $builddir -}/ghash-ia64.s: {- $sourcedir -}/asm/ghash-ia64.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-ia64.pl $@ $(CFLAGS) -{- $builddir -}/ghash-x86.s: {- $sourcedir -}/asm/ghash-x86.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ -{- $builddir -}/ghash-x86_64.s: {- $sourcedir -}/asm/ghash-x86_64.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-x86_64.pl $(PERLASM_SCHEME) > $@ -{- $builddir -}/aesni-gcm-x86_64.s: {- $sourcedir -}/asm/aesni-gcm-x86_64.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME) > $@ -{- $builddir -}/ghash-sparcv9.S: {- $sourcedir -}/asm/ghash-sparcv9.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-sparcv9.pl $(PERLASM_SCHEME) $@ -{- $builddir -}/ghash-alpha.s: {- $sourcedir -}/asm/ghash-alpha.pl - (preproc=$$$$.$@.S; trap "rm $$preproc" INT; \ - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-alpha.pl > $$preproc && \ - $(CC) -E -P $$preproc > $@ && rm $$preproc) -{- $builddir -}/ghash-parisc.s: {- $sourcedir -}/asm/ghash-parisc.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghash-parisc.pl $(PERLASM_SCHEME) $@ -{- $builddir -}/ghashv8-armx.S: {- $sourcedir -}/asm/ghashv8-armx.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghashv8-armx.pl $(PERLASM_SCHEME) $@ -{- $builddir -}/ghashp8-ppc.s: {- $sourcedir -}/asm/ghashp8-ppc.pl - CC="$(CC)" $(PERL) {- $sourcedir -}/asm/ghashp8-ppc.pl $(PERLASM_SCHEME) $@ +GENERATE[ghash-ia64.s]=asm/ghash-ia64.pl $(CFLAGS) +GENERATE[ghash-x86.s]=asm/ghash-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) +GENERATE[ghash-x86_64.s]=asm/ghash-x86_64.pl $(PERLASM_SCHEME) +GENERATE[aesni-gcm-x86_64.s]=asm/aesni-gcm-x86_64.pl $(PERLASM_SCHEME) +GENERATE[ghash-sparcv9.S]=asm/ghash-sparcv9.pl $(PERLASM_SCHEME) +GENERATE[ghash-alpha.s]=asm/ghash-alpha.pl +GENERATE[ghash-parisc.s]=asm/ghash-parisc.pl $(PERLASM_SCHEME) +GENERATE[ghashv8-armx.S]=asm/ghashv8-armx.pl $(PERLASM_SCHEME) +GENERATE[ghashp8-ppc.s]=asm/ghashp8-ppc.pl $(PERLASM_SCHEME) +BEGINRAW[Makefile] # GNU make "catch all" {- $builddir -}/ghash-%.S: {- $sourcedir -}/asm/ghash-%.pl CC="$(CC)" $(PERL) $< $(PERLASM_SCHEME) $@