diff options
author | Andy Polyakov <appro@openssl.org> | 2008-04-24 10:00:40 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2008-04-24 10:00:40 +0000 |
commit | c5fbf8c1ba4e116ab7efc5487a0ce8518718bbd7 (patch) | |
tree | d9534f4d26158b6fd0dba3329d93001731e6ca5d /crypto/sha | |
parent | 1ed2d8f512920c8346f78f88a35b5dca11d1404b (diff) |
Compensate inline assembler in sha512.c for gcc 2.7.2 compiler bug [from HEAD].
PR: 1667
Diffstat (limited to 'crypto/sha')
-rw-r--r-- | crypto/sha/sha512.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/sha/sha512.c b/crypto/sha/sha512.c index c58b843ad0..987fc07c99 100644 --- a/crypto/sha/sha512.c +++ b/crypto/sha/sha512.c @@ -318,19 +318,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) |