summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha/sha512.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/sha/sha512.c')
-rw-r--r--src/lib/libcrypto/sha/sha512.c13
1 files changed, 1 insertions, 12 deletions
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" \