[MPlayer-dev-eng] [PATCH] Constraints clean up for RDTSC
Zuxy Meng
zuxy.meng at gmail.com
Sun Jun 25 22:20:57 CEST 2006
Hi,
Attached merges two asm constraints to one. Should work fine even on gcc 2.95.
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
--- mplayer/TOOLS/cpuinfo.c 2006-06-07 12:58:36.000000000 +0800
+++ mplayer.new/TOOLS/cpuinfo.c 2006-06-26 04:06:22.000000000 +0800
@@ -63,10 +63,10 @@
static int64_t
rdtsc(void)
{
- unsigned int i, j;
+ uint64_t i;
#define RDTSC ".byte 0x0f, 0x31; "
- asm volatile (RDTSC : "=a"(i), "=d"(j) : );
- return ((int64_t)j<<32) + (int64_t)i;
+ asm volatile (RDTSC : "=A"(i) : );
+ return i;
}
static const char*
More information about the MPlayer-dev-eng
mailing list