Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Jamie Lokier
Peter Maydell wrote: > On 23 November 2012 15:31, Jamie Lokier wrote: > > x86 instruction sets haven't followed a linear progression of features > > for quite a while, especially including non-Intel chips, so it stopped > > making sense for GCC to indicate the instruction set in that way. > > If

Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Jamie Lokier
Peter Maydell wrote: > On 23 November 2012 15:17, Peter Maydell wrote: > > On 23 November 2012 15:15, Paolo Bonzini wrote: > >> 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 > >> #def

Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Peter Maydell
On 23 November 2012 15:31, Jamie Lokier wrote: > x86 instruction sets haven't followed a linear progression of features > for quite a while, especially including non-Intel chips, so it stopped > making sense for GCC to indicate the instruction set in that way. If you're going to go down that rout

Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Peter Maydell
On 23 November 2012 15:17, Peter Maydell wrote: > On 23 November 2012 15:15, Paolo Bonzini wrote: >> 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 > > Yuck. I had assumed

Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Jamie Lokier
Peter Maydell wrote: > On 23 November 2012 15:15, Paolo Bonzini wrote: > > Il 23/11/2012 16:12, Peter Maydell ha scritto: > >> Adjust the conditional which guards the implementation of > >> > >> -#elif defined(__i386__) > >> +#elif defined(__i586__) > >> > >> static inline int64_t cpu_get_real_ti

Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Peter Maydell
On 23 November 2012 15:15, Paolo Bonzini wrote: > Il 23/11/2012 16:12, Peter Maydell ha scritto: >> Adjust the conditional which guards the implementation of >> >> -#elif defined(__i386__) >> +#elif defined(__i586__) >> >> static inline int64_t cpu_get_real_ticks(void) >> { >> > > You should at

Re: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Paolo Bonzini
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 implementatio

[Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s

2012-11-23 Thread Peter Maydell
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 Mayd