summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/arch/amd64
diff options
context:
space:
mode:
authorjsing <>2023-02-16 11:13:05 +0000
committerjsing <>2023-02-16 11:13:05 +0000
commit78b6c67232479df5c8a2d1b39ea628f0341a4202 (patch)
treea71844b7fce221564ef504741b86d1f18d98a9eb /src/lib/libcrypto/arch/amd64
parent3c4a975cefd1abb53303b3878d5531bcd9212000 (diff)
downloadopenbsd-78b6c67232479df5c8a2d1b39ea628f0341a4202.tar.gz
openbsd-78b6c67232479df5c8a2d1b39ea628f0341a4202.tar.bz2
openbsd-78b6c67232479df5c8a2d1b39ea628f0341a4202.zip
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@
Diffstat (limited to 'src/lib/libcrypto/arch/amd64')
-rw-r--r--src/lib/libcrypto/arch/amd64/Makefile.inc3
1 files changed, 2 insertions, 1 deletions
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 @@
1# $OpenBSD: Makefile.inc,v 1.11 2023/01/29 14:00:41 jsing Exp $ 1# $OpenBSD: Makefile.inc,v 1.12 2023/02/16 11:13:05 jsing Exp $
2 2
3# amd64-specific libcrypto build rules 3# amd64-specific libcrypto build rules
4 4
@@ -39,6 +39,7 @@ SRCS += bignum_sqr.S
39SRCS += bignum_sqr_4_8_alt.S 39SRCS += bignum_sqr_4_8_alt.S
40SRCS += bignum_sqr_8_16_alt.S 40SRCS += bignum_sqr_8_16_alt.S
41SRCS += bignum_sub.S 41SRCS += bignum_sub.S
42SRCS += word_clz.S
42 43
43# camellia 44# camellia
44SRCS+= cmll_misc.c 45SRCS+= cmll_misc.c