Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Use cpuid intrinsics instead of asm code #10820
+7
−12
Conversation
It builds on OpenBSD at least! Keeping #10670 in mind that probably means it will work on anything. |
laanwj
added the
Refactoring
label
Jul 14, 2017
| - //! When calling cpuid function #1, ecx register will have this set if RDRAND is available. | ||
| - if (ecx & CPUID_F1_ECX_RDRAND) { | ||
| + uint32_t eax, ebx, ecx, edx; | ||
| + if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx & CPUID_F1_ECX_RDRAND)) { |
|
ACK 674848f (I didnt actually test on other platforms, so I'm just kinda assuming they support this stuff). |
sipa
merged commit 674848f
into
bitcoin:master
Jul 16, 2017
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
sipa
added a commit
that referenced
this pull request
Jul 16, 2017
|
|
sipa |
ef37f20
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sipa commentedJul 13, 2017
•
edited
Less platform-specific code is better.