Commit 28326880 by Olivier Hainque Committed by Olivier Hainque

pa.c (output_call): Don't optimize post call jumps into return address adjustments if...

	* config/pa/pa.c (output_call): Don't optimize post call jumps
	into return address adjustments if the call may throw.

	testsuite/
	* gnat.dg/raise_ce.adb: Helper for ...
	* gnat.dg/handle_and_return.adb: New test.

From-SVN: r148780
parent 59366db6
2009-06-22 Olivier Hainque <hainque@adacore.com>
* config/pa/pa.c (output_call): Don't optimize post call jumps
into return address adjustments if the call may throw.
2009-06-21 Richard Earnshaw <rearnsha@arm.com>
* arm.c (thumb1_output_casesi): New function.
......
......@@ -7701,12 +7701,15 @@ output_call (rtx insn, rtx call_dest, int sibcall)
if (!delay_slot_filled && INSN_ADDRESSES_SET_P ())
{
/* See if the return address can be adjusted. Use the containing
sequence insn's address. */
sequence insn's address. This would break the regular call/return@
relationship assumed by the table based eh unwinder, so only do that
if the call is not possibly throwing. */
rtx seq_insn = NEXT_INSN (PREV_INSN (XVECEXP (final_sequence, 0, 0)));
int distance = (INSN_ADDRESSES (INSN_UID (JUMP_LABEL (NEXT_INSN (insn))))
- INSN_ADDRESSES (INSN_UID (seq_insn)) - 8);
if (VAL_14_BITS_P (distance))
if (VAL_14_BITS_P (distance)
&& !(can_throw_internal (insn) || can_throw_external (insn)))
{
xoperands[1] = gen_label_rtx ();
output_asm_insn ("ldo %0-%1(%%r2),%%r2", xoperands);
......
2009-06-22 Olivier Hainque <hainque@adacore.com>
* gnat.dg/raise_ce.adb: Helper for ...
* gnat.dg/handle_and_return.adb: New test.
2009-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40443
......
-- { dg-do run }
-- { dg-options "-gnatp -O2" }
with Raise_Ce;
procedure Handle_And_Return is
begin
begin
Raise_CE;
return;
exception
when others => null;
end;
begin
Raise_CE;
return;
exception
when others => null;
end;
end;
procedure Raise_CE is
begin
raise Constraint_Error;
end;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment