From 4915a784ecb5012f0c93d127ff5916af386df8c3 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Wed, 17 Jan 2018 10:48:09 +1000 Subject: [PATCH] Fix clang using wrong registers in poly1305 AVX2 code --- wolfcrypt/src/poly1305.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wolfcrypt/src/poly1305.c b/wolfcrypt/src/poly1305.c index 488dda72f..9177d43b6 100644 --- a/wolfcrypt/src/poly1305.c +++ b/wolfcrypt/src/poly1305.c @@ -743,11 +743,11 @@ POLY1305_NOINLINE static void poly1305_blocks_avx2(Poly1305* ctx, { ALIGN256 word64 r4[5][4]; ALIGN256 word64 s[4][4]; - register word32 t0 asm("r8"); - register word32 t1 asm("r9"); - register word32 t2 asm("r10"); - register word32 t3 asm("r11"); - register word32 t4 asm("r12"); + register word32 t0 asm("r8") = 0; + register word32 t1 asm("r9") = 0; + register word32 t2 asm("r10") = 0; + register word32 t3 asm("r11") = 0; + register word32 t4 asm("r12") = 0; static const word64 mask[4] = { 0x0000000003ffffff, 0x0000000003ffffff, 0x0000000003ffffff, 0x0000000003ffffff };