Mail Archives: djgpp/1999/03/31/00:49:43
Shawn Hargreaves wrote:
>
> Andrew Davidson writes:
> > Incidentally, as it's compiled with omit-frame-pointer can I use
> > %ebp within my code without risking crashing anything?
>
> Yes. But if you use %ebp, that will probably return you to the problem
> of the optimiser not linking the inline asm fragment :-)
>
> Also be aware that disabling the frame pointer makes it harder to
> debug your program, and prevents things like symify from working
> properly.
Also, beware; it seems that %ebp in a clobber list doesn't work right.
I'd be somewhat hesitant to use it in inline asm, because you also have
to ensure that the compiler doesn't generate any of the input or output
operands as ebp-relative addresses. And note that -fomit-frame-pointer
is semantically a suggestion, not a requirement.
IMHO, if you want to use %ebp, I'd suggest writing the entire function
in assembly.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -