Make use of cpuid.h bit definitions #12921

pull Empact wants to merge 1 commits into bitcoin:master from Empact:cpuid-bits changing 2 files +2 −3
  1. Empact commented at 8:53 AM on April 9, 2018: member

    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

  2. Make use of cpuid.h bit definitions
    These are defined in cpuid.h and are self-documenting for more expressive code.
    https://clang.llvm.org/doxygen/cpuid_8h_source.html
    adb143e30f
  3. laanwj commented at 9:44 AM on April 9, 2018: member

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

  4. laanwj requested review from sipa on Apr 9, 2018
  5. fanquake added the label Refactoring on Apr 9, 2018
  6. Empact commented at 4:15 PM on April 9, 2018: member

    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: https://github.com/Microsoft/clang/commit/331c3de83304fe93fc6ccabbf953c542427e2aee https://github.com/gcc-mirror/gcc/commit/daf03e2f6d2149ef64bbbbf9fdb81e8ad0c07c99

    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.

  7. Empact closed this on Apr 9, 2018

  8. Empact deleted the branch on Apr 11, 2018
  9. MarcoFalke locked this on Sep 8, 2021
Contributors


sipa


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 00:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me