This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [testcase] asm clobbering %ebp with -fomit-frame-pointer


On Mon, Oct 29, 2001 at 11:40:05AM +0100, Jakub Jelinek wrote:
> Is this a valid test or not?
> Documentation sais for -fomit-frame-pointer:
>      Don't keep the frame pointer in a register for functions that
>      don't need one.  This avoids the instructions to save, set up and
>      restore frame pointers; it also makes an extra register available
>      in many functions.
> so I'm not sure if clobbering of %ebp is valid at all.

I think it ought to be valid.

Fixing this is hard.  There are assumptions in the compiler that
treat frame_pointer_rtx and hard_frame_pointer_rtx similarly, even
before reload.  You also cannot declare a register local variable
as %ebp.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]