News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Quick CPU info based on CPUID

Started by jj2007, February 11, 2009, 11:27:32 AM

Previous topic - Next topic

lingo

#30
"There is one,in particular,that isn't shown by your prog.
Quote:
NUMBER_OF_PROCESSORS=1"


You can add info for cores too: :wink
Short version:
P3 (2000+), MMX, SSE3

Full version:
CPU family 6, model 7, P3 (2000+), MMX, SSE6
Step            6
Model           7
Family          6
Type            0
Ext model       1
Ext family      0
Cores           2
Manufacturer    GenuineIntel

[attachment deleted by admin]

Mark Jones

"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

jj2007

Quote from: Mark Jones on March 31, 2009, 05:18:41 AM
Quote from: lingo on March 31, 2009, 03:22:09 AM
... SSE6

Whoa, I need to upgrade. :bg

CPU family 6, model 14, Core (2006+), MMX, SSE6

I was upgraded, too - thanks, Lingo :cheekygreen:

donkey

Might want to check for 64 bit as well:

Test64bit:
.unknown
mov eax, 00000000h
cpuid
cmp eax, 00000000h
je >.amd

.intel
mov eax, 00000001h
cpuid
bt edx, 30
jc >.64bit
// 32 bit
xor eax,eax
ret

.amd
mov eax, 80000000h
cpuid
cmp eax, 80000000h
jbe >.32bit
mov eax, 80000001h
cpuid
bt edx, 29
jc >.64bit

.32bit
xor eax,eax
ret

.64bit
mov eax,1
ret
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

jj2007

Quote from: Mark Jones on March 31, 2009, 05:18:41 AM
Quote from: lingo on March 31, 2009, 03:22:09 AM
... SSE6

Whoa, I need to upgrade. :bg

Hurry up, I suspect some members already arrive at SSE8!
If you want to slow down this incredible rate of progress, insert the following:

* Core 2 (2006): family 6, model 15 @
  and CpuSSE, 0
  .if family==5
...
Thanks, Lingo :thumbu

dedndave

ID'ing the CPU (and in the old days, NDP) has gotten sloppier each time someone adds a device
One of the reasons is that mfg B does not care if they follow the rules set forth by mfg A
Another reason is that mfg A cannot predict the future, so find reasons to violate their own rules - lol
I can see how it could get messy
It is somewhat easier now than with the earlier processors
In some cases, we had to find code that executed differently on one CPU/NDP to ID it
.
.
.
this is a dual pentium machine...

Short version:
Pentium 4 Prescott (2005+), MMX, SSE3

Full version:
CPU family 15, model 4, Pentium 4 Prescott (2005+), MMX, SSE6
Step            3
Model           4
Family          15
Type            0
Ext model       0
Ext family      0
Cores            2
Manufacturer    GenuineIntel