Skip to content

Commit a632d53

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 4779332 commit a632d53

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
@@ -193,7 +193,7 @@ sub poly1305_iteration {
193193
bt \$`5+32`,%r9 # AVX2?
194194
cmovc %rax,%r10
195195
___
196-
$code.=<<___ if ($avx>3);
196+
$code.=<<___ if ($avx>3 && !$win64);
197197
mov \$`(1<<31|1<<21|1<<16)`,%rax
198198
shr \$32,%r9
199199
and %rax,%r9
@@ -2722,7 +2722,7 @@ sub poly1305_iteration {
27222722
.cfi_endproc
27232723
.size poly1305_blocks_avx512,.-poly1305_blocks_avx512
27242724
___
2725-
if ($avx>3) {
2725+
if ($avx>3 && !$win64) {
27262726
########################################################################
27272727
# VPMADD52 version using 2^44 radix.
27282728
#

0 commit comments

Comments
 (0)