benchmark/benchmark-s390.patch
Martin Pluskal f9261c4bbc - Update to version 1.1.0:
* ArgNames support
  * Fixes for OSX and Cygwin and MSVC builds
  * PauseTiming and ResumeTiming are per thread (#286)
  * Better Range and Arg specifications
  * Complexity reporting

OBS-URL: https://build.opensuse.org/package/show/devel:tools/benchmark?expand=0&rev=8
2017-01-27 14:50:46 +00:00

17 lines
655 B
Diff

Index: src/cycleclock.h
===================================================================
--- src/cycleclock.h.orig
+++ src/cycleclock.h
@@ -132,6 +132,11 @@ inline BENCHMARK_ALWAYS_INLINE int64_t N
struct timeval tv;
gettimeofday(&tv, nullptr);
return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
+#elif defined(__s390__)
+ // found this for papi package
+ unsigned long long ret;
+ __asm__("stck 0(%0)" : : "a" (&(ret)) : "memory", "cc");
+ return (long long)ret;
#else
// The soft failover to a generic implementation is automatic only for ARM.
// For other platforms the developer is expected to make an attempt to create