From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tbuys-0002DV-QI for qemu-devel@nongnu.org; Fri, 23 Nov 2012 10:15:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tbuyn-0005J7-V7 for qemu-devel@nongnu.org; Fri, 23 Nov 2012 10:15:50 -0500 Sender: Paolo Bonzini Message-ID: <50AF931B.8080707@redhat.com> Date: Fri, 23 Nov 2012 16:15:39 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1353683570-30525-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1353683570-30525-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] qemu-timer: Don't use RDTSC on 386s and 486s List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-trivial@nongnu.org, patches@linaro.org, qemu-devel@nongnu.org, Yurij Popov Il 23/11/2012 16:12, Peter Maydell ha scritto: > Adjust the conditional which guards the implementation of > cpu_get_real_ticks() via RDTSC, so that we don't try to use it > on x86 CPUs which don't implement RDTSC. Instead we will fall > back to the no-cycle-counter-available default implementation. > > Reported-by: Yurij Popov > Signed-off-by: Peter Maydell > --- > qemu-timer.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-timer.h b/qemu-timer.h > index da7e97c..e35f163 100644 > --- a/qemu-timer.h > +++ b/qemu-timer.h > @@ -169,7 +169,7 @@ static inline int64_t cpu_get_real_ticks(void) > return retval; > } > > -#elif defined(__i386__) > +#elif defined(__i586__) > > static inline int64_t cpu_get_real_ticks(void) > { > You should at least test __i686__ too: $ gcc -m32 -dM -E -x c /dev/null |grep __i #define __i686 1 #define __i686__ 1 #define __i386 1 #define __i386__ 1 Paolo