diff options
author | Stas Sergeev <stsp@aknet.ru> | 2007-05-28 23:24:23 +0400 |
---|---|---|
committer | Stas Sergeev <stsp@aknet.ru> | 2007-05-28 23:24:23 +0400 |
commit | 27dd2b43eaf2f6748f3f7b42d395d9e6ad628142 (patch) | |
tree | a5248657801dee9eb73347ee89bf8ed8120bf612 /src | |
parent | 54af64d5c7612dee367fd9ddfec3d5db62ff14f3 (diff) | |
download | xine-lib-27dd2b43eaf2f6748f3f7b42d395d9e6ad628142.tar.gz xine-lib-27dd2b43eaf2f6748f3f7b42d395d9e6ad628142.tar.bz2 |
Replaced the hardcoded opcodes with "rdtsc" notation, make the rdtsc() function static.
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-utils/monitor.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 |