[FFmpeg-cvslog] r15661 - trunk/libavutil/common.h
michael
subversion
Tue Oct 21 16:57:55 CEST 2008
Author: michael
Date: Tue Oct 21 16:57:55 2008
New Revision: 15661
Log:
Port read_time() that works on x86_32 and 64 from noe.
Modified:
trunk/libavutil/common.h
Modified: trunk/libavutil/common.h
==============================================================================
--- trunk/libavutil/common.h (original)
+++ trunk/libavutil/common.h Tue Oct 21 16:57:55 2008
@@ -323,21 +323,13 @@ static inline av_pure int ff_get_fourcc(
#if defined(ARCH_X86) || defined(ARCH_POWERPC) || defined(ARCH_BFIN)
#define AV_READ_TIME read_time
-#if defined(ARCH_X86_64)
+#if defined(ARCH_X86)
static inline uint64_t read_time(void)
{
- uint64_t a, d;
+ uint32_t a, d;
__asm__ volatile("rdtsc\n\t"
: "=a" (a), "=d" (d));
- return (d << 32) | (a & 0xffffffff);
-}
-#elif defined(ARCH_X86_32)
-static inline long long read_time(void)
-{
- long long l;
- __asm__ volatile("rdtsc\n\t"
- : "=A" (l));
- return l;
+ return ((uint64_t)d << 32) + a;
}
#elif ARCH_BFIN
static inline uint64_t read_time(void)
More information about the ffmpeg-cvslog
mailing list