From 03e0d0748934886665c3031cda5fdccf45f2fb8d Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Sun, 8 Mar 2015 16:48:49 +0000 Subject: This commit was manufactured by cvs2git to create branch 'OPENBSD_5_7'. --- src/lib/libcrypto/arch/alpha/Makefile.inc | 43 --- src/lib/libcrypto/arch/alpha/opensslconf.h | 156 ---------- src/lib/libcrypto/arch/amd64/Makefile.inc | 75 ----- src/lib/libcrypto/arch/amd64/opensslconf.h | 153 ---------- src/lib/libcrypto/arch/arm/Makefile.inc | 47 --- src/lib/libcrypto/arch/arm/opensslconf.h | 158 ---------- src/lib/libcrypto/arch/hppa/Makefile.inc | 55 ---- src/lib/libcrypto/arch/hppa/opensslconf.h | 158 ---------- src/lib/libcrypto/arch/i386/Makefile.inc | 66 ---- src/lib/libcrypto/arch/i386/opensslconf.h | 158 ---------- src/lib/libcrypto/arch/m88k/opensslconf.h | 158 ---------- src/lib/libcrypto/arch/mips64/Makefile.inc | 44 --- src/lib/libcrypto/arch/mips64/opensslconf.h | 158 ---------- src/lib/libcrypto/arch/powerpc/Makefile.inc | 46 --- src/lib/libcrypto/arch/powerpc/opensslconf.h | 158 ---------- src/lib/libcrypto/arch/sh/opensslconf.h | 158 ---------- src/lib/libcrypto/arch/sparc/Makefile.inc | 29 -- src/lib/libcrypto/arch/sparc/opensslconf.h | 158 ---------- src/lib/libcrypto/arch/sparc64/Makefile.inc | 48 --- src/lib/libcrypto/arch/sparc64/opensslconf.h | 158 ---------- src/lib/libcrypto/arch/vax/Makefile.inc | 21 -- src/lib/libcrypto/arch/vax/bn_asm_vax.S | 436 --------------------------- src/lib/libcrypto/arch/vax/opensslconf.h | 158 ---------- 23 files changed, 2799 deletions(-) delete mode 100644 src/lib/libcrypto/arch/alpha/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/alpha/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/amd64/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/amd64/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/arm/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/arm/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/hppa/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/hppa/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/i386/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/i386/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/m88k/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/mips64/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/mips64/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/powerpc/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/powerpc/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/sh/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/sparc/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/sparc/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/sparc64/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/sparc64/opensslconf.h delete mode 100644 src/lib/libcrypto/arch/vax/Makefile.inc delete mode 100644 src/lib/libcrypto/arch/vax/bn_asm_vax.S delete mode 100644 src/lib/libcrypto/arch/vax/opensslconf.h (limited to 'src/lib/libcrypto/arch') diff --git a/src/lib/libcrypto/arch/alpha/Makefile.inc b/src/lib/libcrypto/arch/alpha/Makefile.inc deleted file mode 100644 index 82fa9fc1f4..0000000000 --- a/src/lib/libcrypto/arch/alpha/Makefile.inc +++ /dev/null @@ -1,43 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.3 2014/11/17 20:31:21 miod Exp $ - -# alpha-specific libcrypto build rules - -# aes -SRCS+= aes_core.c aes_cbc.c -# bf -SRCS+= bf_enc.c -# bn -SRCS+= bn_asm.c -SSLASM+= bn alpha-mont -CFLAGS+= -DOPENSSL_BN_ASM_MONT -# camellia -SRCS+= camellia.c cmll_cbc.c cmll_misc.c -# des -SRCS+= des_enc.c fcrypt_b.c -# modes -CFLAGS+= -DGHASH_ASM -SSLASM+= modes ghash-alpha -# rc4 -SRCS+= rc4_enc.c rc4_skey.c -## rc5 -#SRCS+= rc5_enc.c -# sha -CFLAGS+= -DSHA1_ASM -SSLASM+= sha sha1-alpha -# whrlpool -SRCS+= wp_block.c - -.for dir f in ${SSLASM} -SRCS+= ${f}.S -GENERATED+=${f}.S -${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl - /usr/bin/perl \ - ${LCRYPTO_SRC}/${dir}/asm/${f}.pl > ${.TARGET} -.endfor - -CFLAGS+= -DOPENSSL_CPUID_OBJ -SRCS+= alphacpuid.S -GENERATED+=alphacpuid.S -alphacpuid.S: ${LCRYPTO_SRC}/alphacpuid.pl - /usr/bin/perl \ - ${LCRYPTO_SRC}/alphacpuid.pl > ${.TARGET} diff --git a/src/lib/libcrypto/arch/alpha/opensslconf.h b/src/lib/libcrypto/arch/alpha/opensslconf.h deleted file mode 100644 index 6e1e9b6f53..0000000000 --- a/src/lib/libcrypto/arch/alpha/opensslconf.h +++ /dev/null @@ -1,156 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#define RC4_CHUNK unsigned long -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#undef BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#define SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#undef THIRTY_TWO_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#define BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#define DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#define DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#undef DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/amd64/Makefile.inc b/src/lib/libcrypto/arch/amd64/Makefile.inc deleted file mode 100644 index 3f92196451..0000000000 --- a/src/lib/libcrypto/arch/amd64/Makefile.inc +++ /dev/null @@ -1,75 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.4 2014/11/17 20:31:21 miod Exp $ - -# amd64-specific libcrypto build rules - -# aes -CFLAGS+= -DAES_ASM -SSLASM+= aes aes-x86_64 -CFLAGS+= -DBSAES_ASM -SSLASM+= aes bsaes-x86_64 -CFLAGS+= -DVPAES_ASM -SSLASM+= aes vpaes-x86_64 -SSLASM+= aes aesni-x86_64 -SSLASM+= aes aesni-sha1-x86_64 -# bf -SRCS+= bf_enc.c -# bn -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DRSA_ASM -SSLASM+= bn modexp512-x86_64 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -SSLASM+= bn x86_64-mont -CFLAGS+= -DOPENSSL_BN_ASM_MONT5 -SSLASM+= bn x86_64-mont5 -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -SSLASM+= bn x86_64-gf2m -# camellia -SRCS+= cmll_misc.c -SSLASM+= camellia cmll-x86_64 -# des -SRCS+= des_enc.c fcrypt_b.c -# md5 -CFLAGS+= -DMD5_ASM -SSLASM+= md5 md5-x86_64 -# modes -CFLAGS+= -DGHASH_ASM -SSLASM+= modes ghash-x86_64 -# rc4 -CFLAGS+= -DRC4_MD5_ASM -SSLASM+= rc4 rc4-x86_64 -SSLASM+= rc4 rc4-md5-x86_64 -# ripemd -# sha -CFLAGS+= -DSHA1_ASM -SSLASM+= sha sha1-x86_64 -CFLAGS+= -DSHA256_ASM -SRCS+= sha256-x86_64.S -GENERATED+= sha256-x86_64.S -sha256-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl - cd ${LCRYPTO_SRC}/sha/asm ; \ - /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET} -CFLAGS+= -DSHA512_ASM -SRCS+= sha512-x86_64.S -GENERATED+= sha512-x86_64.S -sha512-x86_64.S: ${LCRYPTO_SRC}/sha/asm/sha512-x86_64.pl - cd ${LCRYPTO_SRC}/sha/asm ; \ - /usr/bin/perl ./sha512-x86_64.pl ${.OBJDIR}/${.TARGET} -# whrlpool -CFLAGS+= -DWHIRLPOOL_ASM -SSLASM+= whrlpool wp-x86_64 - -.for dir f in ${SSLASM} -SRCS+= ${f}.S -GENERATED+=${f}.S -${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl - (cd ${LCRYPTO_SRC}/${dir} ; \ - /usr/bin/perl ./asm/${f}.pl openbsd-elf) > ${.TARGET} -.endfor - -CFLAGS+= -DOPENSSL_CPUID_OBJ -SRCS+= x86_64cpuid.S x86_64-gcc.c -GENERATED+=x86_64cpuid.S - -x86_64cpuid.S: ${LCRYPTO_SRC}/x86_64cpuid.pl - (cd ${LCRYPTO_SRC}/${dir} ; \ - /usr/bin/perl ./x86_64cpuid.pl) > ${.TARGET} diff --git a/src/lib/libcrypto/arch/amd64/opensslconf.h b/src/lib/libcrypto/arch/amd64/opensslconf.h deleted file mode 100644 index c64d4d336c..0000000000 --- a/src/lib/libcrypto/arch/amd64/opensslconf.h +++ /dev/null @@ -1,153 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#define RC4_CHUNK unsigned long -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#undef BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -#define SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#undef THIRTY_TWO_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#define DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/arm/Makefile.inc b/src/lib/libcrypto/arch/arm/Makefile.inc deleted file mode 100644 index 22145a79cc..0000000000 --- a/src/lib/libcrypto/arch/arm/Makefile.inc +++ /dev/null @@ -1,47 +0,0 @@ -# $oPenBSD: Makefile.inc,v 1.2 2014/05/02 18:21:39 miod Exp $ - -# arm-specific libcrypto build rules - -# aes -SRCS+= aes_cbc.c -CFLAGS+= -DAES_ASM -SSLASM+= aes aes-armv4 -# bf -SRCS+= bf_enc.c -# bn -SRCS+= bn_asm.c -CFLAGS+= -DOPENSSL_BN_ASM_MONT -SSLASM+= bn armv4-mont -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -SSLASM+= bn armv4-gf2m -# camellia -SRCS+= camellia.c cmll_cbc.c cmll_misc.c -# des -SRCS+= des_enc.c fcrypt_b.c -# modes -CFLAGS+= -DGHASH_ASM -SSLASM+= modes ghash-armv4 -# rc4 -SRCS+= rc4_enc.c rc4_skey.c -## rc5 -#SRCS+= rc5_enc.c -# sha -CFLAGS+= -DSHA1_ASM -SSLASM+= sha sha1-armv4-large -CFLAGS+= -DSHA256_ASM -SSLASM+= sha sha256-armv4 -CFLAGS+= -DSHA512_ASM -SSLASM+= sha sha512-armv4 -# whrlpool -SRCS+= wp_block.c - -.for dir f in ${SSLASM} -SRCS+= ${f}.S -GENERATED+=${f}.S -${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl - /usr/bin/perl \ - ${LCRYPTO_SRC}/${dir}/asm/${f}.pl void ${.TARGET} > ${.TARGET} -.endfor - -CFLAGS+= -DOPENSSL_CPUID_OBJ -SRCS+= armv4cpuid.S armcap.c diff --git a/src/lib/libcrypto/arch/arm/opensslconf.h b/src/lib/libcrypto/arch/arm/opensslconf.h deleted file mode 100644 index afbd54ed3d..0000000000 --- a/src/lib/libcrypto/arch/arm/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#define DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/hppa/Makefile.inc b/src/lib/libcrypto/arch/hppa/Makefile.inc deleted file mode 100644 index d8ca1065d6..0000000000 --- a/src/lib/libcrypto/arch/hppa/Makefile.inc +++ /dev/null @@ -1,55 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.8 2015/03/05 20:35:28 miod Exp $ - -# hppa-specific libcrypto build rules - -# aes -SRCS+= aes_core.c aes_cbc.c -CFLAGS+= -DAES_ASM -SSLASM+= aes aes-parisc aes-parisc -# bf -SRCS+= bf_enc.c -# bn -SRCS+= bn_asm.c -SSLASM+= bn parisc-mont parisc-mont -CFLAGS+= -DOPENSSL_BN_ASM_MONT -DBN_DIV2W -# camellia -SRCS+= camellia.c cmll_cbc.c cmll_misc.c -# des -SRCS+= des_enc.c fcrypt_b.c -# modes -CFLAGS+= -DGHASH_ASM -SSLASM+= modes ghash-parisc ghash-parisc -# rc4 -.if 0 # about 35% slower than C code -SSLASM+= rc4 rc4-parisc rc4-parisc -.else -SRCS+= rc4_enc.c rc4_skey.c -.endif -## rc5 -#SRCS+= rc5_enc.c -# sha -CFLAGS+= -DSHA1_ASM -SSLASM+= sha sha1-parisc sha1-parisc -.if 0 # sha512 subtly broken, sha256 probably as well -CFLAGS+= -DSHA256_ASM -SSLASM+= sha sha512-parisc sha256-parisc -CFLAGS+= -DSHA512_ASM -SSLASM+= sha sha512-parisc sha512-parisc -.endif -# 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/perl \ - ${LCRYPTO_SRC}/${dir}/asm/${src}.pl 32 ${.TARGET} > ${.TARGET} -.endfor - -CFLAGS+= -DOPENSSL_CPUID_OBJ -SRCS+= pariscid.S -GENERATED+=pariscid.S -pariscid.S: ${LCRYPTO_SRC}/pariscid.pl - /usr/bin/perl \ - ${LCRYPTO_SRC}/pariscid.pl 32 > ${.TARGET} diff --git a/src/lib/libcrypto/arch/hppa/opensslconf.h b/src/lib/libcrypto/arch/hppa/opensslconf.h deleted file mode 100644 index afbd54ed3d..0000000000 --- a/src/lib/libcrypto/arch/hppa/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#define DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/i386/Makefile.inc b/src/lib/libcrypto/arch/i386/Makefile.inc deleted file mode 100644 index f4e1f36b1c..0000000000 --- a/src/lib/libcrypto/arch/i386/Makefile.inc +++ /dev/null @@ -1,66 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.4 2014/11/17 20:31:22 miod Exp $ - -# i386-specific libcrypto build rules - -# aes -CFLAGS+= -DAES_ASM -SSLASM+= aes aes-586 -CFLAGS+= -DVPAES_ASM -SSLASM+= aes vpaes-x86 -SSLASM+= aes aesni-x86 -# bf -SRCS+= bf_cbc.c -SSLASM+= bf bf-586 -# bn -CFLAGS+= -DOPENSSL_IA32_SSE2 -CFLAGS+= -DOPENSSL_BN_ASM_PART_WORDS -SSLASM+= bn bn-586 -SSLASM+= bn co-586 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -SSLASM+= bn x86-mont -CFLAGS+= -DOPENSSL_BN_ASM_GF2m -SSLASM+= bn x86-gf2m -# camellia -SSLASM+= camellia cmll-x86 -# des -SRCS+= fcrypt_b.c -SSLASM+= des des-586 -# md5 -CFLAGS+= -DMD5_ASM -SSLASM+= md5 md5-586 -# modes -CFLAGS+= -DGHASH_ASM -SSLASM+= modes ghash-x86 -# rc4 -SSLASM+= rc4 rc4-586 -# ripemd -CFLAGS+= -DRMD160_ASM -SSLASM+= ripemd rmd-586 -# sha -CFLAGS+= -DSHA1_ASM -SSLASM+= sha sha1-586 -CFLAGS+= -DSHA256_ASM -SSLASM+= sha sha256-586 -CFLAGS+= -DSHA512_ASM -SSLASM+= sha sha512-586 -# whrlpool -SRCS+= wp_block.c -CFLAGS+= -DWHIRLPOOL_ASM -SSLASM+= whrlpool wp-mmx - -.for dir f in ${SSLASM} -SRCS+= ${f}.S -GENERATED+=${f}.S -${f}.S: ${LCRYPTO_SRC}/${dir}/asm/${f}.pl ${LCRYPTO_SRC}/perlasm/x86gas.pl - /usr/bin/perl -I${LCRYPTO_SRC}/perlasm -I${LCRYPTO_SRC}/${dir}/asm \ - ${LCRYPTO_SRC}/${dir}/asm/${f}.pl \ - openbsd-elf ${CFLAGS} 386 ${PICFLAG} > ${.TARGET} -.endfor - -CFLAGS+= -DOPENSSL_CPUID_OBJ -SRCS+= x86cpuid.S -GENERATED+=x86cpuid.S - -x86cpuid.S: ${LCRYPTO_SRC}/x86cpuid.pl ${LCRYPTO_SRC}/perlasm/x86gas.pl - /usr/bin/perl -I${LCRYPTO_SRC}/perlasm ${LCRYPTO_SRC}/x86cpuid.pl \ - openbsd-elf ${CFLAGS} 386 ${PICFLAG} > ${.TARGET} diff --git a/src/lib/libcrypto/arch/i386/opensslconf.h b/src/lib/libcrypto/arch/i386/opensslconf.h deleted file mode 100644 index e47000cf63..0000000000 --- a/src/lib/libcrypto/arch/i386/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned long -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#define DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#define DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#define DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/m88k/opensslconf.h b/src/lib/libcrypto/arch/m88k/opensslconf.h deleted file mode 100644 index afbd54ed3d..0000000000 --- a/src/lib/libcrypto/arch/m88k/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#define DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/mips64/Makefile.inc b/src/lib/libcrypto/arch/mips64/Makefile.inc deleted file mode 100644 index b6fc8971e7..0000000000 --- a/src/lib/libcrypto/arch/mips64/Makefile.inc +++ /dev/null @@ -1,44 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.4 2014/12/07 15:45:44 miod Exp $ - -# mips64-specific libcrypto build rules - -# aes -SRCS+= aes_cbc.c -CFLAGS+= -DAES_ASM -SSLASM+= aes aes-mips aes-mips -# bf -SRCS+= bf_enc.c -# bn -.if ${MACHINE} == "sgi" # because of R4000 support -SRCS+= bn_asm.c -.else -SSLASM+= bn mips bn-mips -CFLAGS+= -DBN_DIV3W -.endif -SSLASM+= bn mips-mont mips-mont -CFLAGS+= -DOPENSSL_BN_ASM_MONT -# camellia -SRCS+= camellia.c cmll_cbc.c cmll_misc.c -# des -SRCS+= des_enc.c fcrypt_b.c -# rc4 -SRCS+= rc4_enc.c rc4_skey.c -## rc5 -#SRCS+= rc5_enc.c -# sha -SSLASM+= sha sha1-mips sha1-mips -CFLAGS+= -DSHA1_ASM -SSLASM+= sha sha512-mips sha256-mips -CFLAGS+= -DSHA256_ASM -SSLASM+= sha sha512-mips sha512-mips -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 64 ${.TARGET} > ${.TARGET} -.endfor diff --git a/src/lib/libcrypto/arch/mips64/opensslconf.h b/src/lib/libcrypto/arch/mips64/opensslconf.h deleted file mode 100644 index 52159f3013..0000000000 --- a/src/lib/libcrypto/arch/mips64/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#define RC4_CHUNK unsigned long -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#undef BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#define SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#undef THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#define BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#define DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#define DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#undef DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/powerpc/Makefile.inc b/src/lib/libcrypto/arch/powerpc/Makefile.inc deleted file mode 100644 index 46790859b5..0000000000 --- a/src/lib/libcrypto/arch/powerpc/Makefile.inc +++ /dev/null @@ -1,46 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/11/17 20:31:22 miod Exp $ - -# powerpc-specific libcrypto build rules - -# aes -SRCS+= aes_core.c aes_cbc.c -# slower than C code -#CFLAGS+= -DAES_ASM -#SSLASM+= aes aes-ppc aes-ppc -# bf -SRCS+= bf_enc.c -# bn -SSLASM+= bn ppc bn-ppc -SSLASM+= bn ppc-mont ppc-mont # bn_mul_mont_int -#SSLASM+= bn ppc64-mont ppc64-mont # bn_mul_mont_fpu64 -CFLAGS+= -DOPENSSL_BN_ASM_MONT -# camellia -SRCS+= camellia.c cmll_cbc.c cmll_misc.c -# des -SRCS+= des_enc.c fcrypt_b.c -# rc4 -SRCS+= rc4_enc.c rc4_skey.c -## rc5 -#SRCS+= rc5_enc.c -# sha -CFLAGS+= -DSHA1_ASM -SSLASM+= sha sha1-ppc sha1-ppc -CFLAGS+= -DSHA256_ASM -SSLASM+= sha sha512-ppc sha256-ppc -# 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/perl \ - ${LCRYPTO_SRC}/${dir}/asm/${src}.pl linux32 ${.TARGET} > ${.TARGET} -.endfor - -#CFLAGS+= -DOPENSSL_CPUID_OBJ # it's commented out in ppccap.c -SRCS+= ppccpuid.S ppccap.c -GENERATED+=ppccpuid.S -ppccpuid.S: ${LCRYPTO_SRC}/ppccpuid.pl - /usr/bin/perl \ - ${LCRYPTO_SRC}/ppccpuid.pl linux32 > ${.TARGET} diff --git a/src/lib/libcrypto/arch/powerpc/opensslconf.h b/src/lib/libcrypto/arch/powerpc/opensslconf.h deleted file mode 100644 index afbd54ed3d..0000000000 --- a/src/lib/libcrypto/arch/powerpc/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#define DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/sh/opensslconf.h b/src/lib/libcrypto/arch/sh/opensslconf.h deleted file mode 100644 index afbd54ed3d..0000000000 --- a/src/lib/libcrypto/arch/sh/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#define DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/sparc/Makefile.inc b/src/lib/libcrypto/arch/sparc/Makefile.inc deleted file mode 100644 index ba9954c85e..0000000000 --- a/src/lib/libcrypto/arch/sparc/Makefile.inc +++ /dev/null @@ -1,29 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/11/17 20:31:22 miod Exp $ - -# sparc-specific libcrypto build rules - -# aes -SRCS+= aes_core.c aes_cbc.c -# bf -SRCS+= bf_enc.c -# bn -.if 0 # uses `umul' and `udiv' instructions -SRCS+= sparcv8.S -.PATH: ${LCRYPTO_SRC}/bn/asm -.else -SRCS+= bn_asm.c -.endif -# camellia -SRCS+= camellia.c cmll_cbc.c cmll_misc.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} -# rc4 -SRCS+= rc4_enc.c rc4_skey.c -## rc5 -#SRCS+= rc5_enc.c -# whrlpool -SRCS+= wp_block.c diff --git a/src/lib/libcrypto/arch/sparc/opensslconf.h b/src/lib/libcrypto/arch/sparc/opensslconf.h deleted file mode 100644 index afbd54ed3d..0000000000 --- a/src/lib/libcrypto/arch/sparc/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#define DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/sparc64/Makefile.inc b/src/lib/libcrypto/arch/sparc64/Makefile.inc deleted file mode 100644 index e3f217dbb8..0000000000 --- a/src/lib/libcrypto/arch/sparc64/Makefile.inc +++ /dev/null @@ -1,48 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/11/17 20:31:22 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 -# camellia -SRCS+= camellia.c cmll_cbc.c cmll_misc.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 diff --git a/src/lib/libcrypto/arch/sparc64/opensslconf.h b/src/lib/libcrypto/arch/sparc64/opensslconf.h deleted file mode 100644 index 52159f3013..0000000000 --- a/src/lib/libcrypto/arch/sparc64/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#define RC4_CHUNK unsigned long -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#undef BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#define SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#undef THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#undef RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#define BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#define DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#define DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#undef DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ diff --git a/src/lib/libcrypto/arch/vax/Makefile.inc b/src/lib/libcrypto/arch/vax/Makefile.inc deleted file mode 100644 index f7764cf44a..0000000000 --- a/src/lib/libcrypto/arch/vax/Makefile.inc +++ /dev/null @@ -1,21 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2014/11/17 20:31:22 miod Exp $ - -# vax-specific libcrypto build rules - -# aes -CFLAGS+=-DOPENSSL_NO_ASM -SRCS+= aes_core.c aes_cbc.c -# bf -SRCS+= bf_enc.c -# bn -SRCS+= bn_asm_vax.S -# camellia -SRCS+= camellia.c cmll_cbc.c cmll_misc.c -# des -SRCS+= des_enc.c fcrypt_b.c -# rc4 -SRCS+= rc4_enc.c rc4_skey.c -## rc5 -#SRCS+= rc5_enc.c -# whrlpool -SRCS+= wp_block.c diff --git a/src/lib/libcrypto/arch/vax/bn_asm_vax.S b/src/lib/libcrypto/arch/vax/bn_asm_vax.S deleted file mode 100644 index 2969ae9dac..0000000000 --- a/src/lib/libcrypto/arch/vax/bn_asm_vax.S +++ /dev/null @@ -1,436 +0,0 @@ -# $OpenBSD: bn_asm_vax.S,v 1.1 2014/04/11 22:51:53 miod Exp $ -# $NetBSD: bn_asm_vax.S,v 1.1 2003/11/03 10:22:28 ragge Exp $ - -#include - -# w.j.m. 15-jan-1999 -# -# it's magic ... -# -# ULONG bn_mul_add_words(ULONG r[],ULONG a[],int n,ULONG w) { -# ULONG c = 0; -# int i; -# for(i = 0; i < n; i++) := r[i] + c + a[i] * w ; -# return c; -# } - -ENTRY(bn_mul_add_words,R6) - movl 4(%ap),%r2 # *r - movl 8(%ap),%r3 # *a - movl 12(%ap),%r4 # n - movl 16(%ap),%r5 # w - clrl %r6 # return value ("carry") - -0: emul %r5,(%r3),(%r2),%r0 # w * a[0] + r[0] -> r0 - - # fixup for "negative" r[] - tstl (%r2) - bgeq 1f - incl %r1 # add 1 to highword - -1: # add saved carry to result - addl2 %r6,%r0 - adwc $0,%r1 - - # combined fixup for "negative" w, a[] - tstl %r5 # if w is negative... - bgeq 1f - addl2 (%r3),%r1 # ...add a[0] again to highword -1: tstl (%r3) # if a[0] is negative... - bgeq 1f - addl2 %r5,%r1 # ...add w again to highword -1: - movl %r0,(%r2)+ # save low word in dest & advance *r - addl2 $4,%r3 # advance *a - movl %r1,%r6 # high word in r6 for return value - - sobgtr %r4,0b # loop? - - movl %r6,%r0 - ret - -# .title vax_bn_mul_words unsigned multiply & add, 32*32+32=>64 -#; -#; w.j.m. 15-jan-1999 -#; -#; it's magic ... -#; -#; ULONG bn_mul_words(ULONG r[],ULONG a[],int n,ULONG w) { -#; ULONG c = 0; -#; int i; -#; for(i = 0; i < num; i++) := a[i] * w + c ; -#; return(c); -#; } -# - -ENTRY(bn_mul_words,R6) - movl 4(%ap),%r2 # *r - movl 8(%ap),%r3 # *a - movl 12(%ap),%r4 # n - movl 16(%ap),%r5 # w - clrl %r6 # carry - -0: emul %r5,(%r3),%r6,%r0 # w * a[0] + carry -> r0 - - # fixup for "negative" carry - tstl %r6 - bgeq 1f - incl %r1 - -1: # combined fixup for "negative" w, a[] - tstl %r5 - bgeq 1f - addl2 (%r3),%r1 -1: tstl (%r3) - bgeq 1f - addl2 %r5,%r1 - -1: movl %r0,(%r2)+ - addl2 $4,%r3 - movl %r1,%r6 - - sobgtr %r4,0b - - movl %r6,%r0 - ret - - - -# .title vax_bn_sqr_words unsigned square, 32*32=>64 -#; -#; w.j.m. 15-jan-1999 -#; -#; it's magic ... -#; -#; void bn_sqr_words(ULONG r[],ULONG a[],int n) { -#; int i; -#; for(i = 0; i < n; i++) := a[i] * a[i] ; -#; } -# - -ENTRY(bn_sqr_words,0) - movl 4(%ap),%r2 # r - movl 8(%ap),%r3 # a - movl 12(%ap),%r4 # n - -0: movl (%r3)+,%r5 # r5 = a[] & advance - - emul %r5,%r5,$0,%r0 # a[0] * a[0] + 0 -> r0 - - # fixup for "negative" a[] - tstl %r5 - bgeq 1f - addl2 %r5,%r1 - addl2 %r5,%r1 - -1: movq %r0,(%r2)+ # store 64-bit result - - sobgtr %r4,0b # loop - - ret - - -# .title vax_bn_div_words unsigned divide -#; -#; Richard Levitte 20-Nov-2000 -#; -#; ULONG bn_div_words(ULONG h, ULONG l, ULONG d) -#; { -#; return ((ULONG)((((ULLONG)h)<<32)|l) / (ULLONG)d); -#; } -#; -#; Using EDIV would be very easy, if it didn't do signed calculations. -#; Any time any of the input numbers are signed, there are problems, -#; usually with integer overflow, at which point it returns useless -#; data (the quotient gets the value of l, and the remainder becomes 0). -#; -#; If it was just for the dividend, it would be very easy, just divide -#; it by 2 (unsigned), do the division, multiply the resulting quotient -#; and remainder by 2, add the bit that was dropped when dividing by 2 -#; to the remainder, and do some adjustment so the remainder doesn't -#; end up larger than the divisor. For some cases when the divisor is -#; negative (from EDIV's point of view, i.e. when the highest bit is set), -#; dividing the dividend by 2 isn't enough, and since some operations -#; might generate integer overflows even when the dividend is divided by -#; 4 (when the high part of the shifted down dividend ends up being exactly -#; half of the divisor, the result is the quotient 0x80000000, which is -#; negative...) it needs to be divided by 8. Furthermore, the divisor needs -#; to be divided by 2 (unsigned) as well, to avoid more problems with the sign. -#; In this case, a little extra fiddling with the remainder is required. -#; -#; So, the simplest way to handle this is always to divide the dividend -#; by 8, and to divide the divisor by 2 if it's highest bit is set. -#; After EDIV has been used, the quotient gets multiplied by 8 if the -#; original divisor was positive, otherwise 4. The remainder, oddly -#; enough, is *always* multiplied by 8. -#; NOTE: in the case mentioned above, where the high part of the shifted -#; down dividend ends up being exactly half the shifted down divisor, we -#; end up with a 33 bit quotient. That's no problem however, it usually -#; means we have ended up with a too large remainder as well, and the -#; problem is fixed by the last part of the algorithm (next paragraph). -#; -#; The routine ends with comparing the resulting remainder with the -#; original divisor and if the remainder is larger, subtract the -#; original divisor from it, and increase the quotient by 1. This is -#; done until the remainder is smaller than the divisor. -#; -#; The complete algorithm looks like this: -#; -#; d' = d -#; l' = l & 7 -#; [h,l] = [h,l] >> 3 -#; [q,r] = floor([h,l] / d) # This is the EDIV operation -#; if (q < 0) q = -q # I doubt this is necessary any more -#; -#; r' = r >> 29 -#; if (d' >= 0) -#; q' = q >> 29 -#; q = q << 3 -#; else -#; q' = q >> 30 -#; q = q << 2 -#; r = (r << 3) + l' -#; -#; if (d' < 0) -#; { -#; [r',r] = [r',r] - q -#; while ([r',r] < 0) -#; { -#; [r',r] = [r',r] + d -#; [q',q] = [q',q] - 1 -#; } -#; } -#; -#; while ([r',r] >= d') -#; { -#; [r',r] = [r',r] - d' -#; [q',q] = [q',q] + 1 -#; } -#; -#; return q -# -#;r2 = l, q -#;r3 = h, r -#;r4 = d -#;r5 = l' -#;r6 = r' -#;r7 = d' -#;r8 = q' -# - -ENTRY(bn_div_words,R6|R7|R8) - movl 4(%ap),%r3 # h - movl 8(%ap),%r2 # l - movl 12(%ap),%r4 # d - - bicl3 $-8,%r2,%r5 # l' = l & 7 - bicl3 $7,%r2,%r2 - - bicl3 $-8,%r3,%r6 - bicl3 $7,%r3,%r3 - - addl2 %r6,%r2 - - rotl $-3,%r2,%r2 # l = l >> 3 - rotl $-3,%r3,%r3 # h = h >> 3 - - movl %r4,%r7 # d' = d - - clrl %r6 # r' = 0 - clrl %r8 # q' = 0 - - tstl %r4 - beql 0f # Uh-oh, the divisor is 0... - bgtr 1f - rotl $-1,%r4,%r4 # If d is negative, shift it right. - bicl2 $0x80000000,%r4 # Since d is then a large number, the - # lowest bit is insignificant - # (contradict that, and I'll fix the problem!) -1: - ediv %r4,%r2,%r2,%r3 # Do the actual division - - tstl %r2 - bgeq 1f - mnegl %r2,%r2 # if q < 0, negate it -1: - tstl %r7 - blss 1f - rotl $3,%r2,%r2 # q = q << 3 - bicl3 $-8,%r2,%r8 # q' gets the high bits from q - bicl3 $7,%r2,%r2 - brb 2f - -1: # else - rotl $2,%r2,%r2 # q = q << 2 - bicl3 $-4,%r2,%r8 # q' gets the high bits from q - bicl3 $3,%r2,%r2 -2: - rotl $3,%r3,%r3 # r = r << 3 - bicl3 $-8,%r3,%r6 # r' gets the high bits from r - bicl3 $7,%r3,%r3 - addl2 %r5,%r3 # r = r + l' - - tstl %r7 - bgeq 5f - bitl $1,%r7 - beql 5f # if d' < 0 && d' & 1 - subl2 %r2,%r3 # [r',r] = [r',r] - [q',q] - sbwc %r8,%r6 -3: - bgeq 5f # while r < 0 - decl %r2 # [q',q] = [q',q] - 1 - sbwc $0,%r8 - addl2 %r7,%r3 # [r',r] = [r',r] + d' - adwc $0,%r6 - brb 3b - -# The return points are placed in the middle to keep a short distance from -# all the branch points -1: -# movl %r3,%r1 - movl %r2,%r0 - ret -0: - movl $-1,%r0 - ret -5: - tstl %r6 - bneq 6f - cmpl %r3,%r7 - blssu 1b # while [r',r] >= d' -6: - subl2 %r7,%r3 # [r',r] = [r',r] - d' - sbwc $0,%r6 - incl %r2 # [q',q] = [q',q] + 1 - adwc $0,%r8 - brb 5b - - - -# .title vax_bn_add_words unsigned add of two arrays -#; -#; Richard Levitte 20-Nov-2000 -#; -#; ULONG bn_add_words(ULONG r[], ULONG a[], ULONG b[], int n) { -#; ULONG c = 0; -#; int i; -#; for (i = 0; i < n; i++) = a[i] + b[i] + c; -#; return(c); -#; } -# - -ENTRY(bn_add_words,0) - movl 4(%ap),%r2 # r - movl 8(%ap),%r3 # a - movl 12(%ap),%r4 # b - movl 16(%ap),%r5 # n - clrl %r0 - - tstl %r5 - bleq 1f - -0: movl (%r3)+,%r1 # carry untouched - adwc (%r4)+,%r1 # carry used and touched - movl %r1,(%r2)+ # carry untouched - sobgtr %r5,0b # carry untouched - - adwc $0,%r0 -1: ret - -#; -#; Richard Levitte 20-Nov-2000 -#; -#; ULONG bn_sub_words(ULONG r[], ULONG a[], ULONG b[], int n) { -#; ULONG c = 0; -#; int i; -#; for (i = 0; i < n; i++) = a[i] - b[i] - c; -#; return(c); -#; } -# - -ENTRY(bn_sub_words,R6) - movl 4(%ap),%r2 # r - movl 8(%ap),%r3 # a - movl 12(%ap),%r4 # b - movl 16(%ap),%r5 # n - clrl %r0 - - tstl %r5 - bleq 1f - -0: movl (%r3)+,%r6 # carry untouched - sbwc (%r4)+,%r6 # carry used and touched - movl %r6,(%r2)+ # carry untouched - sobgtr %r5,0b # carry untouched - -1: adwc $0,%r0 - ret - -# -# Ragge 20-Sep-2003 -# -# Multiply a vector of 4/8 longword by another. -# Uses two loops and 16/64 emuls. -# - -ENTRY(bn_mul_comba4,R6|R7|R8|R9) - movl $4,%r9 # 4*4 - brb 6f - -ENTRY(bn_mul_comba8,R6|R7|R8|R9) - movl $8,%r9 # 8*8 - -6: movl 8(%ap),%r3 # a[] - movl 12(%ap),%r7 # b[] - brb 5f - -ENTRY(bn_sqr_comba4,R6|R7|R8|R9) - movl $4,%r9 # 4*4 - brb 0f - -ENTRY(bn_sqr_comba8,R6|R7|R8|R9) - movl $8,%r9 # 8*8 - -0: - movl 8(%ap),%r3 # a[] - movl %r3,%r7 # a[] - -5: movl 4(%ap),%r5 # r[] - movl %r9,%r8 - - clrq (%r5) # clear destinatino, for add. - clrq 8(%r5) - clrq 16(%r5) # these only needed for comba8 - clrq 24(%r5) - -2: clrl %r4 # carry - movl %r9,%r6 # inner loop count - movl (%r7)+,%r2 # value to multiply with - -1: emul %r2,(%r3),%r4,%r0 - tstl %r4 - bgeq 3f - incl %r1 -3: tstl %r2 - bgeq 3f - addl2 (%r3),%r1 -3: tstl (%r3) - bgeq 3f - addl2 %r2,%r1 - -3: addl2 %r0,(%r5)+ # add to destination - adwc $0,%r1 # remember carry - movl %r1,%r4 # add carry in next emul - addl2 $4,%r3 - sobgtr %r6,1b - - movl %r4,(%r5) # save highest add result - - ashl $2,%r9,%r4 - subl2 %r4,%r3 - subl2 $4,%r4 - subl2 %r4,%r5 - - sobgtr %r8,2b - - ret diff --git a/src/lib/libcrypto/arch/vax/opensslconf.h b/src/lib/libcrypto/arch/vax/opensslconf.h deleted file mode 100644 index afbd54ed3d..0000000000 --- a/src/lib/libcrypto/arch/vax/opensslconf.h +++ /dev/null @@ -1,158 +0,0 @@ -#include -/* crypto/opensslconf.h.in */ - -/* Generate 80386 code? */ -#undef I386_ONLY - -#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) -#define ENGINESDIR "/usr/lib/engines" -#define OPENSSLDIR "/etc/ssl" -#endif - -#undef OPENSSL_UNISTD -#define OPENSSL_UNISTD - -#undef OPENSSL_EXPORT_VAR_AS_FUNCTION - -#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) -#define IDEA_INT unsigned int -#endif - -#if defined(HEADER_MD2_H) && !defined(MD2_INT) -#define MD2_INT unsigned int -#endif - -#if defined(HEADER_RC2_H) && !defined(RC2_INT) -/* I need to put in a mod for the alpha - eay */ -#define RC2_INT unsigned int -#endif - -#if defined(HEADER_RC4_H) -#if !defined(RC4_INT) -/* using int types make the structure larger but make the code faster - * on most boxes I have tested - up to %20 faster. */ -/* - * I don't know what does "most" mean, but declaring "int" is a must on: - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ -#define RC4_INT unsigned int -#endif -#if !defined(RC4_CHUNK) -/* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ -#undef RC4_CHUNK -#endif -#endif - -#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) -/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ -#ifndef DES_LONG -#define DES_LONG unsigned int -#endif -#endif - -#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) -#define CONFIG_HEADER_BN_H -#define BN_LLONG - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -/* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ -#undef SIXTY_FOUR_BIT_LONG -#undef SIXTY_FOUR_BIT -#define THIRTY_TWO_BIT -#undef SIXTEEN_BIT -#undef EIGHT_BIT -#endif - -#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) -#define CONFIG_HEADER_RC4_LOCL_H -/* if this is defined data[i] is used instead of *data, this is a %20 - * speedup on x86 */ -#define RC4_INDEX -#endif - -#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) -#define CONFIG_HEADER_BF_LOCL_H -#undef BF_PTR -#endif /* HEADER_BF_LOCL_H */ - -#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -#define CONFIG_HEADER_DES_LOCL_H -#ifndef DES_DEFAULT_OPTIONS -/* the following is tweaked from a config script, that is why it is a - * protected undef/define */ -#ifndef DES_PTR -#undef DES_PTR -#endif - -/* This helps C compiler generate the correct code for multiple functional - * units. It reduces register dependancies at the expense of 2 more - * registers */ -#ifndef DES_RISC1 -#undef DES_RISC1 -#endif - -#ifndef DES_RISC2 -#undef DES_RISC2 -#endif - -#if defined(DES_RISC1) && defined(DES_RISC2) -YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! -#endif - -/* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ -#ifndef DES_UNROLL -#define DES_UNROLL -#endif - -/* These default values were supplied by - * Peter Gutman - * They are only used if nothing else has been defined */ -#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) -/* Special defines which change the way the code is built depending on the - CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find - even newer MIPS CPU's, but at the moment one size fits all for - optimization options. Older Sparc's work better with only UNROLL, but - there's no way to tell at compile time what it is you're running on */ - -#if defined( sun ) /* Newer Sparc's */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#elif defined( __ultrix ) /* Older MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined( __osf1__ ) /* Alpha */ -# define DES_PTR -# define DES_RISC2 -#elif defined ( _AIX ) /* RS6000 */ - /* Unknown */ -#elif defined( __hpux ) /* HP-PA */ - /* Unknown */ -#elif defined( __aux ) /* 68K */ - /* Unknown */ -#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ -# define DES_UNROLL -#elif defined( __sgi ) /* Newer MIPS */ -# define DES_PTR -# define DES_RISC2 -# define DES_UNROLL -#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ -# define DES_PTR -# define DES_RISC1 -# define DES_UNROLL -#endif /* Systems-specific speed defines */ -#endif - -#endif /* DES_DEFAULT_OPTIONS */ -#endif /* HEADER_DES_LOCL_H */ -- cgit v1.2.3-55-g6feb