Mail Archives: djgpp/1999/07/05/07:05:31
"Batchex" <thedark1 AT hotpop DOT com> writes:
> 1. Does DJGPP compiled programs use FS and GS registers in any way ?
%gs is used for internal purposes by libc (to hold a copy of the DOS
memory selector, but it probably isn't a good idea to rely on that).
If you change this value, you have to put it back when you are done.
%fs isn't used by any library routines other than the contents of
<sys/farptr.h>, but may be used by other code, for example Allegro
makes heavy use of it. You don't need to bother restoring this
value, though: clobber it at will, but assume that any third party
libs might also clobber it when you call their functions.
> 2. Does DJGPP use register variables when optimizing is on ?
Of course! Any decent optimising compiler will do that, and gcc is
one of the best there is.
> If it does, what registers does it use ?
All of them. Except %ebp, that is, unless you use the
-fomit-frame-pointer switch (%ebp is normally used for a stack
frame instead, which results in slightly slower code but is
essential if you want to use any of the debugging tools).
> 3. Where are the manuals/docs for FSDB ? I can't seem to find it
> anywhere.
I don't think there are any.
Shawn Hargreaves.
- Raw text -