sha/asm/sha1-x86_64.pl: fix crash in SHAEXT code on Windows. RT#4530 (Imported from upstream's 7123aa81e9fb19afb11fdf3850662c5f7ff1f19c.) We've yet to enable this code, but this confirms that we do indeed need to get our future all-variants stuff working on Windows as well as Linux and find an AVX2-capable CI setup on each. The crash here is caused by some win64-only code using %rax as a frame pointer (perlasm injects a mov rax,rsp in the prologue of every win64 function). Change-Id: Ifbe59ceb6ae29266d9cf8a461920344a32b6e555 Reviewed-on: https://boringssl-review.googlesource.com/10366 CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> Commit-Queue: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/sha/asm/sha1-x86_64.pl b/crypto/sha/asm/sha1-x86_64.pl index cdc7285..ff960bb 100644 --- a/crypto/sha/asm/sha1-x86_64.pl +++ b/crypto/sha/asm/sha1-x86_64.pl
@@ -364,9 +364,9 @@ .align 16 .Loop_shaext: dec $num - lea 0x40($inp),%rax # next input block + lea 0x40($inp),%r8 # 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) {