qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tcg/i386: Fix build for systems without working


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] tcg/i386: Fix build for systems without working cpuid.h (MacOSX, Win32)
Date: Thu, 20 Feb 2014 13:22:27 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/20/2014 11:50 AM, Peter Maydell wrote:
> +    unsigned a, b, c, d;
> +    int max = __get_cpuid_max(0, 0);
> +
> +    if (max >= 1) {
> +        __cpuid(1, a, b, c, d);
> +    }
> +    return 0;
>  }

You might as well check for __cpuid_count too while you're at it:

  if (max >= 7)
    __cpuid_count(7, 0, a, b, c, d);

Otherwise it looks good to me.

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]