aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 13b07c8427..c3894b8017 100644
--- a/vl.c
+++ b/vl.c
@@ -532,6 +532,15 @@ int64_t cpu_get_real_ticks(void)
return val;
}
+#elif defined(__s390__)
+
+int64_t cpu_get_real_ticks(void)
+{
+ int64_t val;
+ asm volatile("stck 0(%1)" : "=m" (val) : "a" (&val) : "cc");
+ return val;
+}
+
#else
#error unsupported CPU
#endif