Commit 681feee9 authored by aurel's avatar aurel

add an AMD64 specific implementation of rdtsc()


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4135 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent da5e5fd0
......@@ -457,6 +457,16 @@ if((y)<(x)){\
#endif
#if defined(ARCH_X86) || defined(ARCH_X86_64)
#if defined(ARCH_X86_64)
static inline uint64_t rdtsc(void)
{
uint64_t a, d;
asm volatile( "rdtsc\n\t"
: "=a" (a), "=d" (d)
);
return (d << 32) | (a & 0xffffffff);
}
#else
static inline long long rdtsc(void)
{
long long l;
......@@ -465,6 +475,7 @@ static inline long long rdtsc(void)
);
return l;
}
#endif
#define START_TIMER \
uint64_t tend;\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment