mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1742472 - fix the clang implementation of has_cpuid_bits for the levels in the 0x80000000 range, r=jrmuizel.
Differential Revision: https://phabricator.services.mozilla.com/D131946
This commit is contained in:
parent
7be3218970
commit
a2e85fcc9f
@ -30,7 +30,7 @@ static bool has_cpuid_bits(unsigned int level, CPUIDRegister reg,
|
||||
unsigned int bits) {
|
||||
unsigned int regs[4];
|
||||
unsigned int eax, ebx, ecx, edx;
|
||||
unsigned max = __get_cpuid_max(0, NULL);
|
||||
unsigned max = __get_cpuid_max(level & 0x80000000u, nullptr);
|
||||
if (level > max) return false;
|
||||
__cpuid_count(level, 0, eax, ebx, ecx, edx);
|
||||
regs[0] = eax;
|
||||
|
Loading…
Reference in New Issue
Block a user