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