summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/except.c18
-rw-r--r--gcc/final.c6
3 files changed, 20 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 566eeebc6fc..365826b24ea 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/except.c b/gcc/except.c
index 2a2554bc15b..b506096f658 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -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))
{
diff --git a/gcc/final.c b/gcc/final.c
index 624e2113f19..d9a410b2b09 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -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
OpenPOWER on IntegriCloud