I want to write a small program to get the features of x86
CPUs. After referring CPUID document, I find there are 2
sections:
(1) EAX=1:
......
As of January 2011, the standard Intel feature flags are as follows:
......
(2) EAX=80000001h:
......
AMD feature flags are as follows:
......
So it means if CPU vendor is GenuineIntel
, I should use EAX=1
while if it is AuthenticAMD
, I should use EAX=80000001h
to execute CPUID
instruction. Is my understanding correct?
After referring AMD CPUID and Intel CPUID documents, I can learn their flags are different for
EAX 1 CPUID
instruction, so need to differentiate them.