qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qemu/timer: Don't use RDTSC on i486
@ 2023-11-25 12:23 Petr Cvek
  2023-11-26 12:37 ` Samuel Tardieu
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Petr Cvek @ 2023-11-25 12:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, marcel.apfelbaum, mst

GCC defines __i386__ for i386 and i486, which both lack RDTSC instruction.
The i386 seems to be impossible to distinguish, but i486 can be identified
by checking for undefined __i486__.

Signed-off-by: Petr Cvek <petrcvekcz@gmail.com>
---
 include/qemu/timer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index 9a366e551f..7baa5d1d41 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -872,7 +872,7 @@ static inline int64_t cpu_get_host_ticks(void)
     return retval;
 }
 
-#elif defined(__i386__)
+#elif defined(__i386__) && !defined(__i486__)
 
 static inline int64_t cpu_get_host_ticks(void)
 {
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-11-29 14:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-25 12:23 [PATCH] qemu/timer: Don't use RDTSC on i486 Petr Cvek
2023-11-26 12:37 ` Samuel Tardieu
2023-11-26 12:59   ` Petr Cvek
2023-11-26 13:03     ` Samuel Tardieu
2023-11-26 22:49       ` Petr Cvek
2023-11-26 15:56 ` Paolo Bonzini
2023-11-26 22:52   ` Petr Cvek
2023-11-28 15:52   ` Richard Henderson
2023-11-29 13:50     ` Petr Cvek
2023-11-29 14:27       ` Richard Henderson
2023-11-27  9:49 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).