diff options
author | Andy Polyakov <appro@openssl.org> | 2008-01-13 22:01:30 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2008-01-13 22:01:30 +0000 |
commit | addd641f3a5e99ed90e3369914af5b356b725590 (patch) | |
tree | 1a6e7498fecce05807ee71d0641823e8422dbb02 /crypto/sha/asm | |
parent | f63e4be392dfc4d5073653a5688d7240b9eaffb9 (diff) | |
download | openssl-new-addd641f3a5e99ed90e3369914af5b356b725590.tar.gz |
Unify ppc assembler make rules.
Diffstat (limited to 'crypto/sha/asm')
-rwxr-xr-x | crypto/sha/asm/sha1-ppc.pl | 11 | ||||
-rwxr-xr-x | crypto/sha/asm/sha512-ppc.pl | 17 |
2 files changed, 16 insertions, 12 deletions
diff --git a/crypto/sha/asm/sha1-ppc.pl b/crypto/sha/asm/sha1-ppc.pl index 2c84d59149..d2c0c2c464 100755 --- a/crypto/sha/asm/sha1-ppc.pl +++ b/crypto/sha/asm/sha1-ppc.pl @@ -20,29 +20,28 @@ # PPC970,gcc-4.0.0 +76% +59% # Power6,xlc-7 +68% +33% -$output = shift; +$flavour = shift; -if ($output =~ /64\.s/) { +if ($flavour =~ /64/) { $SIZE_T =8; $UCMP ="cmpld"; $STU ="stdu"; $POP ="ld"; $PUSH ="std"; -} elsif ($output =~ /32\.s/) { +} elsif ($flavour =~ /32/) { $SIZE_T =4; $UCMP ="cmplw"; $STU ="stwu"; $POP ="lwz"; $PUSH ="stw"; -} else { die "nonsense $output"; } +} else { die "nonsense $flavour"; } $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; ( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or ( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or die "can't locate ppc-xlate.pl"; -( defined shift || open STDOUT,"| $^X $xlate $output" ) || - die "can't call $xlate: $!"; +open STDOUT,"| $^X $xlate $flavour ".shift || die "can't call $xlate: $!"; $FRAME=24*$SIZE_T; diff --git a/crypto/sha/asm/sha512-ppc.pl b/crypto/sha/asm/sha512-ppc.pl index 0ec4b0bcc3..7da9cf96ce 100755 --- a/crypto/sha/asm/sha512-ppc.pl +++ b/crypto/sha/asm/sha512-ppc.pl @@ -35,26 +35,31 @@ # block signals prior calling this routine. For the record, in 32-bit # context R2 serves as TLS pointer, while in 64-bit context - R13. -$output=shift; +$flavour=shift; +$output =shift; -if ($output =~ /64/) { +if ($flavour =~ /64/) { $SIZE_T=8; $STU="stdu"; $UCMP="cmpld"; $SHL="sldi"; $POP="ld"; $PUSH="std"; -} elsif ($output =~ /32/) { +} elsif ($flavour =~ /32/) { $SIZE_T=4; $STU="stwu"; $UCMP="cmplw"; $SHL="slwi"; $POP="lwz"; $PUSH="stw"; -} else { die "nonsense $output"; } +} else { die "nonsense $flavour"; } -( defined shift || open STDOUT,"| $^X ../perlasm/ppc-xlate.pl $output" ) || - die "can't call ../perlasm/ppc-xlate.pl: $!"; +$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; +( $xlate="${dir}ppc-xlate.pl" and -f $xlate ) or +( $xlate="${dir}../../perlasm/ppc-xlate.pl" and -f $xlate) or +die "can't locate ppc-xlate.pl"; + +open STDOUT,"| $^X $xlate $flavour $output" || die "can't call $xlate: $!"; if ($output =~ /512/) { $func="sha512_block_data_order"; |