Whilst developing some software that reports information about x86 processors, I noticed something strange: Sandybridge processors report an incorrect core number.
This is how I'm retrieving the core number (pseudocode):
Move 0x00000004 into EAX
Move 0x00000000 into ECX
Logical AND on bits EAX[31:26]
Shift EAX right by 26
Increase value of EAX by 1
On my primary test platform, an Intel Pentium T4500 (Penryn), it reports the core number correctly, as shown below:
However, on a separate machine with an Intel Core i5 2500K, it reports the core number incorrectly, as shown below:
Does anyone know why it is reporting double the number of cores it should? Both programs are running exactly the same code (and it isn't Windows 8, because I've tested on Windows 7 with a 2500K).