• Erik Niemeyer's avatar
    Support for extended feature flags enumeration leaf in CPUID instruction · 9f268611
    Erik Niemeyer authored
    This CL fixes an overcite with the AVX2 support CL previously
    merged (Change-Id: Idc03f3fca4bf2d0afd33631ea1d3caf8fc34ec29) that
    prevented runtime execution of AVX2 code in WebM. 
    Starting with the Sandybridge processor, the CPUID instruction was
    enhanced to add various extended feature flag enumeration leaves.
    Reading these leaves requires an additional input value for the CPUID
    instruction which is stored in ECX. This change adds this second input
    value for all ARCH_X86 and ARCH_x86_64 targets to the CPUID macros,
    allowing checks of EBX bit 5 for AVX2 support. This capability will be
    required moving forward to check for future processor features.
    Change-Id: Ie9d872bc9ff68dad4b6578e4544e4dfd0ae26c36
x86_cpuid.c 1.52 KB