[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] qemu/timer: Don't use RDTSC on i486
|
From: |
Petr Cvek |
|
Subject: |
[PATCH] qemu/timer: Don't use RDTSC on i486 |
|
Date: |
Sat, 25 Nov 2023 13:23:22 +0100 |
|
User-agent: |
Mozilla Thunderbird |
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
Re: [PATCH] qemu/timer: Don't use RDTSC on i486, Peter Maydell, 2023/11/27