aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Haley <aph@cambridge.redhat.com>2001-06-22 16:42:33 +0000
committerAndrew Haley <aph@gcc.gnu.org>2001-06-22 16:42:33 +0000
commit5154e79ae48dfc2706c2268654f9304bc0c85367 (patch)
treeedd5601d31cd10bb0532bedfe5976ad18a4799bb /gcc
parent8b8d3a3451f12827490a78130012f5f3bf28f23c (diff)
downloadgcc-5154e79ae48dfc2706c2268654f9304bc0c85367.zip
gcc-5154e79ae48dfc2706c2268654f9304bc0c85367.tar.gz
gcc-5154e79ae48dfc2706c2268654f9304bc0c85367.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/optabs.c39
2 files changed, 31 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 57da611..573da05 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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>
* objc/objc-act.c (hash_init): Use xcalloc.
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 0e135af..a3e2682 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -2820,23 +2820,36 @@ emit_libcall_block (insns, target, result, equiv)
into a MEM later. Protect the libcall block from this change. */
if (! REG_P (target) || REG_USERVAR_P (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
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
we update it). */
-
- 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)
- XEXP (note, 0) = GEN_INT (-1);
- else
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, GEN_INT (-1),
- REG_NOTES (insn));
- }
+ 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)
+ XEXP (note, 0) = GEN_INT (-1);
+ else
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, GEN_INT (-1),
+ REG_NOTES (insn));
+ }
/* 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