This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
problem with STACK_BOUNDARY=64 patch
- To: egcs at cygnus dot com
- Subject: problem with STACK_BOUNDARY=64 patch
- From: Marc Lehmann <pcg at goof dot com>
- Date: Mon, 15 Dec 1997 04:25:34 +0100
- Reply-To: egcs at cygnus dot com
as you might know, pgcc now has STACK_BOUNDARY set to 64 for a long time now
(and the same is dicsussed for egcs, too).
Now I stumbled over a problem.. when STACK_BOUNDARY==64, egcs assumes (e.g.
in combine.c:nonzero_bits) that the FRAME_POINTER
_also_ is aligned to that boundary, which, on the x86, is wrong.
Interestingly, a comment in nonzero_bits says it's not safe to assume
STACK_BOUNDARY alignment for the argument pointer, so why does it assume
this is true for the frame pointer?
My question therefore: how do I tell egcs about the frame pointer alignment?
Currently, I solved this problem by adding another macro in i386.h, namely
FRAME_POINTER_ALIGNMENT (same semantics as STACK_BOUNDARY), and having
nonzero_bits check this.
I think that would be a clean solution (anybody got a better idea?), and this
could be extended to ARG_POINTER_ALIGNMENT, too, so that egcs can
use this extra information.
PS: the problem I had was combine changing (plus (reg) (4)) into
(ior (reg) (4)) whenever reg contained an address.
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg@goof.com |e|
-=====/_/_//_/\_,_/ /_/\_\ --+
The choice of a GNU generation |
|