summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/labs.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-02-17Remove now unused tangle of mul*/sqr* and BN_UMULT_* macros.jsing1-251/+1
No, I'm not trying to overwhelm you... however, we really no longer need this clutter. ok tb@
2023-02-17Reimplement bn_sqr_comba{4,8}().jsing2-102/+110
Use bignum primitives rather than the current mess of macros.The sqr_add_c macro gets replaced with bn_mulw_addtw(), while the sqr_add_c2 macro gets replaced with bn_mul2_mulw_addtw(). The variables in the comba functions have also been reordered, so that the patterns are easier to understand - the compiler can take care of optimising the inputs and outputs to avoid register moves. ok tb@
2023-02-16Enable s2n-bignum word_clz() on amd64.jsing4-4/+17
The BN_num_bits_word() function is a hot path, being called more than 80 million times during a libcrypto regress run. The word_clz() implementation uses five instructions to do the same as the generic code that uses more than 60 instructions. Discussed with tb@
2023-02-16Use bn_addw() in bn_mulw(), rather than duplicating add with carry code.jsing1-12/+7
2023-02-16Change include from _internal_s2n_bignum.h to s2n_bignum_internal.h.jsing1-1/+1
2023-02-16Include the ISC license from s2n-bignum's LICENSE file.jsing1-1/+12