mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
16 lines
384 B
Diff
16 lines
384 B
Diff
--- 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:
|