cpuid wrapper

Tomas Lindquist Olsen tomas at famolsen.dk
Wed Oct 25 04:25:09 PDT 2006


notknown wrote:
> Tomas Lindquist Olsen kirjoitti:
>> notknown wrote:
>>>
>>> Vendor string:    AuthenticAMD
>>> Processor string: AMD Sempron(tm)
>>> Features:         MMX SSE 3DNow! 3DNow!+ MMX+
>>> Multithreading:   0 threads / 0 cores
>>>
>>> 0 threads sounds weird, I am on Linux though.
>>
>> Weird indeed. The thread and core fields are initialised to one, and 
>> only if HTT is available is the code that set them invoked. As you 
>> dont have HTT on the list this really does not make sense. Can you try 
>> printing the value of those fields before the 'if (hyperThreading)' in 
>> CPUID.this ?
> 
> Okay,
> 
> I added these lines right before that if:
> 
>     writefln("flags=", flags);
>     writefln("misc=", misc);
>     writefln("exflags=", exflags);
>     writefln("apic=", apic);
>     writefln("vendorStr=", vendorStr);
>     writefln("processorStr=", processorStr);
>     writefln("maxThreads=", maxThreads);
>     writefln("maxCores=", maxCores);
>     writefln("manufac=", manufac);
> 
> 
> It prints now:
> 
> flags=58981375
> misc=0
> exflags=3251371007
> apic=0
> vendorStr=AuthenticAMD
> processorStr=AMD Sempron(tm)
> maxThreads=0
> maxCores=0
> manufac=2
> Vendor string:    AuthenticAMD
> Processor string: AMD Sempron(tm)
> Features:         MMX SSE 3DNow! 3DNow!+ MMX+
> Multithreading:   0 threads / 0 cores
This seems like a compiler bug. It's declared:
uint maxThreads=1;

Am I missing something?



More information about the Digitalmars-d-announce mailing list