How to use CPUID instruction to get x86 CPU features correctly?

1.2k views Asked by At

I want to write a small program to get the features of x86CPUs. 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?

1

There are 1 answers

0
Nan Xiao On BEST ANSWER

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.