aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/runtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/runtime.c')
-rw-r--r--libgo/runtime/runtime.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libgo/runtime/runtime.c b/libgo/runtime/runtime.c
index bae4621..abc1aff 100644
--- a/libgo/runtime/runtime.c
+++ b/libgo/runtime/runtime.c
@@ -194,6 +194,14 @@ runtime_cputicks(void)
uint32 low, high;
asm("rdtsc" : "=a" (low), "=d" (high));
return (int64)(((uint64)high << 32) | (uint64)low);
+#elif defined (__s390__) || defined (__s390x__)
+ uint64 clock;
+#ifdef S390_HAVE_STCKF
+ asm("stckf\t%0" : "=Q" (clock) : : );
+#else
+ clock = 0;
+#endif
+ return (int64)clock;
#else
// FIXME: implement for other processors.
return 0;