From: Andy Polyakov Date: Wed, 31 Jul 2013 21:50:15 +0000 (+0200) Subject: crypto/sha/asm/sha*-x86_64.pl: comply with Win64 ABI. X-Git-Tag: OpenSSL_1_0_2-beta1~315 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e09add6f85be6c448a6c31aa09a67db54654ff7;p=openssl crypto/sha/asm/sha*-x86_64.pl: comply with Win64 ABI. (cherry picked from commit 006784378db1a8957fcf587ee1deaa5cf2ae76c7) --- diff --git a/crypto/sha/asm/sha1-x86_64.pl b/crypto/sha/asm/sha1-x86_64.pl index ff94ac5f18..2c89b1feea 100755 --- a/crypto/sha/asm/sha1-x86_64.pl +++ b/crypto/sha/asm/sha1-x86_64.pl @@ -806,7 +806,7 @@ $code.=<<___; mov %rdi,$ctx # reassigned argument mov %rsi,$inp # reassigned argument mov %rdx,$num # reassigned argument - vzeroall + vzeroupper shl \$6,$num add $inp,$num @@ -1096,7 +1096,7 @@ ___ &Xtail_avx(\&body_20_39); $code.=<<___; - vzeroall + vzeroupper add 0($ctx),$A # update context add 4($ctx),@T[0] diff --git a/crypto/sha/asm/sha512-x86_64.pl b/crypto/sha/asm/sha512-x86_64.pl index d1d20914a5..8070d09c94 100755 --- a/crypto/sha/asm/sha512-x86_64.pl +++ b/crypto/sha/asm/sha512-x86_64.pl @@ -948,7 +948,7 @@ ___ $code.=<<___; .Lprologue_xop: - vzeroall + vzeroupper mov $SZ*0($ctx),$A mov $SZ*1($ctx),$B mov $SZ*2($ctx),$C @@ -1260,7 +1260,7 @@ $code.=<<___; jb .Lloop_xop mov $_rsp,%rsi - vzeroall + vzeroupper ___ $code.=<<___ if ($win64); movaps 16*$SZ+32(%rsp),%xmm6 @@ -1324,7 +1324,7 @@ ___ $code.=<<___; .Lprologue_avx: - vzeroall + vzeroupper mov $SZ*0($ctx),$A mov $SZ*1($ctx),$B mov $SZ*2($ctx),$C @@ -1568,7 +1568,7 @@ $code.=<<___; jb .Lloop_avx mov $_rsp,%rsi - vzeroall + vzeroupper ___ $code.=<<___ if ($win64); movaps 16*$SZ+32(%rsp),%xmm6 @@ -1676,7 +1676,7 @@ ___ $code.=<<___; .Lprologue_avx2: - vzeroall + vzeroupper sub \$-16*$SZ,$inp # inp++, size optimization mov $SZ*0($ctx),$A mov $inp,%r12 # borrow $T1 @@ -1942,7 +1942,7 @@ $code.=<<___; .Ldone_avx2: lea ($Tbl),%rsp mov $_rsp,%rsi - vzeroall + vzeroupper ___ $code.=<<___ if ($win64); movaps 16*$SZ+32(%rsp),%xmm6