Mercurial > mplayer.hg
comparison cpuinfo.c @ 30714:313cc6c3fddb
Replace =A with =a and =d; make frequency calculation correct under x86-64
author | zuxy |
---|---|
date | Sat, 27 Feb 2010 12:10:34 +0000 |
parents | c1a3f1bbba26 |
children | f5ecd7dd58e8 |
comparison
equal
deleted
inserted
replaced
30713:9dc765bfa063 | 30714:313cc6c3fddb |
---|---|
75 | 75 |
76 | 76 |
77 static int64_t | 77 static int64_t |
78 rdtsc(void) | 78 rdtsc(void) |
79 { | 79 { |
80 uint64_t i; | 80 uint64_t hi, lo; |
81 #define RDTSC ".byte 0x0f, 0x31; " | 81 #define RDTSC ".byte 0x0f, 0x31; " |
82 __asm__ volatile (RDTSC : "=A"(i) : ); | 82 __asm__ volatile (RDTSC : "=a"(lo), "=d"(hi) : ); |
83 return i; | 83 return hi << 32 | lo; |
84 } | 84 } |
85 | 85 |
86 static const char* | 86 static const char* |
87 brandname(int i) | 87 brandname(int i) |
88 { | 88 { |