recently I came across a term "identification register" related to Intel Processors. It was like key-value pair "IdentificationRegisters": "0x34AC34DC8901274A". Now since I don't know much about these terminologies related to processors(may be to identify them !), can I get some input from this community regarding what this could mean ?
Also I want to know if they are in anyway related to the registers EAX, EBX, ECX and EDX, because somewhere I saw following values:
Level EAX EBX ECX EDX
0x00000000 0x0000000b 0x756e6547 0x6c65746e 0x49656e69
0x00000001 0x000106a5 0x17100800 0x009ce3bd 0xbfebfbff
0x80000000 0x80000008 0x00000000 0x00000000 0x00000000
0x80000001 0x00000000 0x00000000 0x00000001 0x28100800
0x80000008 0x00003028 0x00000000 0x00000000 0x00000000
0x8000000a 0x00000000 0x00000000 0x00000000 0x00000000
It would be great if someone could help me in understanding this stuff.
What you probably mean is a generic capability of the x86 family (not just Intel), to provide information on the specific processor and the functionality it supports, using a machine instruction called CPUID.
You can use this instruction directly in your own program or through a existing wrapper program to learn about your CPU (most operating systems provide such functionalities, or 3rd party programs that tell you info about your CPU like CPU-Z).
More often you can use it to determine if your program supports certain optimizations (for example vector instructions of a certain width), and invoke optimized code accordingly. Some compilers use this technique to generate optimized code that adjust to the machine it runs on.
The CPUID supports several "functions" (denoted by the value of RAX, in some cases also RCX), and returns the data through the general purpose registers, which is why you see mention of RAX, RBX, ...
There's a nice summary here - https://en.wikipedia.org/wiki/CPUID though for the most accurate description you should refer to your processor manual (e.g. - http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf#G4.1062988)
Last but not least - CPUID has a side effect that causes serialization, which is why it's occasionally used along with time checks or other synchronization points. I wouldn't say it's a good practice as it has quite an overhead, but it's quite common to see it in that context.
User contributions licensed under CC BY-SA 3.0