X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Sun, 28 Oct 2007 08:36:02 -0400 Message-Id: <200710281236.l9SCa2X2008914@envy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <472414A7.7070602@zytor.com> (hpa@zytor.com) Subject: Re: Using inline asm References: <471FEAC8 DOT 5179 DOT 2FAB88DB AT gerritvn DOT gpvno DOT co DOT za> <200710250120 DOT l9P1KEb2032374 AT envy DOT delorie DOT com> <200710250306 DOT l9P36dqi002391 AT envy DOT delorie DOT com> <472414A7 DOT 7070602 AT zytor DOT com> Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > asm("cpuid" : "=a" (eax) : "a" (level) > : "ebx", "ecx", "edx"); I don't think you can use the same register as input and output, you have to use a matching constraint: > asm("cpuid" : "=a" (eax) : "0" (level) > : "ebx", "ecx", "edx");