summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-12 12:19:48 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-12-12 12:19:48 (GMT)
commit60b33cc6a5e734cce4650ef9ca8868a1f190a55a (patch)
tree1aa519223bc5cabaff080f052ce49a1e47155557 /Python
parentee2b23746456cc7e72eda3cfaef680f9f54df847 (diff)
parent0b881dd50f38ef3215aa5093d57b353440bba076 (diff)
downloadcpython-60b33cc6a5e734cce4650ef9ca8868a1f190a55a.zip
cpython-60b33cc6a5e734cce4650ef9ca8868a1f190a55a.tar.gz
cpython-60b33cc6a5e734cce4650ef9ca8868a1f190a55a.tar.bz2
Merge 3.4 (ceval.c)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 4b1d6ca..e92a339 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -65,9 +65,11 @@ ppc_getcounter(uint64 *v)
even in 64-bit mode, we need to use "a" and "d" for the lower and upper
32-bit pieces of the result. */
-#define READ_TIMESTAMP(val) \
- __asm__ __volatile__("rdtsc" : \
- "=a" (((int*)&(val))[0]), "=d" (((int*)&(val))[1]));
+#define READ_TIMESTAMP(val) do { \
+ unsigned int h, l; \
+ __asm__ __volatile__("rdtsc" : "=a" (l), "=d" (h)); \
+ (val) = ((uint64)l) | (((uint64)h) << 32); \
+ } while(0)
#else