torsava / rpms / python3

Forked from rpms/python3 6 years ago
Clone
3dfb714
diff -up Python-3.2rc1/Python/ceval.c.s390-tsc Python-3.2rc1/Python/ceval.c
3dfb714
--- Python-3.2rc1/Python/ceval.c.s390-tsc	2011-02-04 05:11:27.585224435 -0500
3dfb714
+++ Python-3.2rc1/Python/ceval.c	2011-02-04 05:12:38.065223933 -0500
3dfb714
@@ -74,6 +74,13 @@ ppc_getcounter(uint64 *v)
3dfb714
                          "=a" (((int*)&(val))[0]), "=d" (((int*)&(val))[1]));
3dfb714
 
3dfb714
 
3dfb714
+#elif defined(__s390__)
3dfb714
+
3dfb714
+/* covers both s390 and s390x */
3dfb714
+
3dfb714
+#define READ_TIMESTAMP(val) \
3dfb714
+    __asm__ __volatile__("stck %0" : "=Q" (val) : : "cc")
3dfb714
+
3dfb714
 #else
3dfb714
 
3dfb714
 #error "Don't know how to implement timestamp counter for this architecture"