qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 23/32] move cpu_get_time_fast to kqemu.c


From: Glauber Costa
Subject: [Qemu-devel] [PATCH 23/32] move cpu_get_time_fast to kqemu.c
Date: Thu, 23 Oct 2008 12:19:07 -0200

remove it from generic code
Signed-off-by: Glauber Costa <address@hidden>
---
 kqemu.c           |    7 +++++++
 target-i386/cpu.h |    9 ---------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/kqemu.c b/kqemu.c
index 5ca0f76..16ebe7d 100644
--- a/kqemu.c
+++ b/kqemu.c
@@ -90,6 +90,13 @@ uint8_t *modified_ram_pages_table;
 int qpi_io_memory;
 uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
 
+static inline int cpu_get_time_fast(void)
+{
+    int low, high;
+    asm volatile("rdtsc" : "=a" (low), "=d" (high));
+    return low;
+}
+
 #define cpuid(index, eax, ebx, ecx, edx) \
   asm volatile ("cpuid" \
                 : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 8a2d797..6310529 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -726,15 +726,6 @@ void cpu_x86_update_cr0(CPUX86State *env, uint32_t 
new_cr0);
 #define X86_DUMP_FPU  0x0001 /* dump FPU state too */
 #define X86_DUMP_CCOP 0x0002 /* dump qemu flag cache */
 
-#ifdef USE_KQEMU
-static inline int cpu_get_time_fast(void)
-{
-    int low, high;
-    asm volatile("rdtsc" : "=a" (low), "=d" (high));
-    return low;
-}
-#endif
-
 #define TARGET_PAGE_BITS 12
 
 #define CPUState CPUX86State
-- 
1.5.5.1





reply via email to

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