This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testcase] asm clobbering %ebp with -fomit-frame-pointer
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 4 Dec 2001 18:13:55 -0800
- Subject: Re: [testcase] asm clobbering %ebp with -fomit-frame-pointer
- References: <20011029114005.A22496@sunsite.ms.mff.cuni.cz>
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~