From a7f629555d85050aa100f0d3319053e6f8f21bdb Mon Sep 17 00:00:00 2001
From: beck <>
Date: Mon, 7 Feb 2005 20:34:54 +0000
Subject: For amd64, build the bn routines in libcrypto with the amd64 specific
 x86_64-gcc.c replacement for the generic bn_asm.c. Seems to give a two to
 threefold speedup for rsa on amd64. ok millert@, hshoexer@

---
 src/lib/libssl/crypto/Makefile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'src/lib')

diff --git a/src/lib/libssl/crypto/Makefile b/src/lib/libssl/crypto/Makefile
index 9baf729b5b..b1bda36b18 100644
--- a/src/lib/libssl/crypto/Makefile
+++ b/src/lib/libssl/crypto/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.36 2004/02/27 17:36:13 deraadt Exp $
+# $OpenBSD: Makefile,v 1.37 2005/02/07 20:34:54 beck Exp $
 
 LIB=	crypto
 
@@ -143,7 +143,8 @@ SRCS+= ec_err.c ec_mult.c ecp_nist.c ecp_smpl.c
 	${LCRYPTO_SRC}/comp ${LCRYPTO_SRC}/txt_db ${LCRYPTO_SRC}/md4 \
 	${LCRYPTO_SRC}/engine ${LCRYPTO_SRC}/dso ${LCRYPTO_SRC}/ui \
 	${LCRYPTO_SRC}/ocsp ${LCRYPTO_SRC}/ec ${LCRYPTO_SRC}/aes ${LCRYPTO_SRC} \
-	${LCRYPTO_SRC}/acss ${.CURDIR}/arch/${MACHINE_ARCH}
+	${LCRYPTO_SRC}/acss ${.CURDIR}/arch/${MACHINE_ARCH} \
+	${LCRYPTO_SRC}/bn/asm
 
 HDRS=\
 	crypto/acss/acss.h \
@@ -283,11 +284,17 @@ SRCS+= bf_enc.c
 SRCS+= bn_asm_vax.S
 SRCS+= rc4_enc.c	
 .else
+.if (${MACHINE_ARCH} == "amd64")
+SRCS+= bf_enc.c
+SRCS+= x86_64-gcc.c
+SRCS+= rc4_enc.c	
+.else
 SRCS+= bf_enc.c	
 SRCS+= bn_asm.c
 SRCS+= rc4_enc.c	
 .endif
 .endif
+.endif
 
 all beforedepend: ${GENERATED}
 
-- 
cgit v1.2.3-55-g6feb