summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-05-03 20:06:14 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-05-03 20:06:14 +0000
commit4a9ec26c9ca7e6c580ba93f377174444380fd92b (patch)
tree43744764a6a6ee12e31260a9f2ab3f9b24003666 /lib/libcrypto
parent1e903d5ed3c0624f069ebb274207b58231135423 (diff)
Enable assembler code for AES, DES, GCM, SHA1, SHA256 and SHA512.
The sparcv9 BN code is not enabled, as it expects to run on a 32-bit userland and will need to be fixed for 64-bit userland first.
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/arch/sparc64/Makefile.inc46
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/libcrypto/arch/sparc64/Makefile.inc b/lib/libcrypto/arch/sparc64/Makefile.inc
new file mode 100644
index 00000000000..2565bd42e25
--- /dev/null
+++ b/lib/libcrypto/arch/sparc64/Makefile.inc
@@ -0,0 +1,46 @@
+# $OpenBSD: Makefile.inc,v 1.1 2014/05/03 20:06:13 miod Exp $
+
+# sparc64-specific libcrypto build rules
+
+# aes
+SRCS+= aes_core.c aes_cbc.c
+CFLAGS+= -DAES_ASM
+SSLASM+= aes aes-sparcv9 aes-sparcv9
+# bf
+SRCS+= bf_enc.c
+# bn
+SRCS+= bn_asm.c
+# des
+SRCS+= fcrypt_b.c
+SRCS+= des_enc-sparc.S
+GENERATED+= des_enc-sparc.S
+des_enc-sparc.S: ${LCRYPTO_SRC}/des/asm/des_enc.m4
+ m4 ${LCRYPTO_SRC}/des/asm/des_enc.m4 > ${.TARGET}
+# modes
+CFLAGS+= -DGHASH_ASM
+SSLASM+= modes ghash-sparcv9 ghash-sparcv9
+# rc4
+SRCS+= rc4_enc.c rc4_skey.c
+## rc5
+#SRCS+= rc5_enc.c
+# sha
+SSLASM+= sha sha1-sparcv9 sha1-sparcv9
+CFLAGS+= -DSHA1_ASM
+SSLASM+= sha sha512-sparcv9 sha256-sparcv9
+CFLAGS+= -DSHA256_ASM
+SSLASM+= sha sha512-sparcv9 sha512-sparcv9
+CFLAGS+= -DSHA512_ASM
+# whrlpool
+SRCS+= wp_block.c
+
+.for dir src dst in ${SSLASM}
+SRCS+= ${dst}.S
+GENERATED+=${dst}.S
+${dst}.S: ${LCRYPTO_SRC}/${dir}/asm/${src}.pl
+ /usr/bin/env CC=${CC} /usr/bin/perl \
+ ${LCRYPTO_SRC}/${dir}/asm/${src}.pl ${.TARGET} -m64 > ${.TARGET}
+.endfor
+
+# not until Montgomery code enabled
+#CFLAGS+= -DOPENSSL_CPUID_OBJ
+#SRCS+= sparccpuid.S sparcv9cap.c