diff options
author | jsing <> | 2023-01-20 17:26:03 +0000 |
---|---|---|
committer | jsing <> | 2023-01-20 17:26:03 +0000 |
commit | a50b434b87829ee0d12767c21ae98194684ab720 (patch) | |
tree | e3bd648b0409707ec556c3fb4a63555600a9eb16 /src/lib/libcrypto/bn/asm | |
parent | 7eb968d539adfad40fdf827796365d0d38b3db5f (diff) | |
download | openbsd-a50b434b87829ee0d12767c21ae98194684ab720.tar.gz openbsd-a50b434b87829ee0d12767c21ae98194684ab720.tar.bz2 openbsd-a50b434b87829ee0d12767c21ae98194684ab720.zip |
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@
Diffstat (limited to 'src/lib/libcrypto/bn/asm')
-rw-r--r-- | src/lib/libcrypto/bn/asm/x86_64-gcc.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 @@ | |||
1 | /* $OpenBSD: x86_64-gcc.c,v 1.7 2022/11/26 16:08:51 tb Exp $ */ | 1 | /* $OpenBSD: x86_64-gcc.c,v 1.8 2023/01/20 17:26:03 jsing Exp $ */ |
2 | #include "../bn_local.h" | 2 | #include "../bn_local.h" |
3 | /* | 3 | /* |
4 | * x86_64 BIGNUM accelerator version 0.1, December 2002. | 4 | * 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 | |||
227 | /* sqr_add_c(a,i,c0,c1,c2) -- c+=a[i]^2 for three word number c=(c2,c1,c0) */ | 227 | /* sqr_add_c(a,i,c0,c1,c2) -- c+=a[i]^2 for three word number c=(c2,c1,c0) */ |
228 | /* sqr_add_c2(a,i,c0,c1,c2) -- c+=2*a[i]*a[j] for three word number c=(c2,c1,c0) */ | 228 | /* sqr_add_c2(a,i,c0,c1,c2) -- c+=2*a[i]*a[j] for three word number c=(c2,c1,c0) */ |
229 | 229 | ||
230 | #undef mul_add_c | ||
231 | #undef mul_add_c2 | ||
232 | #undef sqr_add_c | ||
233 | #undef sqr_add_c2 | ||
234 | |||
230 | /* | 235 | /* |
231 | * Keep in mind that carrying into high part of multiplication result | 236 | * Keep in mind that carrying into high part of multiplication result |
232 | * can not overflow, because it cannot be all-ones. | 237 | * can not overflow, because it cannot be all-ones. |