delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/04/19:25:17

From: "John S. Fine" <johnfine AT erols DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP & registers
Date: Sun, 04 Jul 1999 18:31:36 -0400
Lines: 29
Message-ID: <377FE0C8.286C@erols.com>
References: <199907042018 DOT QAA11787 AT delorie DOT com>
Mime-Version: 1.0
X-Trace: Snuirq0+kTb2K9Jmfuw75qadeqoZPmp8G83UusD859s=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 4 Jul 1999 22:33:36 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

Batchex wrote:

> 1. Does DJGPP compiled programs use FS and GS registers in any way ?

  We had a discussion of that here a while ago.  You can see an
answer in that thread at

http://x31.deja.com/[ST_rn=ps]/getdoc.xp?AN=439584610

  There is lso a place there to click to get access to the whole
thread.

  If I understood that thread correctly, neither compiled code
nor library routines use fs.  That means you can decide amoung
your own routines whether to treat it as global or saved or
temp.  Compiled code doesn't use gs but library routines use it
and don't save it.

> 2. Does DJGPP use register variables when optimizing is on ? If it
> does, what registers does it use ?

  Whatever registers it can.  Usually that means ebx, esi and edi
because they are preserved across subroutine calls;  However,
sometimes it may detect that a variable's active scope includes no
subroutine calls and it may use edx, ecx and I think even eax as
register variables.
-- 
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