delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/31/00:49:43

Sender: nate AT cartsys DOT com
Message-ID: <3701B38C.DD8C7C02@cartsys.com>
Date: Tue, 30 Mar 1999 21:33:00 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Fixed or forbidden register spilled error
References: <8D53104ECD0CD211AF4000A0C9D60AE3E3561C AT probe-2 DOT acclaim-euro DOT net>
Reply-To: djgpp AT delorie DOT com

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 -


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