2017-06-09 09:27:29 +02:00
|
|
|
diff --git src/mpid/ch3/channels/common/include/mv2_clock.h src/mpid/ch3/channels/common/include/mv2_clock.h
|
|
|
|
index ac117c2..335d07f 100644
|
|
|
|
--- src/mpid/ch3/channels/common/include/mv2_clock.h
|
|
|
|
+++ src/mpid/ch3/channels/common/include/mv2_clock.h
|
|
|
|
@@ -81,7 +81,24 @@ static inline cycles_t get_cycles()
|
|
|
|
asm volatile ("mov %0=ar.itc" : "=r" (ret));
|
|
|
|
return ret;
|
|
|
|
}
|
2018-03-26 16:24:11 +02:00
|
|
|
+#elif defined(__ARM_ARCH_7A__) || defined(__arm__)
|
2017-06-09 09:27:29 +02:00
|
|
|
+typedef unsigned long long cycles_t;
|
|
|
|
+static inline cycles_t get_cycles(void)
|
|
|
|
+{
|
|
|
|
+ cycles_t clk;
|
|
|
|
+ asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (clk));
|
|
|
|
+ return clk;
|
|
|
|
+}
|
|
|
|
+#elif defined(__aarch64__)
|
|
|
|
|
|
|
|
+typedef unsigned long cycles_t;
|
|
|
|
+static inline cycles_t get_cycles()
|
|
|
|
+{
|
|
|
|
+ cycles_t cval;
|
|
|
|
+ asm volatile("isb" : : : "memory");
|
|
|
|
+ asm volatile("mrs %0, cntvct_el0" : "=r" (cval));
|
|
|
|
+ return cval;
|
|
|
|
+}
|
|
|
|
#elif defined(__s390__) || defined(__s390x__)
|
|
|
|
typedef unsigned long cycles_t;
|
|
|
|
static inline cycles_t get_cycles()
|