From b981251732a95080777a54c27767b1fe4a2599c6 Mon Sep 17 00:00:00 2001 From: Mike Hamburg Date: Sun, 1 Mar 2015 13:17:51 -0800 Subject: [PATCH] fix rax input for rdrand detection --- src/crandom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crandom.c b/src/crandom.c index 83999c9..4808d3e 100644 --- a/src/crandom.c +++ b/src/crandom.c @@ -27,10 +27,10 @@ unsigned int crandom_detect_features(void) { if (c & 1<<25) out |= AESNI; if (c & 1<<28) out |= AVX; if (b & 1<<5) out |= AVX2; + if (c & 1<<30) out |= RDRAND; a=0x80000001; __asm__("cpuid" : "+a"(a), "=b"(b), "=c"(c), "=d"(d)); if (c & 1<<11) out |= XOP; - if (c & 1<<30) out |= RDRAND; # endif return out;