delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/10/24/21:20:48

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Wed, 24 Oct 2007 21:20:14 -0400
Message-Id: <200710250120.l9P1KEb2032374@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <471FEAC8.5179.2FAB88DB@gerritvn.gpvno.co.za>
Subject: Re: Using inline asm
References: <471FEAC8 DOT 5179 DOT 2FAB88DB AT gerritvn DOT gpvno DOT co DOT za>
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

>    int iRet;
>    asm ("cpuid");
>    asm ("movl %eax,%0" : "=g" (iRet));

Should be %%eax

This might work better (because know gcc will know that eax is
clobbered):

>    asm ("cpuid" : "=a" (iRet));

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019