rtl.h (LCT_THROW): New.
authorRichard Henderson <rth@redhat.com>
Wed, 4 Apr 2001 00:48:51 +0000 (17:48 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 4 Apr 2001 00:48:51 +0000 (17:48 -0700)
        * 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

gcc/ChangeLog
gcc/calls.c
gcc/except.c
gcc/rtl.h

index b508f5f48c0ee6712d32a94499618699e37ab6a6..a5a4673a78aec277425157ae6b187200410b6a2d 100644 (file)
@@ -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.
index 694eeeee4e603408beb21d40a3288720fc5069fc..eb54aee2d8ae83dcba3ea3ae18b8effa23201edc 100644 (file)
@@ -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
index ec13ed044378b99ac57036ce8b65af3f79191dfd..5404f4989e797dd8015bcd2d318f12bf73fbb55a 100644 (file)
@@ -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 ();
index e4f2ab037141a1e894009e29fa7f87e4b7e62107..667a304aec3b0e9ef6aa9c6f0bf8c74fed8e4824 100644 (file)
--- 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,