aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rand
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2010-07-08 09:14:00 +0000
committerAndy Polyakov <appro@openssl.org>2010-07-08 09:14:00 +0000
commitf04f3873f87d7b181913b2c423f44278792195d9 (patch)
tree017e8a3c7a08fc34198cb9b75b8ad2f086da15d8 /crypto/rand
parentdf72970951f72b1edc204e7a398c782d9082b46d (diff)
downloadopenssl-f04f3873f87d7b181913b2c423f44278792195d9.tar.gz
rand_nw.c: compensate for gcc bug (using %edx instead of %eax at -O3).
PR: 2296
Diffstat (limited to 'crypto/rand')
-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);