OSDN Git Service

* except.c (expand_ex_region_start_for_decl): Emit EH_REGION_BEG
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 2 Nov 1997 04:43:34 +0000 (04:43 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 2 Nov 1997 04:43:34 +0000 (04:43 +0000)
        notes for sjlj exceptions too.
        (expand_eh_region_end): Similarly for EH_REGION_END notes.
        (exception_optimize): Optimize EH regions for sjlj exceptions too.
        * final.c (final_scan_insn): Don't output labels for EH REGION
        notes if doing sjlj exceptions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16266 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/except.c
gcc/final.c

index 566eeeb..365826b 100644 (file)
@@ -1,3 +1,12 @@
+Sat Nov  1 21:43:00 1997  Mike Stump  (mrs@wrs.com)
+
+       * except.c (expand_ex_region_start_for_decl): Emit EH_REGION_BEG
+       notes for sjlj exceptions too.
+       (expand_eh_region_end): Similarly for EH_REGION_END notes.
+       (exception_optimize): Optimize EH regions for sjlj exceptions too.
+       * final.c (final_scan_insn): Don't output labels for EH REGION
+       notes if doing sjlj exceptions.
+
 Sat Nov  1 19:15:28 1997  Jeffrey A Law  (law@cygnus.com)
 
        * flow.c (find_basic_blocks): If we delete the label for an
index 2a2554b..b506096 100644 (file)
@@ -1032,12 +1032,10 @@ expand_eh_region_start_for_decl (decl)
       expand_dhc_cleanup (decl);
     }
 
-  if (exceptions_via_longjmp == 0)
-    note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG);
   push_eh_entry (&ehstack);
-  if (exceptions_via_longjmp == 0)
-    NOTE_BLOCK_NUMBER (note)
-      = CODE_LABEL_NUMBER (ehstack.top->entry->exception_handler_label);
+  note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG);
+  NOTE_BLOCK_NUMBER (note)
+    = CODE_LABEL_NUMBER (ehstack.top->entry->exception_handler_label);
   if (exceptions_via_longjmp)
     start_dynamic_handler ();
 }
@@ -1066,17 +1064,19 @@ expand_eh_region_end (handler)
      tree handler;
 {
   struct eh_entry *entry;
+  rtx note;
 
   if (! doing_eh (0))
     return;
 
   entry = pop_eh_entry (&ehstack);
 
+  note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_END);
+  NOTE_BLOCK_NUMBER (note)
+    = CODE_LABEL_NUMBER (entry->exception_handler_label);
   if (exceptions_via_longjmp == 0)
     {
       rtx label;
-      rtx note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_END);
-      NOTE_BLOCK_NUMBER (note) = CODE_LABEL_NUMBER (entry->exception_handler_label);
 
       label = gen_label_rtx ();
       emit_jump (label);
@@ -2136,10 +2136,6 @@ exception_optimize ()
   rtx insn, regions = NULL_RTX;
   int n;
 
-  /* The below doesn't apply to setjmp/longjmp EH.  */
-  if (exceptions_via_longjmp)
-    return;
-
   /* Remove empty regions.  */
   for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
     {
index 624e211..d9a410b 100644 (file)
@@ -1379,7 +1379,8 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
       if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_END)
        break;
 
-      if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG)
+      if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG
+         && ! exceptions_via_longjmp)
        {
          ASM_OUTPUT_INTERNAL_LABEL (file, "LEHB", NOTE_BLOCK_NUMBER (insn));
          add_eh_table_entry (NOTE_BLOCK_NUMBER (insn));
@@ -1389,7 +1390,8 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
          break;
        }
 
-      if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)
+      if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END
+         && ! exceptions_via_longjmp)
        {
          ASM_OUTPUT_INTERNAL_LABEL (file, "LEHE", NOTE_BLOCK_NUMBER (insn));
 #ifdef ASM_OUTPUT_EH_REGION_END