From 02f91f3325f965a313f0cffe5053a084d05a84ea Mon Sep 17 00:00:00 2001 From: jsing <> Date: Thu, 16 Feb 2023 11:13:05 +0000 Subject: Enable s2n-bignum word_clz() on amd64. 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@ --- src/lib/libcrypto/arch/amd64/Makefile.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/arch/amd64') diff --git a/src/lib/libcrypto/arch/amd64/Makefile.inc b/src/lib/libcrypto/arch/amd64/Makefile.inc index 5e433b572d..e9c7732691 100644 --- a/src/lib/libcrypto/arch/amd64/Makefile.inc +++ b/src/lib/libcrypto/arch/amd64/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.11 2023/01/29 14:00:41 jsing Exp $ +# $OpenBSD: Makefile.inc,v 1.12 2023/02/16 11:13:05 jsing Exp $ # amd64-specific libcrypto build rules @@ -39,6 +39,7 @@ SRCS += bignum_sqr.S SRCS += bignum_sqr_4_8_alt.S SRCS += bignum_sqr_8_16_alt.S SRCS += bignum_sub.S +SRCS += word_clz.S # camellia SRCS+= cmll_misc.c -- cgit v1.2.3-55-g6feb