aboutsummaryrefslogtreecommitdiff
path: root/crypto/sha/asm/sha1-x86_64.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2006-10-17 07:00:23 +0000
committerAndy Polyakov <appro@openssl.org>2006-10-17 07:00:23 +0000
commitf0f61f6d0d506cf6235c736f5781dbf3b651323e (patch)
tree146eead63aa1138b7aa0966db1cc7f6cb04798a5 /crypto/sha/asm/sha1-x86_64.pl
parentd68ff71004282eedd8faa4411187fee08f54f75f (diff)
downloadopenssl-f0f61f6d0d506cf6235c736f5781dbf3b651323e.zip
openssl-f0f61f6d0d506cf6235c736f5781dbf3b651323e.tar.gz
openssl-f0f61f6d0d506cf6235c736f5781dbf3b651323e.tar.bz2
Synchronize SHA1 assembler with md32_common.h update.
Diffstat (limited to 'crypto/sha/asm/sha1-x86_64.pl')
-rwxr-xr-xcrypto/sha/asm/sha1-x86_64.pl26
1 files changed, 13 insertions, 13 deletions
diff --git a/crypto/sha/asm/sha1-x86_64.pl b/crypto/sha/asm/sha1-x86_64.pl
index 433e2f9..857db2d 100755
--- a/crypto/sha/asm/sha1-x86_64.pl
+++ b/crypto/sha/asm/sha1-x86_64.pl
@@ -2,8 +2,9 @@
#
# ====================================================================
# Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
-# project. Rights for redistribution and usage in source and binary
-# forms are granted according to the OpenSSL license.
+# project. The module is, however, dual licensed under OpenSSL and
+# CRYPTOGAMS licenses depending on where you obtain it. For further
+# details see http://www.openssl.org/~appro/cryptogams/.
# ====================================================================
#
# sha1_block procedure for x86_64.
@@ -28,7 +29,13 @@
# Xeon +65% +0% 9.9
$output=shift;
-open STDOUT,"| $^X ../perlasm/x86_64-xlate.pl $output";
+
+$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
+( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or
+( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
+die "can't locate x86_64-xlate.pl";
+
+open STDOUT,"| $^X $xlate $output";
$ctx="%rdi"; # 1st arg
$inp="%rsi"; # 2nd arg
@@ -112,7 +119,6 @@ $code.=<<___ if ($i<15);
rol \$30,$b
add $t0,$f
___
-$code.=".Lshortcut:\n" if ($i==15);
$code.=<<___ if ($i>=15);
lea 0x5a827999($xi,$e),$f
mov `4*($j%16)`(%rsp),$xi
@@ -222,18 +228,12 @@ $code.=<<___;
jnz .Lloop
___
&EPILOGUE("sha1_block_asm_data_order");
-
-####################################################################
-
-@V=($A,$B,$C,$D,$E,$T);
-
-&PROLOGUE("sha1_block_asm_host_order");
-for($i=0;$i<15;$i++) { &BODY_00_19($i,@V,1); unshift(@V,pop(@V)); }
$code.=<<___;
- jmp .Lshortcut
-.size sha1_block_asm_host_order,.-sha1_block_asm_host_order
+.asciz "SHA1 block transform for x86_64, CRYPTOGAMS by <appro\@openssl.org>"
___
+####################################################################
+
$code =~ s/\`([^\`]*)\`/eval $1/gem;
print $code;
close STDOUT;