crypto/*/Makefile: unify "catch-all" assembler make rules and harmonize

ARM assembler modules.
This commit is contained in:
Andy Polyakov 2010-07-08 15:03:42 +00:00
parent f04f3873f8
commit 396df7311e
9 changed files with 17 additions and 12 deletions

View file

@ -68,7 +68,7 @@ aes-parisc.s: asm/aes-parisc.pl
$(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@ $(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@
# GNU make "catch all" # GNU make "catch all"
aes-%.s: asm/aes-%.pl; $(PERL) $< $(CFLAGS) > $@ aes-%.s: asm/aes-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
files: files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO

View file

@ -22,6 +22,9 @@
# #
# AES_set_[en|de]crypt_key is added. # AES_set_[en|de]crypt_key is added.
while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output";
$s0="r0"; $s0="r0";
$s1="r1"; $s1="r1";
$s2="r2"; $s2="r2";
@ -1029,3 +1032,4 @@ ___
$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm; # make it possible to compile with -march=armv4 $code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm; # make it possible to compile with -march=armv4
print $code; print $code;
close STDOUT; # enforce flush

View file

@ -114,7 +114,7 @@ alpha-mont.s: asm/alpha-mont.pl
$(PERL) $< | $(CC) -E - | tee $@ > /dev/null $(PERL) $< | $(CC) -E - | tee $@ > /dev/null
# GNU make "catch all" # GNU make "catch all"
%-mont.s: asm/%-mont.pl; $(PERL) $< $(CFLAGS) > $@ %-mont.s: asm/%-mont.pl; $(PERL) $< $(PERLASM_SCHEME) $@
files: files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO

View file

@ -55,8 +55,9 @@ ghash-alpha.s: asm/ghash-alpha.pl
$(PERL) $< | $(CC) -E - | tee $@ > /dev/null $(PERL) $< | $(CC) -E - | tee $@ > /dev/null
ghash-parisc.s: asm/ghash-parisc.pl ghash-parisc.s: asm/ghash-parisc.pl
$($PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@ $($PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@
# GNU make "catch all" # GNU make "catch all"
ghash-%.s: asm/ghash-%.pl; $(PERL) $< $(PERLASM_SCHEME) $(CFLAGS) > $@ ghash-%.s: asm/ghash-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
files: files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO

View file

@ -39,6 +39,9 @@
# *native* byte order on current platform. See gcm128.c for working # *native* byte order on current platform. See gcm128.c for working
# example... # example...
while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output";
$Xi="r0"; # argument block $Xi="r0"; # argument block
$Htbl="r1"; $Htbl="r1";
$inp="r2"; $inp="r2";
@ -59,9 +62,6 @@ $nhi="r14";
$rem_4bit=$inp; # used in gcm_gmult_4bit $rem_4bit=$inp; # used in gcm_gmult_4bit
$cnt=$len; $cnt=$len;
$output=shift;
open STDOUT,">$output";
sub Zsmash() { sub Zsmash() {
my $i=12; my $i=12;
my @args=@_; my @args=@_;

View file

@ -79,9 +79,9 @@ sha256-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCH
sha512-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@ sha512-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@
# GNU make "catch all" # GNU make "catch all"
sha1-%.s: asm/sha1-%.pl; $(PERL) $< $@ sha1-%.s: asm/sha1-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
sha256-%.s: asm/sha512-%.pl; $(PERL) $< $@ sha256-%.s: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
sha512-%.s: asm/sha512-%.pl; $(PERL) $< $@ sha512-%.s: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
files: files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO

View file

@ -39,7 +39,7 @@
# small and always slower. # small and always slower.
# [***] which is also ~35% better than compiler generated code. # [***] which is also ~35% better than compiler generated code.
$output=shift; while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output"; open STDOUT,">$output";
$ctx="r0"; $ctx="r0";

View file

@ -13,7 +13,7 @@
# lute" terms is ~2250 cycles per 64-byte block or ~35 cycles per # lute" terms is ~2250 cycles per 64-byte block or ~35 cycles per
# byte. # byte.
$output=shift; while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output"; open STDOUT,">$output";
$ctx="r0"; $t0="r0"; $ctx="r0"; $t0="r0";

View file

@ -22,7 +22,7 @@ $hi=0;
$lo=4; $lo=4;
# ==================================================================== # ====================================================================
$output=shift; while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {}
open STDOUT,">$output"; open STDOUT,">$output";
$ctx="r0"; $ctx="r0";