changeset 30715:f5ecd7dd58e8

10l correct type for =a and =d constraints under x86-32
author zuxy
date Sat, 27 Feb 2010 12:15:02 +0000
parents 313cc6c3fddb
children e4ad2582ca37
files cpuinfo.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cpuinfo.c	Sat Feb 27 12:10:34 2010 +0000
+++ b/cpuinfo.c	Sat Feb 27 12:15:02 2010 +0000
@@ -77,10 +77,10 @@
 static int64_t
 rdtsc(void)
 {
-  uint64_t hi, lo;
+  uint32_t hi, lo;
 #define RDTSC   ".byte 0x0f, 0x31; "
   __asm__ volatile (RDTSC : "=a"(lo), "=d"(hi) : );
-  return hi << 32 | lo;
+  return (uint64_t) hi << 32 | lo;
 }
 
 static const char*