| www.delorie.com/archives/browse.cgi | search |
| 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 <dj AT delorie DOT com> |
| 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> <ffp07f$66t$1 AT aioe DOT org> <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 |
> 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");
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |