diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-05-30 16:15:57 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-05-30 16:15:57 +0100 |
commit | fe2112a1ac52fbf65e2624b978f9d33f04b6af56 (patch) | |
tree | d7added18fd164d7104a90566cbcbac592d6529a /src/xine-utils | |
parent | 17b4d5acdbcfdf069e549ba27b49b8dc89ce2488 (diff) | |
parent | b681e2018ab1e212195aa5dfa1fb03cb69533e62 (diff) | |
download | xine-lib-fe2112a1ac52fbf65e2624b978f9d33f04b6af56.tar.gz xine-lib-fe2112a1ac52fbf65e2624b978f9d33f04b6af56.tar.bz2 |
Merge from 1.1.
Diffstat (limited to 'src/xine-utils')
-rw-r--r-- | src/xine-utils/monitor.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/xine-utils/monitor.c b/src/xine-utils/monitor.c index 19a9dc977..b19195065 100644 --- a/src/xine-utils/monitor.c +++ b/src/xine-utils/monitor.c @@ -61,13 +61,20 @@ int xine_profiler_allocate_slot (const char *label) { } -#if defined(ARCH_X86) || defined(ARCH_X86_64) -__inline__ unsigned long long int rdtsc(void) +#if defined(ARCH_X86_32) +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) +static __inline__ unsigned long long int rdtsc(void) +{ + unsigned long long int a, d; + __asm__ volatile ("rdtsc\n\t" : "=a" (a), "=d" (d)); + return (d << 32) | (a & 0xffffffff); +} #endif void xine_profiler_start_count (int id) { |