Re: questions about rd{msr|tsc|pmc} instruction with x86-64

From: H. Peter Anvin
Date: Thu Oct 16 2008 - 02:40:24 EST


Jike Song wrote:

By my reading of Intel & AMD manuals, this comment is wrong. rdmsr of
x86-64 has the same behavior as i386, namely the high 32bit returns in
edx and the low 32bit in eax, not "returns at rax". And the gcc
constraint "A" does mean edx:eax in x86-64 also, at least when testing
on my AMD Turion 64 processor.


"A" means rdx:rax on x86-64, not edx:eax. For a 64-bit number, it means, literally, "one of rdx or rax"! As you correctly point out, this is not how rdmsr works.

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/