From 27dd2b43eaf2f6748f3f7b42d395d9e6ad628142 Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Mon, 28 May 2007 23:24:23 +0400 Subject: Replaced the hardcoded opcodes with "rdtsc" notation, make the rdtsc() function static. --- src/xine-utils/monitor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/xine-utils/monitor.c b/src/xine-utils/monitor.c index fa3bcc779..c0cfd6179 100644 --- a/src/xine-utils/monitor.c +++ b/src/xine-utils/monitor.c @@ -65,17 +65,17 @@ int xine_profiler_allocate_slot (const char *label) { #if defined(ARCH_X86_32) -__inline__ unsigned long long int rdtsc(void) +static __inline__ unsigned long long int rdtsc(void) { unsigned long long int x; - __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); + __asm__ volatile ("rdtsc\n\t" : "=A" (x)); return x; } #elif defined(ARCH_X86_64) -__inline__ unsigned long long int rdtsc(void) +static __inline__ unsigned long long int rdtsc(void) { unsigned long long int a, d; - __asm__ volatile (".byte 0x0f, 0x31" : "=a" (a), "=d" (d)); + __asm__ volatile ("rdtsc\n\t" : "=a" (a), "=d" (d)); return (d << 32) | (a & 0xffffffff); } #endif -- cgit v1.2.3