This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [rs6000] Fix PR 50906, eh_frame and other woes
- From: Olivier Hainque <hainque at adacore dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: Olivier Hainque <hainque at adacore dot com>, gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Mon, 7 Nov 2011 10:53:51 +0100
- Subject: Re: [rs6000] Fix PR 50906, eh_frame and other woes
- References: <20111104130716.GB22298@bubble.grove.modra.org>
On Nov 4, 2011, at 2:07 PM, Alan Modra wrote:
> Lots of bugs here. Most of them in TARGET_SPE_ABI code, but some also
> for other ABIs.
...
Another bug we're running into here is an unwarranted move of the sp
restore prior to register fetches despite an attempt at preventing that
with a stack_tie instruction (VxWorks target).
http://gcc.gnu.org/ml/gcc/2011-03/msg00123.html
The failure can still be exposed on mainline with a minor adjustment
to the C testcase quoted in the msg.
I have been looking into this issue again recently and I'm convinced
that the the current stack_tie insn just is not quite adequate.
I have a local patch which fixes the case at hand but I'm
still unclear about a couple of aspects.
There are lots of subtle inter-section dependencies and redundancies
in emit_epilogue, which has grown pretty difficult to understand IMHO.
I can see two tracks to improve things in this area:
- Concentrate on the sp-move problem at hand and get to an agreement
on the proper correction for it. I'll be happy to send my current
patch with comments and questions for that.
- Start working on reducing emit_epilogue's complexity, e.g. by first
extracting portions of it out into separate functions, then see what
concepts we can identify and materialize to simplify the sequence
organization as a whole.
I did an extraction attempt as an exercise to better understand the
various sections and dependencies. It did help me and I'd be happy
to provide patches gather feedback etc if you believe it might be
useful to others.
Olivier