aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-tideways_xhprof/timer_ppc64le.patch
diff options
context:
space:
mode:
authorMike Sullivan <mksully22@gmail.com>2018-03-06 14:41:40 +0000
committerJakub Jirutka <jakub@jirutka.cz>2018-03-06 22:59:30 +0100
commit15a4523925c0dd7f2ea35ed0fdee4460c6cfab10 (patch)
tree07a5060d05de8325abf824959ec7bd27dc6926bf /testing/php7-tideways_xhprof/timer_ppc64le.patch
parent123c2037102956c8488ac48276937d88c8d01965 (diff)
downloadaports-15a4523925c0dd7f2ea35ed0fdee4460c6cfab10.tar.bz2
aports-15a4523925c0dd7f2ea35ed0fdee4460c6cfab10.tar.xz
testing/php7-tideways_xhprof: fix timer function for ppc64le
Diffstat (limited to 'testing/php7-tideways_xhprof/timer_ppc64le.patch')
-rw-r--r--testing/php7-tideways_xhprof/timer_ppc64le.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/php7-tideways_xhprof/timer_ppc64le.patch b/testing/php7-tideways_xhprof/timer_ppc64le.patch
new file mode 100644
index 0000000000..b70ca08ee9
--- /dev/null
+++ b/testing/php7-tideways_xhprof/timer_ppc64le.patch
@@ -0,0 +1,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: