www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/03/12:09:50

Xref: news-dnh.mv.net comp.os.msdos.djgpp:4099
Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!tank.news.pipex.net!pipex!oleane!in2p3.fr!univ-lyon1.fr!jussieu.fr!unilim.fr!cict.fr!irit.fr!challier
From: challier AT news DOT irit DOT fr (Jean-Marc CHALLIER)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP: Inline assembly?
Date: 3 Jan 1996 11:55:33 GMT
Organization: IRIT-UPS, Toulouse, France
Lines: 27
Message-ID: <4cdqrl$ie@orphee.irit.fr>
References: <4apphs$las AT micro DOT internexus DOT net> <Pine DOT SUN DOT 3 DOT 91 DOT 951215145127 DOT 728B-100000 AT t3b> <4b65md$ol0 AT orphee DOT irit DOT fr> <4b9n8n$93q AT stealth DOT mindspring DOT com>
NNTP-Posting-Host: lucie.irit.fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Thomas Sames (tsames AT atl DOT mindspring DOT com) wrote:
: You can also use an offset from the stack to obtain the passed
: parameter to the function.  This is faster for a 386 but for the 486
: and pentuim, use the local variable.

True but be careful about that : the compiler may "push" a few
registers on the stack before the function code itself, thus
destroying your knowledge of "what's-where" relative to ESP. If you
meant EBP, it's quite more safe, but your program won't be able to
compile both with and with out the "-fomit-frame-pointer" option. I
know it's a bit buggy (specially with C++), but for for small
functions that can't be inlined (like those that are called via a
pointer) it can dramatically improve speed. The point in what I wrote
was : Leave to GCC as much work as possible : it's almost the only one
who knows how to play in its mud... :-)

Hope this helps...

			Igx, The dreaming drummer...

-----------------------------------------------------------------------------
Igx, The dreaming drummer... in real(???) life : Jean-Marc CHALLIER
email : challier AT irit DOT fr		| J-M CHALLIER,
pmail : IR1-17, UPS, 18 rte de Narbonne | 18, Bd Griffoul Dorval
	31000 Toulouse - FRANCE		| 31400 Toulouse - FRANCE
phone : (33) 61-55-63-57		| Tel : (33) 62-16-35-92

- Raw text -


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