From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGZRu-0000Wk-PF for qemu-devel@nongnu.org; Thu, 20 Feb 2014 14:38:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGZRm-0001b4-Bt for qemu-devel@nongnu.org; Thu, 20 Feb 2014 14:38:22 -0500 Received: from mail-qc0-x22a.google.com ([2607:f8b0:400d:c01::22a]:47777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGZRm-0001b0-7Z for qemu-devel@nongnu.org; Thu, 20 Feb 2014 14:38:14 -0500 Received: by mail-qc0-f170.google.com with SMTP id c9so3707012qcz.29 for ; Thu, 20 Feb 2014 11:38:13 -0800 (PST) Sender: Richard Henderson Message-ID: <530655F3.3010607@twiddle.net> Date: Thu, 20 Feb 2014 13:22:27 -0600 From: Richard Henderson MIME-Version: 1.0 References: <1392918631-14234-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1392918631-14234-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tcg/i386: Fix build for systems without working cpuid.h (MacOSX, Win32) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: patches@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~