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

H. Peter Anvin
2008-10-16T06:40:23Z

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