base/dispatch.c: Make `cpuid_feature_p' more easily extensible.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 5 Apr 2020 23:52:56 +0000 (23:52 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 9 May 2020 19:57:33 +0000 (20:57 +0100)
commit0ed9f882cdf9d0b4428459f7d5496610d53ca4c9
treef78f40aec97b3ec3fed672639a989e3d7318b84f
parent37eb9542f93ebc480b3a6fde7e656f132d17beea
base/dispatch.c: Make `cpuid_feature_p' more easily extensible.

It turns out that Intel scatter feature flags throughout the various
CPUID leaves.  Change the interface for checking these flags so that we
can cover more ground without too much extra work.

  * Firstly, rename the function to `cpuid_feature_p' because it's only
    really useful for checking one feature at a time.

  * Secondly, make the first argument be a code indicating which
    particular `cpuid' output we're interested in; the second is still a
    mask used to check for the bit we're interested in.

Obviously this involves changing all of the callers too.
base/dispatch.c