re PR target/7042 (cris-elf miscompiles line_hints in ghostscript - "return" delay slot bug)
PR target/7042 * config/cris/cris.c (cris_simple_epilogue): Kludge around reorg.c bug by saing that the epilogue isn't simple if there's a non-empty current_function_epilogue_delay_list. * config/cris/cris.md ("return"): Add sanity check asserting that current_function_epilogue_delay_list is empty. From-SVN: r54721
This commit is contained in:
parent
e12a22a625
commit
fd4858461e
|
@ -1,3 +1,12 @@
|
|||
2002-06-17 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
PR target/7042
|
||||
* config/cris/cris.c (cris_simple_epilogue): Kludge around reorg.c
|
||||
bug by saing that the epilogue isn't simple if there's a
|
||||
non-empty current_function_epilogue_delay_list.
|
||||
* config/cris/cris.md ("return"): Add sanity check asserting that
|
||||
current_function_epilogue_delay_list is empty.
|
||||
|
||||
2002-06-17 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* config/i386/i386.h (BIGGEST_FIELD_ALIGNMENT): Define instead
|
||||
|
|
|
@ -2042,6 +2042,14 @@ cris_simple_epilogue ()
|
|||
|| current_function_outgoing_args_size
|
||||
|| current_function_calls_eh_return
|
||||
|
||||
/* Kludge for 3.1: when reorg changes branches to the return label
|
||||
into return insns, it does not handle the case where there's a
|
||||
delay list for the epilogue: it just drops the insns in
|
||||
current_function_epilogue_delay_list on the floor, resulting in
|
||||
invalid code. We kludge around it in that case by saying that
|
||||
we don't have a simple enough epilogue to use return insns. */
|
||||
|| current_function_epilogue_delay_list != NULL
|
||||
|
||||
/* If we're not supposed to emit prologue and epilogue, we must
|
||||
not emit return-type instructions. */
|
||||
|| !TARGET_PROLOGUE_EPILOGUE)
|
||||
|
|
|
@ -3394,6 +3394,11 @@
|
|||
/* Just needs to hold a 'movem [sp+],rN'. */
|
||||
char rd[sizeof (\"movem [$sp+],$r99\")];
|
||||
|
||||
/* Try to avoid reorg.c surprises; avoid emitting invalid code, prefer
|
||||
crashing. This test would have avoided invalid code for target/7042. */
|
||||
if (current_function_epilogue_delay_list != NULL)
|
||||
abort ();
|
||||
|
||||
*rd = 0;
|
||||
|
||||
/* Start from the last call-saved register. We know that we have a
|
||||
|
|
Loading…
Reference in New Issue