Skip to content

Commit

Permalink
Specify previously missed XMM register clobbers in AES-NI asm blocks
Browse files Browse the repository at this point in the history
Noticed by Gilles Peskine

Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Solar Designer <solar@openwall.com>
  • Loading branch information
solardiz and gilles-peskine-arm committed Dec 13, 2024
1 parent 4115440 commit 4ad27aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/aesni.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ static void aesni_setkey_enc_128(unsigned char *rk,
AESKEYGENA(xmm0_xmm1, "0x36") "call 1b \n\t"
:
: "r" (rk), "r" (key)
: "memory", "cc", "0");
: "memory", "cc", "xmm0", "xmm1", "0");
}

/*
Expand Down Expand Up @@ -705,7 +705,7 @@ static void aesni_setkey_enc_192(unsigned char *rk,

:
: "r" (rk), "r" (key)
: "memory", "cc", "0");
: "memory", "cc", "xmm0", "xmm1", "xmm2", "0");
}

/*
Expand Down Expand Up @@ -771,7 +771,7 @@ static void aesni_setkey_enc_256(unsigned char *rk,
AESKEYGENA(xmm1_xmm2, "0x40") "call 1b \n\t"
:
: "r" (rk), "r" (key)
: "memory", "cc", "0");
: "memory", "cc", "xmm0", "xmm1", "xmm2", "0");
}

#endif /* MBEDTLS_AESNI_HAVE_CODE */
Expand Down

0 comments on commit 4ad27aa

Please sign in to comment.