www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/24/02:04:11

Mime-Version: 1.0
To: Blaine Hodge <bhodge AT gpu DOT srv DOT ualberta DOT ca>, djgpp AT delorie DOT com
From: Nate Eldredge <nate AT cartsys DOT com>
Subject: Re: NASM and DJGPP
Date: Sat, 23 May 1998 22:58:03 -0700
Message-ID: <19980524055757.AAC22535@ppp108.cartsys.com>

At 01:15  5/23/1998 -0600, Blaine Hodge wrote:
>Just an observation, but doesn't -fomit-frame-pointer cause the compiler
>to use ebp at it's discretion?  The only side effect is you can't use
>the GBU debugger and profiler.  So, -fomit-frame-pointer should allow
>you to work with ebp, but I can't be sure of that.

The docs say this:

`-fomit-frame-pointer'
     Don't keep the frame pointer in a register for functions that
     don't need one.

That implies that some functions may need ebp as a frame pointer even with
`-fomit-frame-pointer'. Whether or not that can actually happen on i386 in
the current version, I don't know.

But even if ebp is not being used as a frame pointer, the compiler still
expects it to be unchanged by function calls. So you still must save and
restore it if you want to use it.

Nate Eldredge
nate AT cartsys DOT com



- Raw text -


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