diff options
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r-- | src/lib/libcrypto/asn1/n_pkey.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/bn_div.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/bn_lcl.h | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/camellia/camellia.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/des/des_locl.h | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/e_camellia.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/p_open.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/md32_common.h | 38 | ||||
-rw-r--r-- | src/lib/libcrypto/modes/modes_lcl.h | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/pem/pem_seal.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/rc5/rc5_locl.h | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/sha/sha512.c | 32 |
13 files changed, 35 insertions, 73 deletions
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c index 5c6181b04c..078caf8a15 100644 --- a/src/lib/libcrypto/asn1/n_pkey.c +++ b/src/lib/libcrypto/asn1/n_pkey.c | |||
@@ -335,10 +335,4 @@ err: | |||
335 | 335 | ||
336 | #endif /* OPENSSL_NO_RC4 */ | 336 | #endif /* OPENSSL_NO_RC4 */ |
337 | 337 | ||
338 | #else /* !OPENSSL_NO_RSA */ | ||
339 | |||
340 | # if PEDANTIC | ||
341 | static void *dummy = &dummy; | ||
342 | # endif | ||
343 | |||
344 | #endif | 338 | #endif |
diff --git a/src/lib/libcrypto/bn/bn_div.c b/src/lib/libcrypto/bn/bn_div.c index 7817c345f0..871f29e34f 100644 --- a/src/lib/libcrypto/bn/bn_div.c +++ b/src/lib/libcrypto/bn/bn_div.c | |||
@@ -128,7 +128,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, | |||
128 | #else | 128 | #else |
129 | 129 | ||
130 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) \ | 130 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) \ |
131 | && !defined(PEDANTIC) && !defined(BN_DIV3W) | 131 | && !defined(BN_DIV3W) |
132 | # if defined(__GNUC__) && __GNUC__>=2 | 132 | # if defined(__GNUC__) && __GNUC__>=2 |
133 | # if defined(__i386) || defined (__i386__) | 133 | # if defined(__i386) || defined (__i386__) |
134 | /* | 134 | /* |
diff --git a/src/lib/libcrypto/bn/bn_lcl.h b/src/lib/libcrypto/bn/bn_lcl.h index 1208deb3cf..22b4d17eb6 100644 --- a/src/lib/libcrypto/bn/bn_lcl.h +++ b/src/lib/libcrypto/bn/bn_lcl.h | |||
@@ -210,7 +210,7 @@ extern "C" { | |||
210 | #define BN_MUL_LOW_RECURSIVE_SIZE_NORMAL (32) /* 32 */ | 210 | #define BN_MUL_LOW_RECURSIVE_SIZE_NORMAL (32) /* 32 */ |
211 | #define BN_MONT_CTX_SET_SIZE_WORD (64) /* 32 */ | 211 | #define BN_MONT_CTX_SET_SIZE_WORD (64) /* 32 */ |
212 | 212 | ||
213 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 213 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
214 | /* | 214 | /* |
215 | * BN_UMULT_HIGH section. | 215 | * BN_UMULT_HIGH section. |
216 | * | 216 | * |
diff --git a/src/lib/libcrypto/camellia/camellia.c b/src/lib/libcrypto/camellia/camellia.c index 44c4202c2b..2c02466564 100644 --- a/src/lib/libcrypto/camellia/camellia.c +++ b/src/lib/libcrypto/camellia/camellia.c | |||
@@ -87,7 +87,7 @@ | |||
87 | #include <stdlib.h> | 87 | #include <stdlib.h> |
88 | 88 | ||
89 | /* 32-bit rotations */ | 89 | /* 32-bit rotations */ |
90 | #if !defined(PEDANTIC) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 90 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
91 | # if defined(__GNUC__) && __GNUC__>=2 | 91 | # if defined(__GNUC__) && __GNUC__>=2 |
92 | # if defined(__i386) || defined(__x86_64) | 92 | # if defined(__i386) || defined(__x86_64) |
93 | # define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) | 93 | # define RightRotate(x,s) ({u32 ret; asm ("rorl %1,%0":"=r"(ret):"I"(s),"0"(x):"cc"); ret; }) |
diff --git a/src/lib/libcrypto/des/des_locl.h b/src/lib/libcrypto/des/des_locl.h index bbae457377..00fcd2a8ac 100644 --- a/src/lib/libcrypto/des/des_locl.h +++ b/src/lib/libcrypto/des/des_locl.h | |||
@@ -152,7 +152,7 @@ | |||
152 | } \ | 152 | } \ |
153 | } | 153 | } |
154 | 154 | ||
155 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 155 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
156 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 156 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
157 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 157 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
158 | asm ("rorl %1,%0" \ | 158 | asm ("rorl %1,%0" \ |
diff --git a/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c b/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c index fb2c884a78..4d76ec74d2 100644 --- a/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c +++ b/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c | |||
@@ -90,7 +90,7 @@ typedef struct | |||
90 | defined(_M_AMD64) || defined(_M_X64) || \ | 90 | defined(_M_AMD64) || defined(_M_X64) || \ |
91 | defined(__INTEL__) ) | 91 | defined(__INTEL__) ) |
92 | 92 | ||
93 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(PEDANTIC) | 93 | #if defined(__GNUC__) && __GNUC__>=2 |
94 | # define BSWAP(x) ({ unsigned int r=(x); asm ("bswapl %0":"=r"(r):"0"(r)); r; }) | 94 | # define BSWAP(x) ({ unsigned int r=(x); asm ("bswapl %0":"=r"(r):"0"(r)); r; }) |
95 | #endif | 95 | #endif |
96 | 96 | ||
diff --git a/src/lib/libcrypto/evp/e_camellia.c b/src/lib/libcrypto/evp/e_camellia.c index a7b40d1c60..8bb7c320d3 100644 --- a/src/lib/libcrypto/evp/e_camellia.c +++ b/src/lib/libcrypto/evp/e_camellia.c | |||
@@ -122,10 +122,4 @@ static int camellia_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | |||
122 | return 1; | 122 | return 1; |
123 | } | 123 | } |
124 | 124 | ||
125 | #else | ||
126 | |||
127 | # ifdef PEDANTIC | ||
128 | static void *dummy=&dummy; | ||
129 | # endif | ||
130 | |||
131 | #endif | 125 | #endif |
diff --git a/src/lib/libcrypto/evp/p_open.c b/src/lib/libcrypto/evp/p_open.c index 2a5ab2b6cc..b832ec6a6b 100644 --- a/src/lib/libcrypto/evp/p_open.c +++ b/src/lib/libcrypto/evp/p_open.c | |||
@@ -119,10 +119,4 @@ int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
119 | i = EVP_DecryptInit_ex(ctx,NULL,NULL,NULL,NULL); | 119 | i = EVP_DecryptInit_ex(ctx,NULL,NULL,NULL,NULL); |
120 | return(i); | 120 | return(i); |
121 | } | 121 | } |
122 | #else /* !OPENSSL_NO_RSA */ | ||
123 | |||
124 | # ifdef PEDANTIC | ||
125 | static void *dummy=&dummy; | ||
126 | # endif | ||
127 | |||
128 | #endif | 122 | #endif |
diff --git a/src/lib/libcrypto/md32_common.h b/src/lib/libcrypto/md32_common.h index be097bfc70..7e25b2ad3b 100644 --- a/src/lib/libcrypto/md32_common.h +++ b/src/lib/libcrypto/md32_common.h | |||
@@ -141,16 +141,15 @@ | |||
141 | * Engage compiler specific rotate intrinsic function if available. | 141 | * Engage compiler specific rotate intrinsic function if available. |
142 | */ | 142 | */ |
143 | #undef ROTATE | 143 | #undef ROTATE |
144 | #ifndef PEDANTIC | 144 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
145 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | ||
146 | /* | 145 | /* |
147 | * Some GNU C inline assembler templates. Note that these are | 146 | * Some GNU C inline assembler templates. Note that these are |
148 | * rotates by *constant* number of bits! But that's exactly | 147 | * rotates by *constant* number of bits! But that's exactly |
149 | * what we need here... | 148 | * what we need here... |
150 | * <appro@fy.chalmers.se> | 149 | * <appro@fy.chalmers.se> |
151 | */ | 150 | */ |
152 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 151 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
153 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 152 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
154 | asm ( \ | 153 | asm ( \ |
155 | "roll %1,%0" \ | 154 | "roll %1,%0" \ |
156 | : "=r"(ret) \ | 155 | : "=r"(ret) \ |
@@ -158,25 +157,24 @@ | |||
158 | : "cc"); \ | 157 | : "cc"); \ |
159 | ret; \ | 158 | ret; \ |
160 | }) | 159 | }) |
161 | # elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ | 160 | # elif defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ |
162 | defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) | 161 | defined(__powerpc) || defined(__ppc__) || defined(__powerpc64__) |
163 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 162 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
164 | asm ( \ | 163 | asm ( \ |
165 | "rlwinm %0,%1,%2,0,31" \ | 164 | "rlwinm %0,%1,%2,0,31" \ |
166 | : "=r"(ret) \ | 165 | : "=r"(ret) \ |
167 | : "r"(a), "I"(n)); \ | 166 | : "r"(a), "I"(n)); \ |
168 | ret; \ | 167 | ret; \ |
169 | }) | 168 | }) |
170 | # elif defined(__s390x__) | 169 | # elif defined(__s390x__) |
171 | # define ROTATE(a,n) ({ register unsigned int ret; \ | 170 | # define ROTATE(a,n) ({ register unsigned int ret; \ |
172 | asm ("rll %0,%1,%2" \ | 171 | asm ("rll %0,%1,%2" \ |
173 | : "=r"(ret) \ | 172 | : "=r"(ret) \ |
174 | : "r"(a), "I"(n)); \ | 173 | : "r"(a), "I"(n)); \ |
175 | ret; \ | 174 | ret; \ |
176 | }) | 175 | }) |
177 | # endif | ||
178 | # endif | 176 | # endif |
179 | #endif /* PEDANTIC */ | 177 | #endif |
180 | 178 | ||
181 | #ifndef ROTATE | 179 | #ifndef ROTATE |
182 | #define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) | 180 | #define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) |
@@ -184,9 +182,8 @@ | |||
184 | 182 | ||
185 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) | 183 | #if defined(DATA_ORDER_IS_BIG_ENDIAN) |
186 | 184 | ||
187 | #ifndef PEDANTIC | 185 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
188 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 186 | # if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ |
189 | # if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ | ||
190 | (defined(__x86_64) || defined(__x86_64__)) | 187 | (defined(__x86_64) || defined(__x86_64__)) |
191 | /* | 188 | /* |
192 | * This gives ~30-40% performance improvement in SHA-256 compiled | 189 | * This gives ~30-40% performance improvement in SHA-256 compiled |
@@ -194,13 +191,12 @@ | |||
194 | * this trick on x86* platforms only, because these CPUs can fetch | 191 | * this trick on x86* platforms only, because these CPUs can fetch |
195 | * unaligned data without raising an exception. | 192 | * unaligned data without raising an exception. |
196 | */ | 193 | */ |
197 | # define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \ | 194 | # define HOST_c2l(c,l) ({ unsigned int r=*((const unsigned int *)(c)); \ |
198 | asm ("bswapl %0":"=r"(r):"0"(r)); \ | 195 | asm ("bswapl %0":"=r"(r):"0"(r)); \ |
199 | (c)+=4; (l)=r; }) | 196 | (c)+=4; (l)=r; }) |
200 | # define HOST_l2c(l,c) ({ unsigned int r=(l); \ | 197 | # define HOST_l2c(l,c) ({ unsigned int r=(l); \ |
201 | asm ("bswapl %0":"=r"(r):"0"(r)); \ | 198 | asm ("bswapl %0":"=r"(r):"0"(r)); \ |
202 | *((unsigned int *)(c))=r; (c)+=4; r; }) | 199 | *((unsigned int *)(c))=r; (c)+=4; r; }) |
203 | # endif | ||
204 | # endif | 200 | # endif |
205 | #endif | 201 | #endif |
206 | #if defined(__s390__) || defined(__s390x__) | 202 | #if defined(__s390__) || defined(__s390x__) |
@@ -225,16 +221,14 @@ | |||
225 | 221 | ||
226 | #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) | 222 | #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) |
227 | 223 | ||
228 | #ifndef PEDANTIC | 224 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
229 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 225 | # if defined(__s390x__) |
230 | # if defined(__s390x__) | 226 | # define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ |
231 | # define HOST_c2l(c,l) ({ asm ("lrv %0,%1" \ | ||
232 | :"=d"(l) :"m"(*(const unsigned int *)(c)));\ | 227 | :"=d"(l) :"m"(*(const unsigned int *)(c)));\ |
233 | (c)+=4; (l); }) | 228 | (c)+=4; (l); }) |
234 | # define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ | 229 | # define HOST_l2c(l,c) ({ asm ("strv %1,%0" \ |
235 | :"=m"(*(unsigned int *)(c)) :"d"(l));\ | 230 | :"=m"(*(unsigned int *)(c)) :"d"(l));\ |
236 | (c)+=4; (l); }) | 231 | (c)+=4; (l); }) |
237 | # endif | ||
238 | # endif | 232 | # endif |
239 | #endif | 233 | #endif |
240 | #if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 234 | #if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
diff --git a/src/lib/libcrypto/modes/modes_lcl.h b/src/lib/libcrypto/modes/modes_lcl.h index 9057f7fd76..2fc8138273 100644 --- a/src/lib/libcrypto/modes/modes_lcl.h +++ b/src/lib/libcrypto/modes/modes_lcl.h | |||
@@ -34,7 +34,7 @@ typedef unsigned char u8; | |||
34 | # undef STRICT_ALIGNMENT | 34 | # undef STRICT_ALIGNMENT |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #if !defined(PEDANTIC) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 37 | #if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
38 | #if defined(__GNUC__) && __GNUC__>=2 | 38 | #if defined(__GNUC__) && __GNUC__>=2 |
39 | # if defined(__x86_64) || defined(__x86_64__) | 39 | # if defined(__x86_64) || defined(__x86_64__) |
40 | # define BSWAP8(x) ({ u64 ret=(x); \ | 40 | # define BSWAP8(x) ({ u64 ret=(x); \ |
diff --git a/src/lib/libcrypto/pem/pem_seal.c b/src/lib/libcrypto/pem/pem_seal.c index 3c0be6d305..92b70157cd 100644 --- a/src/lib/libcrypto/pem/pem_seal.c +++ b/src/lib/libcrypto/pem/pem_seal.c | |||
@@ -186,10 +186,4 @@ err: | |||
186 | free(s); | 186 | free(s); |
187 | return (ret); | 187 | return (ret); |
188 | } | 188 | } |
189 | #else /* !OPENSSL_NO_RSA */ | ||
190 | |||
191 | # if PEDANTIC | ||
192 | static void *dummy = &dummy; | ||
193 | # endif | ||
194 | |||
195 | #endif | 189 | #endif |
diff --git a/src/lib/libcrypto/rc5/rc5_locl.h b/src/lib/libcrypto/rc5/rc5_locl.h index 314ce8909a..14086c8551 100644 --- a/src/lib/libcrypto/rc5/rc5_locl.h +++ b/src/lib/libcrypto/rc5/rc5_locl.h | |||
@@ -146,7 +146,7 @@ | |||
146 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | 146 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ |
147 | *((c)++)=(unsigned char)(((l) )&0xff)) | 147 | *((c)++)=(unsigned char)(((l) )&0xff)) |
148 | 148 | ||
149 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 149 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
150 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) | 150 | # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) |
151 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ | 151 | # define ROTATE_l32(a,n) ({ register unsigned int ret; \ |
152 | asm ("roll %%cl,%0" \ | 152 | asm ("roll %%cl,%0" \ |
diff --git a/src/lib/libcrypto/sha/sha512.c b/src/lib/libcrypto/sha/sha512.c index 49afaa05c2..ca7991a9ca 100644 --- a/src/lib/libcrypto/sha/sha512.c +++ b/src/lib/libcrypto/sha/sha512.c | |||
@@ -311,21 +311,20 @@ static const SHA_LONG64 K512[80] = { | |||
311 | U64(0x4cc5d4becb3e42b6),U64(0x597f299cfc657e2a), | 311 | U64(0x4cc5d4becb3e42b6),U64(0x597f299cfc657e2a), |
312 | U64(0x5fcb6fab3ad6faec),U64(0x6c44198c4a475817) }; | 312 | U64(0x5fcb6fab3ad6faec),U64(0x6c44198c4a475817) }; |
313 | 313 | ||
314 | #ifndef PEDANTIC | 314 | #if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) |
315 | # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) | 315 | # if defined(__x86_64) || defined(__x86_64__) |
316 | # if defined(__x86_64) || defined(__x86_64__) | 316 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ |
317 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ | ||
318 | asm ("rorq %1,%0" \ | 317 | asm ("rorq %1,%0" \ |
319 | : "=r"(ret) \ | 318 | : "=r"(ret) \ |
320 | : "J"(n),"0"(a) \ | 319 | : "J"(n),"0"(a) \ |
321 | : "cc"); ret; }) | 320 | : "cc"); ret; }) |
322 | # define PULL64(x) ({ SHA_LONG64 ret=*((const SHA_LONG64 *)(&(x))); \ | 321 | # define PULL64(x) ({ SHA_LONG64 ret=*((const SHA_LONG64 *)(&(x))); \ |
323 | asm ("bswapq %0" \ | 322 | asm ("bswapq %0" \ |
324 | : "=r"(ret) \ | 323 | : "=r"(ret) \ |
325 | : "0"(ret)); ret; }) | 324 | : "0"(ret)); ret; }) |
326 | # elif (defined(__i386) || defined(__i386__)) | 325 | # elif (defined(__i386) || defined(__i386__)) |
327 | # if defined(I386_ONLY) | 326 | # if defined(I386_ONLY) |
328 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ | 327 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ |
329 | unsigned int hi=p[0],lo=p[1]; \ | 328 | unsigned int hi=p[0],lo=p[1]; \ |
330 | asm("xchgb %%ah,%%al;xchgb %%dh,%%dl;"\ | 329 | asm("xchgb %%ah,%%al;xchgb %%dh,%%dl;"\ |
331 | "roll $16,%%eax; roll $16,%%edx; "\ | 330 | "roll $16,%%eax; roll $16,%%edx; "\ |
@@ -333,20 +332,19 @@ static const SHA_LONG64 K512[80] = { | |||
333 | : "=a"(lo),"=d"(hi) \ | 332 | : "=a"(lo),"=d"(hi) \ |
334 | : "0"(lo),"1"(hi) : "cc"); \ | 333 | : "0"(lo),"1"(hi) : "cc"); \ |
335 | ((SHA_LONG64)hi)<<32|lo; }) | 334 | ((SHA_LONG64)hi)<<32|lo; }) |
336 | # else | 335 | # else |
337 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ | 336 | # define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\ |
338 | unsigned int hi=p[0],lo=p[1]; \ | 337 | unsigned int hi=p[0],lo=p[1]; \ |
339 | asm ("bswapl %0; bswapl %1;" \ | 338 | asm ("bswapl %0; bswapl %1;" \ |
340 | : "=r"(lo),"=r"(hi) \ | 339 | : "=r"(lo),"=r"(hi) \ |
341 | : "0"(lo),"1"(hi)); \ | 340 | : "0"(lo),"1"(hi)); \ |
342 | ((SHA_LONG64)hi)<<32|lo; }) | 341 | ((SHA_LONG64)hi)<<32|lo; }) |
343 | # endif | 342 | # endif |
344 | # elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64) | 343 | # elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64) |
345 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ | 344 | # define ROTR(a,n) ({ SHA_LONG64 ret; \ |
346 | asm ("rotrdi %0,%1,%2" \ | 345 | asm ("rotrdi %0,%1,%2" \ |
347 | : "=r"(ret) \ | 346 | : "=r"(ret) \ |
348 | : "r"(a),"K"(n)); ret; }) | 347 | : "r"(a),"K"(n)); ret; }) |
349 | # endif | ||
350 | # endif | 348 | # endif |
351 | #endif | 349 | #endif |
352 | 350 | ||
@@ -560,10 +558,4 @@ static void sha512_block_data_order (SHA512_CTX *ctx, const void *in, size_t num | |||
560 | 558 | ||
561 | #endif /* SHA512_ASM */ | 559 | #endif /* SHA512_ASM */ |
562 | 560 | ||
563 | #else /* !OPENSSL_NO_SHA512 */ | ||
564 | |||
565 | #if defined(PEDANTIC) || defined(__DECC) || defined(OPENSSL_SYS_MACOSX) | ||
566 | static void *dummy=&dummy; | ||
567 | #endif | ||
568 | |||
569 | #endif /* !OPENSSL_NO_SHA512 */ | 561 | #endif /* !OPENSSL_NO_SHA512 */ |