On 7 Nov 2011, at 09:53, Olivier Hainque wrote:

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'd welcome this too - I was considering partitioning out the save_world () stuff - since it's only used by Darwin AFAICT.

Iain

 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





Reply via email to