aboutsummaryrefslogtreecommitdiff
path: root/crypto/sha/sha512.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2008-04-24 09:59:45 +0000
committerAndy Polyakov <appro@openssl.org>2008-04-24 09:59:45 +0000
commit281066cb039e96faf7466db8845af7e4836dcfb1 (patch)
tree786ec8cab591c1585b8737c14bc393ea70f0a3ec /crypto/sha/sha512.c
parent830b8877ba69c70c49869d296df2568e3c8441b7 (diff)
downloadopenssl-281066cb039e96faf7466db8845af7e4836dcfb1.zip
openssl-281066cb039e96faf7466db8845af7e4836dcfb1.tar.gz
openssl-281066cb039e96faf7466db8845af7e4836dcfb1.tar.bz2
Compensate inline assembler in sha512.c for gcc 2.7.2 compiler bug.
PR: 1667
Diffstat (limited to 'crypto/sha/sha512.c')
-rw-r--r--crypto/sha/sha512.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/sha/sha512.c b/crypto/sha/sha512.c
index 654b59a..2284eef 100644
--- 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));\
- 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) \
- : "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));\
- unsigned int hi,lo; \
+ unsigned int hi=p[0],lo=p[1]; \
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)