Commit cde69c8e authored by knopp's avatar knopp

rtdsc_oai update for arm

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7144 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f2186a6e
...@@ -66,6 +66,15 @@ static inline unsigned long long rdtsc_oai(void) ...@@ -66,6 +66,15 @@ static inline unsigned long long rdtsc_oai(void)
__asm__ volatile ("rdtsc" : "=a" (a), "=d" (d)); __asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
return (d<<32) | a; return (d<<32) | a;
} }
#elif defined(__arm__)
static inline unsigned long long rdtsc_oai(void) __attribute__((always_inline));
static inline unsigned long long rdtsc_oai(void)
{
uint32_t r = 0;
asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(r) );
return (unsigned long long)r;
}
#endif #endif
static inline void start_meas(time_stats_t *ts) static inline void start_meas(time_stats_t *ts)
......
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