1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Description: Fix hppa build on debian
Author: Helge Deller <deller@gmx.de>
diff -up ./lib/benchmark/src/cycleclock.h.org ./lib/benchmark/src/cycleclock.h
--- ./lib/benchmark/src/cycleclock.h.org 2022-09-19 06:14:28.454775112 +0000
+++ ./lib/benchmark/src/cycleclock.h 2022-09-19 06:20:45.298702719 +0000
@@ -108,6 +108,10 @@ inline BENCHMARK_ALWAYS_INLINE int64_t N
int64_t itc;
asm("mov %0 = ar.itc" : "=r"(itc));
return itc;
+#elif defined(__hppa__)
+ unsigned long cr16;
+ asm("mfctl 16,%0" : "=r" (cr16));
+ return cr16;
#elif defined(COMPILER_MSVC) && defined(_M_IX86)
// Older MSVC compilers (like 7.x) don't seem to support the
// __rdtsc intrinsic properly, so I prefer to use _asm instead
|