qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] qemu/timer: Don't use RDTSC on i486


From: Paolo Bonzini
Subject: Re: [PATCH] qemu/timer: Don't use RDTSC on i486
Date: Sun, 26 Nov 2023 16:56:31 +0100



Il sab 25 nov 2023, 13:23 Petr Cvek <petrcvekcz@gmail.com> ha scritto:
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__.

As far as I know QEMU cannot be run on i486 anyway since TCG assumes the presence of CPUID. Have you actually tried?

Paolo


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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]