When I run the following code, I get ERMS == false
, but erms == true
. Why is this?
#include <intrin.h>
#include <Windows.h>
int main()
{
int regs[4];
__cpuidex(regs, 7, 0);
// https://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=0:_Extended_Features
bool erms = !!(regs[1] /* EBX */ & (1 << 9));
bool ERMS = !!IsProcessorFeaturePresent(PF_ERMS_AVAILABLE);
}