From 9f0928c6593f937a17b7974b04051c57e3874b20 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Thu, 12 Feb 2015 22:22:25 +0100 Subject: Update OpenSSL to AOSP -master --- main/openssl/crypto/bn/asm/x86_64-gcc.c | 34 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'main/openssl/crypto/bn/asm/x86_64-gcc.c') diff --git a/main/openssl/crypto/bn/asm/x86_64-gcc.c b/main/openssl/crypto/bn/asm/x86_64-gcc.c index 6bcf32f6..e85ee8ce 100644 --- a/main/openssl/crypto/bn/asm/x86_64-gcc.c +++ b/main/openssl/crypto/bn/asm/x86_64-gcc.c @@ -273,6 +273,10 @@ BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) /* sqr_add_c(a,i,c0,c1,c2) -- c+=a[i]^2 for three word number c=(c2,c1,c0) */ /* sqr_add_c2(a,i,c0,c1,c2) -- c+=2*a[i]*a[j] for three word number c=(c2,c1,c0) */ +/* + * Keep in mind that carrying into high part of multiplication result + * can not overflow, because it cannot be all-ones. + */ #if 0 /* original macros are kept for reference purposes */ #define mul_add_c(a,b,c0,c1,c2) { \ @@ -287,10 +291,10 @@ BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) BN_ULONG ta=(a),tb=(b),t0; \ t1 = BN_UMULT_HIGH(ta,tb); \ t0 = ta * tb; \ - t2 = t1+t1; c2 += (t2