[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec common.h,1.147,1.148
Aurelien Jacobs CVS
aurel
Mon Apr 18 13:24:23 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv20295/libavcodec
Modified Files:
common.h
Log Message:
add an AMD64 specific implementation of rdtsc()
Index: common.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/common.h,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- common.h 6 Mar 2005 23:20:53 -0000 1.147
+++ common.h 18 Apr 2005 11:24:20 -0000 1.148
@@ -457,6 +457,16 @@
#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 @@
);
return l;
}
+#endif
#define START_TIMER \
uint64_t tend;\
More information about the ffmpeg-cvslog
mailing list