From efdc519864886da4fdf0ef3266d76091872a7014 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Mon, 11 Apr 2022 10:44:02 +0100 Subject: [PATCH] Reintroduce though-to-be unused variable in correct place The variable is a local variable for the i386 bignum assembly only; introduce it as part of the start/finish macros. It can be noted that the variable is initialize to 0 within MULADDC_INIT, so there are no data dependencies across blocks of MULADDC_INIT/CORE/STOP. Signed-off-by: Hanno Becker --- library/bn_mul.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/bn_mul.h b/library/bn_mul.h index b71ddd881..aa1183fa5 100644 --- a/library/bn_mul.h +++ b/library/bn_mul.h @@ -99,6 +99,7 @@ #if defined(__i386__) && defined(__OPTIMIZE__) #define MULADDC_INIT \ + { mbedtls_mpi_uint t; \ asm( \ "movl %%ebx, %0 \n\t" \ "movl %5, %%esi \n\t" \ @@ -190,7 +191,8 @@ : "=m" (t), "=m" (c), "=m" (d), "=m" (s) \ : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b) \ : "eax", "ebx", "ecx", "edx", "esi", "edi" \ - ); + ); } \ + #else @@ -202,7 +204,7 @@ : "=m" (t), "=m" (c), "=m" (d), "=m" (s) \ : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b) \ : "eax", "ebx", "ecx", "edx", "esi", "edi" \ - ); + ); } #endif /* SSE2 */ #endif /* i386 */