diff options
author | Andy Polyakov <appro@openssl.org> | 2014-08-21 00:13:55 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-08-21 00:16:32 +0200 |
commit | a89adc148ec1ba86da9528a759030095a4010d08 (patch) | |
tree | c167d58cdc6c15f377b26b0348e39dab46c6e7c1 | |
parent | b698c427dede29e3ffcbdefd57753ea7bd2e8065 (diff) |
sha1-mb-x86_64.pl: add commentary.
Reviewed-by: Emilia Kasper <emilia@openssl.org>
(cherry picked from commit e608273a8094a95a5703c26a428a007497e74392)
-rw-r--r-- | crypto/sha/asm/sha1-mb-x86_64.pl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/sha/asm/sha1-mb-x86_64.pl b/crypto/sha/asm/sha1-mb-x86_64.pl index e9bc8e5c47..a8ee075eaa 100644 --- a/crypto/sha/asm/sha1-mb-x86_64.pl +++ b/crypto/sha/asm/sha1-mb-x86_64.pl @@ -107,6 +107,19 @@ my ($i,$a,$b,$c,$d,$e)=@_; my $j=$i+1; my $k=$i+2; +# Loads are performed 2+3/4 iterations in advance. 3/4 means that out +# of 4 words you would expect to be loaded per given iteration one is +# spilled to next iteration. In other words indices in four input +# streams are distributed as following: +# +# $i==0: 0,0,0,0,1,1,1,1,2,2,2, +# $i==1: 2,3,3,3, +# $i==2: 3,4,4,4, +# ... +# $i==13: 14,15,15,15, +# $i==14: 15 +# +# Then at $i==15 Xupdate is applied one iteration in advance... $code.=<<___ if ($i==0); movd (@ptr[0]),@Xi[0] lea `16*4`(@ptr[0]),@ptr[0] |