projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
830b887
)
Compensate inline assembler in sha512.c for gcc 2.7.2 compiler bug.
author
Andy Polyakov
<appro@openssl.org>
Thu, 24 Apr 2008 09:59:45 +0000
(09:59 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Thu, 24 Apr 2008 09:59:45 +0000
(09:59 +0000)
PR: 1667
crypto/sha/sha512.c
patch
|
blob
|
history
diff --git
a/crypto/sha/sha512.c
b/crypto/sha/sha512.c
index 654b59a125a8942fbb40778ace35eda70df95142..2284eefc8f86e95cce42bc373813db807f27e55b 100644
(file)
--- a/
crypto/sha/sha512.c
+++ b/
crypto/sha/sha512.c
@@
-364,19
+364,19
@@
static const SHA_LONG64 K512[80] = {
# elif (defined(__i386) || defined(__i386__)) && !defined(B_ENDIAN)
# if defined(I386_ONLY)
# define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\
# elif (defined(__i386) || defined(__i386__)) && !defined(B_ENDIAN)
# if defined(I386_ONLY)
# define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\
-
unsigned int hi,lo;
\
+
unsigned int hi=p[0],lo=p[1];
\
asm("xchgb %%ah,%%al;xchgb %%dh,%%dl;"\
"roll $16,%%eax; roll $16,%%edx; "\
"xchgb %%ah,%%al;xchgb %%dh,%%dl;" \
: "=a"(lo),"=d"(hi) \
asm("xchgb %%ah,%%al;xchgb %%dh,%%dl;"\
"roll $16,%%eax; roll $16,%%edx; "\
"xchgb %%ah,%%al;xchgb %%dh,%%dl;" \
: "=a"(lo),"=d"(hi) \
- : "0"(
p[1]),"1"(p[0]) : "cc");
\
+ : "0"(
lo),"1"(hi) : "cc");
\
((SHA_LONG64)hi)<<32|lo; })
# else
# define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\
((SHA_LONG64)hi)<<32|lo; })
# else
# define PULL64(x) ({ const unsigned int *p=(const unsigned int *)(&(x));\
-
unsigned int hi,lo;
\
+
unsigned int hi=p[0],lo=p[1];
\
asm ("bswapl %0; bswapl %1;" \
: "=r"(lo),"=r"(hi) \
asm ("bswapl %0; bswapl %1;" \
: "=r"(lo),"=r"(hi) \
- : "0"(
p[1]),"1"(p[0]));
\
+ : "0"(
lo),"1"(hi));
\
((SHA_LONG64)hi)<<32|lo; })
# endif
# elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64)
((SHA_LONG64)hi)<<32|lo; })
# endif
# elif (defined(_ARCH_PPC) && defined(__64BIT__)) || defined(_ARCH_PPC64)