[MPlayer-dev-eng] [PATCH] Make cpuinfo calculate correct frequency under x86-64

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Feb 18 19:13:29 CET 2010


On Thu, Feb 18, 2010 at 11:12:23PM +0800, Zuxy Meng wrote:
> '=A' under x86-64 means %rdx:%rax instead of %edx:%eax so cpuinfo will
> produce wrong result. The attached patch makes this small program work
> well under both x86 and x86-64.

But the type is wrong for x86, the registers are not 64 bit on x86.
And on x86-64 it's also eax:edx you want, so the type should be uint32_t
(of course you need a cast for the shift then).



More information about the MPlayer-dev-eng mailing list