aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-04-03 17:48:51 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-04-03 17:48:51 -0700
commit9555a12236d3bde31b58039b86e817b48f1024bd (patch)
treea27e63fae9c2f86fa257d09e1bbbabb90556730c
parentd02af173409f89ccce70f4f5f381fb7dad5315f8 (diff)
downloadgcc-9555a12236d3bde31b58039b86e817b48f1024bd.zip
gcc-9555a12236d3bde31b58039b86e817b48f1024bd.tar.gz
gcc-9555a12236d3bde31b58039b86e817b48f1024bd.tar.bz2
rtl.h (LCT_THROW): New.
* rtl.h (LCT_THROW): New. * calls.c (emit_library_call_value_1): Handle it. * except.c (connect_post_landing_pads): Use it. From-SVN: r41070
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/calls.c28
-rw-r--r--gcc/except.c2
-rw-r--r--gcc/rtl.h3
4 files changed, 30 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b508f5f..a5a4673 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2001-04-03 Richard Henderson <rth@redhat.com>
+
+ * rtl.h (LCT_THROW): New.
+ * calls.c (emit_library_call_value_1): Handle it.
+ * except.c (connect_post_landing_pads): Use it.
+
2001-04-03 Zack Weinberg <zackw@stanford.edu>
* gansidecl.h: Delete file.
diff --git a/gcc/calls.c b/gcc/calls.c
index 694eeee..eb54aee 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -3521,15 +3521,29 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
#endif
#endif
- /* No library functions can throw. */
+ /* By default, library functions can not throw. */
flags = ECF_NOTHROW;
- if (fn_type == LCT_CONST_MAKE_BLOCK)
- flags |= ECF_CONST;
- else if (fn_type == LCT_PURE_MAKE_BLOCK)
- flags |= ECF_PURE;
- else if (fn_type == LCT_NORETURN)
- flags |= ECF_NORETURN;
+ switch (fn_type)
+ {
+ case LCT_NORMAL:
+ case LCT_CONST:
+ case LCT_PURE:
+ /* Nothing to do here. */
+ break;
+ case LCT_CONST_MAKE_BLOCK:
+ flags |= ECF_CONST;
+ break;
+ case LCT_PURE_MAKE_BLOCK:
+ flags |= ECF_PURE;
+ break;
+ case LCT_NORETURN:
+ flags |= ECF_NORETURN;
+ break;
+ case LCT_THROW:
+ flags = ECF_NORETURN;
+ break;
+ }
fun = orgfun;
#ifdef PREFERRED_STACK_BOUNDARY
diff --git a/gcc/except.c b/gcc/except.c
index ec13ed0..5404f49 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1818,7 +1818,7 @@ connect_post_landing_pads ()
if (outer)
emit_jump (outer->post_landing_pad);
else
- emit_library_call (unwind_resume_libfunc, LCT_NORETURN,
+ emit_library_call (unwind_resume_libfunc, LCT_THROW,
VOIDmode, 1, cfun->eh->exc_ptr, Pmode);
seq = get_insns ();
diff --git a/gcc/rtl.h b/gcc/rtl.h
index e4f2ab0..667a304 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1982,7 +1982,8 @@ enum libcall_type
LCT_PURE = 2,
LCT_CONST_MAKE_BLOCK = 3,
LCT_PURE_MAKE_BLOCK = 4,
- LCT_NORETURN = 5
+ LCT_NORETURN = 5,
+ LCT_THROW = 6
};
extern void emit_library_call PARAMS ((rtx, enum libcall_type,