note this primitive currently uses a union to concatenate 2x32bit registers because of poor compiler support
around DImode and asm.
Originally committed as revision 9302 to svn://svn.ffmpeg.org/ffmpeg/trunk
}\
}
-#if defined(ARCH_X86) || defined(ARCH_POWERPC)
+#if defined(ARCH_X86) || defined(ARCH_POWERPC) || defined(ARCH_BFIN)
#if defined(ARCH_X86_64)
static inline uint64_t read_time(void)
{
);
return l;
}
+#elif ARCH_BFIN
+static inline uint64_t read_time(void)
+{
+ union {
+ struct {
+ unsigned lo;
+ unsigned hi;
+ } p;
+ unsigned long long c;
+ } t;
+ asm volatile ("%0=cycles; %1=cycles2;" : "=d" (t.p.lo), "=d" (t.p.hi));
+ return t.c;
+}
#else //FIXME check ppc64
static inline uint64_t read_time(void)
{