[rs6000] Fix PR 50906, eh_frame and other woes
Alan Modra
amodra@gmail.com
Tue Nov 8 00:25:00 GMT 2011
On Mon, Nov 07, 2011 at 04:10:38PM +0000, Joseph S. Myers wrote:
> FWIW, when I encountered such a problem in 4.4-based tools I found I
> needed the following change to stack_tie patterns to fix it (applied to
> and rediffed against trunk, but not tested there), in addition to a
> DEFAULT_ABI == ABI_V4 check such as you added. Given all the confusion
> about this class of bugs and whether they should be addressed in each back
> end or in a target-independent way, I didn't try to send this upstream at
> the time.
>
> 2011-04-11 Joseph Myers <joseph@codesourcery.com>
>
> * config/rs6000/rs6000.md (stack_tie): Use (mem:BLK (scratch)) as
> output of SET.
> (restore_stack_block, restore_stack_nonlocal): Update UNSPEC_TIE
> patterns.
OK, so you made the stack ties conflict with all memory. I wondered
about that too, but didn't find a testcase where it mattered. It
would certainly be safer to use the big hammer, but on the other hand
it can restrict scheduling unnecessarily. For example
void byref (int *a)
{
int x;
asm ("#%0 set here" : "=r" (x) : : "r29", "r30");
*a = x;
}
with the existing stack ties, the write to *a happens after stack
deallocation.
--
Alan Modra
Australia Development Lab, IBM
More information about the Gcc-patches
mailing list