[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4 (ceval.c)
victor.stinner
python-checkins at python.org
Fri Dec 12 13:20:32 CET 2014
https://hg.python.org/cpython/rev/35b7dde7fd53
changeset: 93853:35b7dde7fd53
parent: 93850:05abd746064e
parent: 93852:adb445578995
user: Victor Stinner <victor.stinner at gmail.com>
date: Fri Dec 12 13:19:48 2014 +0100
summary:
Merge 3.4 (ceval.c)
files:
Python/ceval.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Python/ceval.c b/Python/ceval.c
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -65,9 +65,11 @@
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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list