-1

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?

jww
  • 97,681
  • 90
  • 411
  • 885
Nan Xiao
  • 16,671
  • 18
  • 103
  • 164
  • What exactly do you want to detect? If it's something vendor-neutral like SSSE3, then you should execute CPUID with the inputs specified by the feature you're trying to detect... – Peter Cordes Sep 12 '17 at 05:10

1 Answers1

0

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.

Nan Xiao
  • 16,671
  • 18
  • 103
  • 164