From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: patches@linaro.org
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 [thread overview]
Message-ID: <530655F3.3010607@twiddle.net> (raw)
In-Reply-To: <1392918631-14234-1-git-send-email-peter.maydell@linaro.org>
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~
next prev parent reply other threads:[~2014-02-20 19:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 17:50 [Qemu-devel] [PATCH] tcg/i386: Fix build for systems without working cpuid.h (MacOSX, Win32) Peter Maydell
2014-02-20 17:53 ` Peter Maydell
2014-02-20 19:22 ` Richard Henderson [this message]
2014-02-20 21:18 ` Stefan Weil
2014-02-20 22:18 ` Peter Maydell
2014-02-21 5:53 ` Stefan Weil
2014-02-21 16:32 ` Peter Maydell
2014-02-20 23:55 ` Brad Smith
2014-02-21 0:09 ` Peter Maydell
2014-02-21 0:48 ` Brad Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=530655F3.3010607@twiddle.net \
--to=rth@twiddle.net \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.