This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] mudflap: remove usage of builtin_frame_address
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>
- Cc: Andreas Krebbel1 <KREBBEL1 at de dot ibm dot com>, rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Jan 2005 21:32:39 -0500
- Subject: Re: [PATCH] mudflap: remove usage of builtin_frame_address
- References: <OF7BAF95D6.1B4AF2F8-ONC1256F88.000C3F66-41256F88.000CFBB1@de.ibm.com>
On Jan 12, 2005, at 9:22 PM, Ulrich Weigand wrote:
Richard Henderson wrote:
On Wed, Jan 12, 2005 at 02:25:42PM +0100, Andreas Krebbel wrote:
The problem with builtin_frame_address is that is does not work when
-fomit-frame-pointer is set which it is per default on s390.
Then the s390 port is broken. For a constant value of 0, this
should ALWAYS work.
So what is the back end supposed to do about it?
__builtin_frame_address (0) gets expanded to hard_frame_pointer_rtx
by the middle end, without any callback that would allow the back
end to intervene.
When -fomit-frame-pointer is true, and the function doesn't otherwise
require a frame pointer, the hard register hard_frame_pointer_rtx is
not set up as frame pointer, and basically contains a random value ...
But in reload/greg, it gets replaced with the stack based frame pointer.
At least it does on rs6000 and most likely every other target.