Skip to content

Commit 4bfac44

Browse files
Avoid clobbering non-volatile XMM registers
This affects some Poly1305 assembler functions which are only used for certain CPU types. Remove those functions for Windows targets, as a simple interim solution. Fixes #21522 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from #21808) (cherry picked from commit 7b8e27b)
1 parent 869d95b commit 4bfac44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crypto/poly1305/asm/poly1305-x86_64.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ sub poly1305_iteration {
195195
bt \$`5+32`,%r9 # AVX2?
196196
cmovc %rax,%r10
197197
___
198-
$code.=<<___ if ($avx>3);
198+
$code.=<<___ if ($avx>3 && !$win64);
199199
mov \$`(1<<31|1<<21|1<<16)`,%rax
200200
shr \$32,%r9
201201
and %rax,%r9
@@ -2724,7 +2724,7 @@ sub poly1305_iteration {
27242724
.cfi_endproc
27252725
.size poly1305_blocks_avx512,.-poly1305_blocks_avx512
27262726
___
2727-
if ($avx>3) {
2727+
if ($avx>3 && !$win64) {
27282728
########################################################################
27292729
# VPMADD52 version using 2^44 radix.
27302730
#

0 commit comments

Comments
 (0)