diff options
author | miod <> | 2016-11-04 13:56:05 +0000 |
---|---|---|
committer | miod <> | 2016-11-04 13:56:05 +0000 |
commit | d69d10da5510517830f98435b4984052c2d21825 (patch) | |
tree | 9363c8b7f4453a96c26a902a886921f7516d700f /src/lib | |
parent | 76a784dab583cd423f3ff66636ea7b6b6f4dee61 (diff) | |
download | openbsd-d69d10da5510517830f98435b4984052c2d21825.tar.gz openbsd-d69d10da5510517830f98435b4984052c2d21825.tar.bz2 openbsd-d69d10da5510517830f98435b4984052c2d21825.zip |
Remove I386_ONLY define. It was only used to prefer a
faster-on-genuine-80386-but-slower-on-80486-onwards innstruction sequence in
the SHA512 code, and had not been enabled in years, if at all.
ok tom@ bcook@
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/arch/alpha/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/amd64/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/arm/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/hppa/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/i386/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/m88k/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/mips64/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/powerpc/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/sh/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/sparc/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/sparc64/opensslconf.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/cryptlib.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/eng_padlock.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/e_aes.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/md32_common.h | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/modes/gcm128.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/modes/modes_lcl.h | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/sha/sha512.c | 13 |
18 files changed, 15 insertions, 60 deletions
diff --git a/src/lib/libcrypto/arch/alpha/opensslconf.h b/src/lib/libcrypto/arch/alpha/opensslconf.h index a74c6df644..a1331118f4 100644 --- a/src/lib/libcrypto/arch/alpha/opensslconf.h +++ b/src/lib/libcrypto/arch/alpha/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/amd64/opensslconf.h b/src/lib/libcrypto/arch/amd64/opensslconf.h index cbd5d53ca4..f8cbb5d652 100644 --- a/src/lib/libcrypto/arch/amd64/opensslconf.h +++ b/src/lib/libcrypto/arch/amd64/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/arm/opensslconf.h b/src/lib/libcrypto/arch/arm/opensslconf.h index e3795ce73a..78cd6d856f 100644 --- a/src/lib/libcrypto/arch/arm/opensslconf.h +++ b/src/lib/libcrypto/arch/arm/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/hppa/opensslconf.h b/src/lib/libcrypto/arch/hppa/opensslconf.h index e3795ce73a..78cd6d856f 100644 --- a/src/lib/libcrypto/arch/hppa/opensslconf.h +++ b/src/lib/libcrypto/arch/hppa/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/i386/opensslconf.h b/src/lib/libcrypto/arch/i386/opensslconf.h index 37137ff102..bf439696d8 100644 --- a/src/lib/libcrypto/arch/i386/opensslconf.h +++ b/src/lib/libcrypto/arch/i386/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/m88k/opensslconf.h b/src/lib/libcrypto/arch/m88k/opensslconf.h index e3795ce73a..78cd6d856f 100644 --- a/src/lib/libcrypto/arch/m88k/opensslconf.h +++ b/src/lib/libcrypto/arch/m88k/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/mips64/opensslconf.h b/src/lib/libcrypto/arch/mips64/opensslconf.h index ef7a679d94..226951eded 100644 --- a/src/lib/libcrypto/arch/mips64/opensslconf.h +++ b/src/lib/libcrypto/arch/mips64/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/powerpc/opensslconf.h b/src/lib/libcrypto/arch/powerpc/opensslconf.h index e3795ce73a..78cd6d856f 100644 --- a/src/lib/libcrypto/arch/powerpc/opensslconf.h +++ b/src/lib/libcrypto/arch/powerpc/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/sh/opensslconf.h b/src/lib/libcrypto/arch/sh/opensslconf.h index e3795ce73a..78cd6d856f 100644 --- a/src/lib/libcrypto/arch/sh/opensslconf.h +++ b/src/lib/libcrypto/arch/sh/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/sparc/opensslconf.h b/src/lib/libcrypto/arch/sparc/opensslconf.h index e3795ce73a..78cd6d856f 100644 --- a/src/lib/libcrypto/arch/sparc/opensslconf.h +++ b/src/lib/libcrypto/arch/sparc/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/arch/sparc64/opensslconf.h b/src/lib/libcrypto/arch/sparc64/opensslconf.h index ef7a679d94..226951eded 100644 --- a/src/lib/libcrypto/arch/sparc64/opensslconf.h +++ b/src/lib/libcrypto/arch/sparc64/opensslconf.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #include <openssl/opensslfeatures.h> | 1 | #include <openssl/opensslfeatures.h> |
2 | /* crypto/opensslconf.h.in */ | 2 | /* crypto/opensslconf.h.in */ |
3 | 3 | ||
4 | /* Generate 80386 code? */ | ||
5 | #undef I386_ONLY | ||
6 | |||
7 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) | 4 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) |
8 | #define OPENSSLDIR "/etc/ssl" | 5 | #define OPENSSLDIR "/etc/ssl" |
9 | #endif | 6 | #endif |
diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c index 0f2c5970bc..fa091fbaea 100644 --- a/src/lib/libcrypto/cryptlib.c +++ b/src/lib/libcrypto/cryptlib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cryptlib.c,v 1.37 2015/09/13 16:56:11 miod Exp $ */ | 1 | /* $OpenBSD: cryptlib.c,v 1.38 2016/11/04 13:56:04 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -635,7 +635,7 @@ OPENSSL_cpu_caps(void) | |||
635 | return *(uint64_t *)OPENSSL_ia32cap_P; | 635 | return *(uint64_t *)OPENSSL_ia32cap_P; |
636 | } | 636 | } |
637 | 637 | ||
638 | #if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM) && !defined(I386_ONLY) | 638 | #if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM) |
639 | #define OPENSSL_CPUID_SETUP | 639 | #define OPENSSL_CPUID_SETUP |
640 | typedef unsigned long long IA32CAP; | 640 | typedef unsigned long long IA32CAP; |
641 | void | 641 | void |
diff --git a/src/lib/libcrypto/engine/eng_padlock.c b/src/lib/libcrypto/engine/eng_padlock.c index 1c86a343df..4f2d426a06 100644 --- a/src/lib/libcrypto/engine/eng_padlock.c +++ b/src/lib/libcrypto/engine/eng_padlock.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: eng_padlock.c,v 1.14 2015/02/07 13:19:15 doug Exp $ */ | 1 | /* $OpenBSD: eng_padlock.c,v 1.15 2016/11/04 13:56:05 miod Exp $ */ |
2 | /* | 2 | /* |
3 | * Support for VIA PadLock Advanced Cryptography Engine (ACE) | 3 | * Support for VIA PadLock Advanced Cryptography Engine (ACE) |
4 | * Written by Michal Ludvig <michal@logix.cz> | 4 | * Written by Michal Ludvig <michal@logix.cz> |
@@ -100,7 +100,7 @@ | |||
100 | In addition, because of the heavy use of inline assembler, | 100 | In addition, because of the heavy use of inline assembler, |
101 | compiler choice is limited to GCC and Microsoft C. */ | 101 | compiler choice is limited to GCC and Microsoft C. */ |
102 | #undef COMPILE_HW_PADLOCK | 102 | #undef COMPILE_HW_PADLOCK |
103 | #if !defined(I386_ONLY) && !defined(OPENSSL_NO_INLINE_ASM) | 103 | #if !defined(OPENSSL_NO_INLINE_ASM) |
104 | # if (defined(__GNUC__) && (defined(__i386__) || defined(__i386))) | 104 | # if (defined(__GNUC__) && (defined(__i386__) || defined(__i386))) |
105 | # define COMPILE_HW_PADLOCK | 105 | # define COMPILE_HW_PADLOCK |
106 | # endif | 106 | # endif |
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index a6d48085c3..25199dca36 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: e_aes.c,v 1.29 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: e_aes.c,v 1.30 2016/11/04 13:56:05 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -143,14 +143,14 @@ void AES_xts_decrypt(const char *inp, char *out, size_t len, | |||
143 | const AES_KEY *key1, const AES_KEY *key2, const unsigned char iv[16]); | 143 | const AES_KEY *key1, const AES_KEY *key2, const unsigned char iv[16]); |
144 | #endif | 144 | #endif |
145 | 145 | ||
146 | #if defined(AES_ASM) && !defined(I386_ONLY) && ( \ | 146 | #if defined(AES_ASM) && ( \ |
147 | ((defined(__i386) || defined(__i386__) || \ | 147 | ((defined(__i386) || defined(__i386__) || \ |
148 | defined(_M_IX86)) && defined(OPENSSL_IA32_SSE2))|| \ | 148 | defined(_M_IX86)) && defined(OPENSSL_IA32_SSE2))|| \ |
149 | defined(__x86_64) || defined(__x86_64__) || \ | 149 | defined(__x86_64) || defined(__x86_64__) || \ |
150 | defined(_M_AMD64) || defined(_M_X64) || \ | 150 | defined(_M_AMD64) || defined(_M_X64) || \ |
151 | defined(__INTEL__) ) | 151 | defined(__INTEL__) ) |
152 | 152 | ||
153 | extern unsigned int OPENSSL_ia32cap_P[2]; | 153 | extern unsigned int OPENSSL_ia32cap_P[]; |
154 | 154 | ||
155 | #ifdef VPAES_ASM | 155 | #ifdef VPAES_ASM |
156 | #define VPAES_CAPABLE (OPENSSL_ia32cap_P[1]&(1<<(41-32))) | 156 | #define VPAES_CAPABLE (OPENSSL_ia32cap_P[1]&(1<<(41-32))) |
diff --git a/src/lib/libcrypto/md32_common.h b/src/lib/libcrypto/md32_common.h index bad34d22d6..0dca61710f 100644 --- a/src/lib/libcrypto/md32_common.h +++ b/src/lib/libcrypto/md32_common.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: md32_common.h,v 1.21 2016/09/04 14:31:29 jsing Exp $ */ | 1 | /* $OpenBSD: md32_common.h,v 1.22 2016/11/04 13:56:04 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -152,8 +152,8 @@ static inline uint32_t ROTATE(uint32_t a, uint32_t n) | |||
152 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) | 152 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) |
153 | 153 | ||
154 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 154 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
155 | # if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ | 155 | # if (defined(__i386) || defined(__i386__) || \ |
156 | (defined(__x86_64) || defined(__x86_64__)) | 156 | defined(__x86_64) || defined(__x86_64__)) |
157 | /* | 157 | /* |
158 | * This gives ~30-40% performance improvement in SHA-256 compiled | 158 | * This gives ~30-40% performance improvement in SHA-256 compiled |
159 | * with gcc [on P4]. Well, first macro to be frank. We can pull | 159 | * with gcc [on P4]. Well, first macro to be frank. We can pull |
diff --git a/src/lib/libcrypto/modes/gcm128.c b/src/lib/libcrypto/modes/gcm128.c index dd6d91e880..6f8a8dd7f4 100644 --- a/src/lib/libcrypto/modes/gcm128.c +++ b/src/lib/libcrypto/modes/gcm128.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gcm128.c,v 1.13 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: gcm128.c,v 1.14 2016/11/04 13:56:05 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -638,8 +638,7 @@ static void gcm_gmult_1bit(u64 Xi[2],const u64 H[2]) | |||
638 | #endif | 638 | #endif |
639 | 639 | ||
640 | #if TABLE_BITS==4 && defined(GHASH_ASM) | 640 | #if TABLE_BITS==4 && defined(GHASH_ASM) |
641 | # if !defined(I386_ONLY) && \ | 641 | # if (defined(__i386) || defined(__i386__) || \ |
642 | (defined(__i386) || defined(__i386__) || \ | ||
643 | defined(__x86_64) || defined(__x86_64__) || \ | 642 | defined(__x86_64) || defined(__x86_64__) || \ |
644 | defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64)) | 643 | defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64)) |
645 | # define GHASH_ASM_X86_OR_64 | 644 | # define GHASH_ASM_X86_OR_64 |
diff --git a/src/lib/libcrypto/modes/modes_lcl.h b/src/lib/libcrypto/modes/modes_lcl.h index 8e43e480fc..a90f4a2b37 100644 --- a/src/lib/libcrypto/modes/modes_lcl.h +++ b/src/lib/libcrypto/modes/modes_lcl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: modes_lcl.h,v 1.8 2014/07/10 22:45:57 jsing Exp $ */ | 1 | /* $OpenBSD: modes_lcl.h,v 1.9 2016/11/04 13:56:05 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -34,7 +34,7 @@ typedef unsigned char u8; | |||
34 | # define BSWAP4(x) ({ u32 ret=(x); \ | 34 | # define BSWAP4(x) ({ u32 ret=(x); \ |
35 | asm ("bswapl %0" \ | 35 | asm ("bswapl %0" \ |
36 | : "+r"(ret)); ret; }) | 36 | : "+r"(ret)); ret; }) |
37 | # elif (defined(__i386) || defined(__i386__)) && !defined(I386_ONLY) | 37 | # elif (defined(__i386) || defined(__i386__)) |
38 | # define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \ | 38 | # define BSWAP8(x) ({ u32 lo=(u64)(x)>>32,hi=(x); \ |
39 | asm ("bswapl %0; bswapl %1" \ | 39 | asm ("bswapl %0; bswapl %1" \ |
40 | : "+r"(hi),"+r"(lo)); \ | 40 | : "+r"(hi),"+r"(lo)); \ |
diff --git a/src/lib/libcrypto/sha/sha512.c b/src/lib/libcrypto/sha/sha512.c index 7a55c0acc9..6b95cfa72e 100644 --- a/src/lib/libcrypto/sha/sha512.c +++ b/src/lib/libcrypto/sha/sha512.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sha512.c,v 1.14 2015/09/10 15:56:26 jsing Exp $ */ | 1 | /* $OpenBSD: sha512.c,v 1.15 2016/11/04 13:56:05 miod Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2004 The OpenSSL Project. All rights reserved | 3 | * Copyright (c) 2004 The OpenSSL Project. All rights reserved |
4 | * according to the OpenSSL license [found in ../../LICENSE]. | 4 | * according to the OpenSSL license [found in ../../LICENSE]. |
@@ -320,23 +320,12 @@ static const SHA_LONG64 K512[80] = { | |||
320 | : "=r"(ret) \ | 320 | : "=r"(ret) \ |
321 | : "0"(ret)); ret; }) | 321 | : "0"(ret)); ret; }) |
322 | # elif (defined(__i386) || defined(__i386__)) | 322 | # elif (defined(__i386) || defined(__i386__)) |
323 | # if defined(I386_ONLY) | ||
324 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ | ||
325 | unsigned int hi=p[0],lo=p[1]; \ | ||
326 | asm("xchgb %%ah,%%al;xchgb %%dh,%%dl;"\ | ||
327 | "roll $16,%%eax; roll $16,%%edx; "\ | ||
328 | "xchgb %%ah,%%al;xchgb %%dh,%%dl;" \ | ||
329 | : "=a"(lo),"=d"(hi) \ | ||
330 | : "0"(lo),"1"(hi) : "cc"); \ | ||
331 | ((SHA_LONG64)hi)<<32|lo; }) | ||
332 | # else | ||
333 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ | 323 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ |
334 | unsigned int hi=p[0],lo=p[1]; \ | 324 | unsigned int hi=p[0],lo=p[1]; \ |
335 | asm ("bswapl %0; bswapl %1;" \ | 325 | asm ("bswapl %0; bswapl %1;" \ |
336 | : "=r"(lo),"=r"(hi) \ | 326 | : "=r"(lo),"=r"(hi) \ |
337 | : "0"(lo),"1"(hi)); \ | 327 | : "0"(lo),"1"(hi)); \ |
338 | ((SHA_LONG64)hi)<<32|lo; }) | 328 | ((SHA_LONG64)hi)<<32|lo; }) |
339 | # endif | ||
340 | # elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64) | 329 | # elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64) |
341 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ | 330 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ |
342 | asm ("rotrdi %0,%1,%2" \ | 331 | asm ("rotrdi %0,%1,%2" \ |