summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ecdsa/ecs_lib.c
diff options
context:
space:
mode:
authorjsing <>2023-06-25 11:42:26 +0000
committerjsing <>2023-06-25 11:42:26 +0000
commitee2a1487217437d0cbc8d2cba036b6b755509997 (patch)
tree2db3519d7bc9b4956b88feeca83e317d2f563b07 /src/lib/libcrypto/ecdsa/ecs_lib.c
parenta2fd97ea81459f82bf6ddf4a963c48c495818f5d (diff)
downloadopenbsd-ee2a1487217437d0cbc8d2cba036b6b755509997.tar.gz
openbsd-ee2a1487217437d0cbc8d2cba036b6b755509997.tar.bz2
openbsd-ee2a1487217437d0cbc8d2cba036b6b755509997.zip
Provide additional BN primitives for BN_ULLONG architectures.
On BN_ULLONG architectures, the C compiler can usually do a decent job of optimising primitives, however it struggles to see through primitive calls due to type narrowing. As such, providing explicit versions of compound primitives can result in the production of more optimal code. For example, on arm the bn_mulw_addw_addw() primitive can be replaced with a single umaal instruction, which provides significant performance gains. Rather than intermingling #ifdef/#else throughout the header, the BN_ULLONG defines are pulled up above the normal functions. This also allows complex compound primitives to be reused. The conditionals have also been changed from BN_LLONG to BN_ULLONG, since that is what really matters. ok tb@
Diffstat (limited to 'src/lib/libcrypto/ecdsa/ecs_lib.c')
0 files changed, 0 insertions, 0 deletions