sha/asm/sha1-x86_64.pl: fix crash in SHAEXT code on Windows.
authorAndy Polyakov <appro@openssl.org>
Sun, 31 Jul 2016 19:19:57 +0000 (21:19 +0200)
committerAndy Polyakov <appro@openssl.org>
Thu, 11 Aug 2016 11:41:01 +0000 (13:41 +0200)
RT#4530

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 7123aa81e9fb19afb11fdf3850662c5f7ff1f19c)

crypto/sha/asm/sha1-x86_64.pl

index 5f375fc6886b3ab5998ec7b02fbbde4db6aaface..752138b0eac15d63220bfef52e7f2a680d51914e 100755 (executable)
@@ -372,9 +372,9 @@ $code.=<<___;
 .align 16
 .Loop_shaext:
        dec             $num
-       lea             0x40($inp),%rax         # next input block
+       lea             0x40($inp),%r         # next input block
        paddd           @MSG[0],$E
-       cmovne          %rax,$inp
+       cmovne          %r8,$inp
        movdqa          $ABCD,$ABCD_SAVE        # offload $ABCD
 ___
 for($i=0;$i<20-4;$i+=2) {