Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 437ffbd commit 0b881ddCopy full SHA for 0b881dd
1 file changed
Python/ceval.c
@@ -65,9 +65,11 @@ ppc_getcounter(uint64 *v)
65
even in 64-bit mode, we need to use "a" and "d" for the lower and upper
66
32-bit pieces of the result. */
67
68
-#define READ_TIMESTAMP(val) \
69
- __asm__ __volatile__("rdtsc" : \
70
- "=a" (((int*)&(val))[0]), "=d" (((int*)&(val))[1]));
+#define READ_TIMESTAMP(val) do { \
+ unsigned int h, l; \
+ __asm__ __volatile__("rdtsc" : "=a" (l), "=d" (h)); \
71
+ (val) = ((uint64)l) | (((uint64)h) << 32); \
72
+ } while(0)
73
74
75
#else
0 commit comments