Skip to content

Commit

Permalink
Avoid clobbering non-volatile XMM registers
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
bernd-edlinger committed Sep 2, 2023
1 parent 4779332 commit a632d53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/poly1305/asm/poly1305-x86_64.pl
Expand Up @@ -193,7 +193,7 @@ sub poly1305_iteration {
bt \$`5+32`,%r9 # AVX2?
cmovc %rax,%r10
___
$code.=<<___ if ($avx>3);
$code.=<<___ if ($avx>3 && !$win64);
mov \$`(1<<31|1<<21|1<<16)`,%rax
shr \$32,%r9
and %rax,%r9
Expand Down Expand Up @@ -2722,7 +2722,7 @@ sub poly1305_iteration {
.cfi_endproc
.size poly1305_blocks_avx512,.-poly1305_blocks_avx512
___
if ($avx>3) {
if ($avx>3 && !$win64) {
########################################################################
# VPMADD52 version using 2^44 radix.
#
Expand Down

0 comments on commit a632d53

Please sign in to comment.