aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-tideways_xhprof/timer_ppc64le.patch
blob: b70ca08ee9924c91408e7b20771b0f669bad7cec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/timer.h
+++ b/timer.h
@@ -75,8 +75,12 @@
             return 0;
 #endif
         case TIDEWAYS_XHPROF_CLOCK_TSC:
+#if !defined (__powerpc64__)
             asm volatile("rdtsc" : "=a" (a), "=d" (d));
             (val) = ((uint64)a) | (((uint64)d)<<32);
+#else
+	     asm volatile ("mftb %0" : "=r" (val));
+#endif
             return val / timebase_factor;
 
         default: