Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of cpuid.h bit definitions #12921

Closed
wants to merge 1 commit into from
Closed

Conversation

Empact
Copy link
Member

@Empact Empact commented Apr 9, 2018

These are defined in cpuid.h and are self-documenting for more expressive code.
https://clang.llvm.org/doxygen/cpuid_8h_source.html

Prompted by looking into #12903

These are defined in cpuid.h and are self-documenting for more expressive code.
https://clang.llvm.org/doxygen/cpuid_8h_source.html
@laanwj
Copy link
Member

laanwj commented Apr 9, 2018

How portable is this to other compilers, such as GCC or MSVC? I don't think this is a C standard.

@laanwj laanwj requested a review from sipa April 9, 2018 09:45
@Empact
Copy link
Member Author

Empact commented Apr 9, 2018

Good point, I used definitions found in the current GCC & clang headers:
https://clang.llvm.org/doxygen/cpuid_8h_source.html
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i386/cpuid.h

GCC's was added 11 years ago, but the clang definition was added 2 years ago:
microsoft/clang@331c3de
gcc-mirror/gcc@daf03e2

Which explains why the mac 10.11 build is failing:
https://travis-ci.org/bitcoin/bitcoin/jobs/364018488

Couldn't find anything about msvc support. Closing this as not ready for use.

@Empact Empact closed this Apr 9, 2018
@Empact Empact deleted the cpuid-bits branch April 11, 2018 00:02
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants