From ec6a978cbfa40f7be040e0bf318357078c7aa3fd Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 20 Jan 2023 17:26:03 +0000 Subject: Move {mul,sqr}_add_c{,2} macros from bn_asm.c to bn_local.h. These depend on other macros that are in already in bn_local.h and this makes them available to other source files. A lot more clean up will be needed in the future. Of course x86_64-gcc.c makes use of the same macro names - sprinkle some undef in there for the time being. ok tb@ --- src/lib/libcrypto/bn/asm/x86_64-gcc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/bn/asm') diff --git a/src/lib/libcrypto/bn/asm/x86_64-gcc.c b/src/lib/libcrypto/bn/asm/x86_64-gcc.c index e98ffe41e5..c6d6239bc2 100644 --- a/src/lib/libcrypto/bn/asm/x86_64-gcc.c +++ b/src/lib/libcrypto/bn/asm/x86_64-gcc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x86_64-gcc.c,v 1.7 2022/11/26 16:08:51 tb Exp $ */ +/* $OpenBSD: x86_64-gcc.c,v 1.8 2023/01/20 17:26:03 jsing Exp $ */ #include "../bn_local.h" /* * x86_64 BIGNUM accelerator version 0.1, December 2002. @@ -227,6 +227,11 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int /* 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) */ +#undef mul_add_c +#undef mul_add_c2 +#undef sqr_add_c +#undef sqr_add_c2 + /* * Keep in mind that carrying into high part of multiplication result * can not overflow, because it cannot be all-ones. -- cgit v1.2.3-55-g6feb