torsava / rpms / python3

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