Mail Archives: djgpp/2007/10/25/04:45:56

X-Authentication-Warning: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT nohavenot DOT cmm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Using inline asm
Date: Thu, 25 Oct 2007 04:39:14 -0400
Organization: NNTP Server
Lines: 23
Message-ID: <ffpkhp$p9o$>
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>
Mime-Version: 1.0
X-Complaints-To: abuse AT aioe DOT org
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-Priority: 3
X-MSMail-Priority: Normal
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"DJ Delorie" <dj AT delorie DOT com> wrote in message
news:200710250306 DOT l9P36dqi002391 AT envy DOT delorie DOT com...
> > > >    asm ("cpuid" : "=a" (iRet));
> >
> > Huh?  I'm sure I missed something...  That takes care of eax for cpuid,
> > that ignores ebx, ecx, and edx.  cpuid trashes those four registers
> > he returns them or not, correct?   How does GCC correct the other three?
>    asm ("cpuid" : "=a" (iRet) : : "ebx", "ecx", "edx");
> Or something like that.

Thanks.  Okay, it doesn't, so correct the code...  I wasn't sure if the asm
directive inserted a pusha; popa combination into the stackframe, say
instead of push ebp; pop ebp, or used some other method.  That might mess up


- Raw text -

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