On Thu, Mar 13, 2008 at 2:35 PM, Joel Sherrill
<[EMAIL PROTECTED]> wrote:

>  I hacked on that test program to get the attached
>  program.  I ran it multiple times on qemu.
>
>  ext=0x0 sig=0x756e6547
>  0x781abfd YES on SSE2
>
>  I ran the same program natively and got this:
>
>  ext=0x0 sig=0x756e6547
>  0xbfebfbff YES on SSE2
>
>  I wonder if qemu is just reporting things wrong. :(
>  I searched the qemu manual and googled some but
>  didn't see anything that jumped out.
>
>  Does this look like qemu reporting a bogus cpuid or
>  gcc not parsing it correctly?

This all depends on the return value of __get_cpuid_max(). It returns
max value of base cpuid level (5 in my case), and shoould return 0 if
cpuid is not supported. This follows the procedure outlined in
http://download.intel.com/design/processor/applnots/24161832.pdf,
section 2: "Detecting the CPUID Instruction".

It is true, that this is not the most maintained code on the planet,
so some bitrot is possible. The return value of __get_cpuid_max() on
your target will tell...

Thanks,
Uros.

Reply via email to