Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754557AbYJPGkX (ORCPT ); Thu, 16 Oct 2008 02:40:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751730AbYJPGkJ (ORCPT ); Thu, 16 Oct 2008 02:40:09 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45485 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751606AbYJPGkI (ORCPT ); Thu, 16 Oct 2008 02:40:08 -0400 Message-ID: <48F6E1A7.2070602@zytor.com> Date: Wed, 15 Oct 2008 23:39:35 -0700 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Jike Song CC: gcosta@redhat.com, linux-kernel@vger.kernel.org Subject: Re: questions about rd{msr|tsc|pmc} instruction with x86-64 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 761 Lines: 19 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/