summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2010-07-08 09:15:14 +0000
committerAndy Polyakov <appro@openssl.org>2010-07-08 09:15:14 +0000
commitd8486c312cc9b1a467b03f4121edba21e25f6e03 (patch)
treed7b17aefd1f619fb2d44ea447d932becc07ddddd
parent8d4baaf2f01eab67e4908a58af1f7f81ebdce1d7 (diff)
downloadopenssl-new-d8486c312cc9b1a467b03f4121edba21e25f6e03.tar.gz
rand_nw.c: compensate for gcc bug (using %edx instead of %eax at -O3)
[from HEAD]. PR: 2296
-rw-r--r--crypto/rand/rand_nw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rand/rand_nw.c b/crypto/rand/rand_nw.c
index f177ffbe82..8d5b8d2e32 100644
--- a/crypto/rand/rand_nw.c
+++ b/crypto/rand/rand_nw.c
@@ -160,8 +160,8 @@ int RAND_poll(void)
rdtsc
mov tsc, eax
}
-#else
- asm volatile("rdtsc":"=A" (tsc));
+#elif defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
+ asm volatile("rdtsc":"=a"(tsc)::"edx");
#endif
RAND_add(&tsc, sizeof(tsc), 1);