© Jo Van Hoey 2019
J. Van HoeyBeginning x64 Assembly Programminghttps://doi.org/10.1007/978-1-4842-5076-1_25

25. Got Some ID?

Jo Van Hoey1 
(1)
Hamme, Belgium
 

Sometimes it is necessary to find out the functionality available in a processor. In your program, you can, for example, look for the presence or absence of a certain version of SSE. In the next chapter, we will use programs with SSE instructions, so we need to find out first which version of SSE is supported by our processor. There is an instruction for checking the CPU characteristics: cpuid.

Using cpuid

You first put a specific parameter in eax, then execute the instruction cpuid, and finally check the returned value in ecx and edx. Indeed, cpuid uses 32-bit registers.

The amount of information ...

Get Beginning x64 Assembly Programming: From Novice to AVX Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.