[MPlayer-cvslog] r30756 - trunk/cpuinfo.c
zuxy
subversion at mplayerhq.hu
Sat Feb 27 13:10:34 CET 2010
Author: zuxy
Date: Sat Feb 27 13:10:34 2010
New Revision: 30756
Log:
Replace =A with =a and =d; make frequency calculation correct under x86-64
Modified:
trunk/cpuinfo.c
Modified: trunk/cpuinfo.c
==============================================================================
--- trunk/cpuinfo.c Sat Feb 27 12:32:48 2010 (r30755)
+++ trunk/cpuinfo.c Sat Feb 27 13:10:34 2010 (r30756)
@@ -77,10 +77,10 @@ cpuid(int func) {
static int64_t
rdtsc(void)
{
- uint64_t i;
+ uint64_t hi, lo;
#define RDTSC ".byte 0x0f, 0x31; "
- __asm__ volatile (RDTSC : "=A"(i) : );
- return i;
+ __asm__ volatile (RDTSC : "=a"(lo), "=d"(hi) : );
+ return hi << 32 | lo;
}
static const char*
More information about the MPlayer-cvslog
mailing list