Commit 5154e79a by Andrew Haley Committed by Andrew Haley

optabs.c (emit_libcall_block): When using non-call exceptions, don't mark libcalls never throwing.

2001-06-14  Andrew Haley  <aph@cambridge.redhat.com>

        * optabs.c (emit_libcall_block): When using non-call exceptions,
        don't mark libcalls never throwing.

From-SVN: r43504
parent 8b8d3a34
2001-06-14 Andrew Haley <aph@cambridge.redhat.com>
* optabs.c (emit_libcall_block): When using non-call exceptions,
don't mark libcalls never throwing.
2001-06-21 Stan Shebs <shebs@apple.com> 2001-06-21 Stan Shebs <shebs@apple.com>
* objc/objc-act.c (hash_init): Use xcalloc. * objc/objc-act.c (hash_init): Use xcalloc.
......
...@@ -2820,23 +2820,36 @@ emit_libcall_block (insns, target, result, equiv) ...@@ -2820,23 +2820,36 @@ emit_libcall_block (insns, target, result, equiv)
into a MEM later. Protect the libcall block from this change. */ into a MEM later. Protect the libcall block from this change. */
if (! REG_P (target) || REG_USERVAR_P (target)) if (! REG_P (target) || REG_USERVAR_P (target))
target = gen_reg_rtx (GET_MODE (target)); target = gen_reg_rtx (GET_MODE (target));
/* If we're using non-call exceptions, a libcall corresponding to an
operation that may trap may also trap. */
if (flag_non_call_exceptions && may_trap_p (equiv))
{
for (insn = insns; insn; insn = NEXT_INSN (insn))
if (GET_CODE (insn) == CALL_INSN)
{
rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
if (note != 0 && INTVAL (XEXP (note, 0)) <= 0)
remove_note (insn, note);
}
}
else
/* look for any CALL_INSNs in this sequence, and attach a REG_EH_REGION /* look for any CALL_INSNs in this sequence, and attach a REG_EH_REGION
reg note to indicate that this call cannot throw or execute a nonlocal reg note to indicate that this call cannot throw or execute a nonlocal
goto (unless there is already a REG_EH_REGION note, in which case goto (unless there is already a REG_EH_REGION note, in which case
we update it). */ we update it). */
for (insn = insns; insn; insn = NEXT_INSN (insn))
for (insn = insns; insn; insn = NEXT_INSN (insn)) if (GET_CODE (insn) == CALL_INSN)
if (GET_CODE (insn) == CALL_INSN) {
{ rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
if (note != 0)
if (note != 0) XEXP (note, 0) = GEN_INT (-1);
XEXP (note, 0) = GEN_INT (-1); else
else REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, GEN_INT (-1),
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, GEN_INT (-1), REG_NOTES (insn));
REG_NOTES (insn)); }
}
/* First emit all insns that set pseudos. Remove them from the list as /* First emit all insns that set pseudos. Remove them from the list as
we go. Avoid insns that set pseudos which were referenced in previous we go. Avoid insns that set pseudos which were referenced in previous
......
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