www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/02/18:09:12

From: "John S. Fine" <johnfine AT erols DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ASM - function: what should be pushed?
Date: Tue, 02 Feb 1999 15:45:47 -0500
Lines: 25
Message-ID: <36B763FB.66C8@erols.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990201085530 DOT 27193D AT is> <36B64AA2 DOT DDD7B659 AT cartsys DOT com> <36B64EBA DOT 6D55 AT erols DOT com> <199902020148 DOT UAA06492 AT envy DOT delorie DOT com>
Mime-Version: 1.0
X-Trace: gys1ZFKlAKkl7D9V+91aXwD3WWMY6i2JoczchEOtZ+U=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 2 Feb 1999 20:46:59 GMT
X-Mailer: Mozilla 3.01 (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

DJ Delorie wrote:

> OK, here it is from the horse's mouth (the gcc/libc sources).  Let me
> know if I missed any.
> 
> ax,cx,dx,sp,st0-7,sw,cw - can be used without saving

  sp?  Well we all know esp is its own special case and
its behavior in standard "C" calling conventions is
clear.  I find it strange that you would class it with
ax,cx,dx.

> bx,si,di,bp - must be preserved
> cs,ds,es,ss - must be preserved
> ip - you don't much choice about this one

> fs - reserved for application use; neither gcc nor libc use this
> gs - used by libc, but need not be preserved if you change it

  "used by libc":  Used and preserved?  or Used and not preserved?
(either way I understand you are saying an ASM called by C code
doesn't need to preserve it;  But it makes a difference).
-- 
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/

- Raw text -


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