Mail Archives: djgpp/1998/05/24/02:04:11
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 -