mirror of https://github.com/mpv-player/mpv
Replace =A with =a and =d; make frequency calculation correct under x86-64
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30756 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3a43f13fce
commit
26cab7638f
|
@ -77,10 +77,10 @@ cpuid(int func) {
|
||||||
static int64_t
|
static int64_t
|
||||||
rdtsc(void)
|
rdtsc(void)
|
||||||
{
|
{
|
||||||
uint64_t i;
|
uint64_t hi, lo;
|
||||||
#define RDTSC ".byte 0x0f, 0x31; "
|
#define RDTSC ".byte 0x0f, 0x31; "
|
||||||
__asm__ volatile (RDTSC : "=A"(i) : );
|
__asm__ volatile (RDTSC : "=a"(lo), "=d"(hi) : );
|
||||||
return i;
|
return hi << 32 | lo;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char*
|
static const char*
|
||||||
|
|
Loading…
Reference in New Issue