+Tue Sep 14 16:47:08 1999 Mark Mitchell <mark@codesourcery.com>
+
+ * except.c (expand_eh_region_start_for_decl): Use NOTE_EH_HANDLER,
+ not NOTE_BLOCK_NUMBER.
+ (expand_eh_region_end): Likewise.
+ (find_exception_handler_labels): Likewise.
+ (scan_region): Likewise.
+ (exception_optimize): Likewise.
+ (update_rethrow_references): Likewise.
+ (set_insn_eh_region): Likewise.
+ * final.c (final_scan_insn): Likewise.
+ * flow.c (make_edges): Likewise.
+ * integrate.c (expand_inline_function): Likewise.
+ * print-rtl.c (print_rtx): Likewise.
+
Tue Sep 14 16:30:16 1999 Richard Henderson <rth@cygnus.com>
* ginclude/stdarg.h, ginclude/varargs.h: Implement in
push_eh_entry (&ehstack);
note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG);
- NOTE_BLOCK_NUMBER (note)
+ NOTE_EH_HANDLER (note)
= CODE_LABEL_NUMBER (ehstack.top->entry->exception_handler_label);
if (exceptions_via_longjmp)
start_dynamic_handler ();
entry = pop_eh_entry (&ehstack);
note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_END);
- ret = NOTE_BLOCK_NUMBER (note)
+ ret = NOTE_EH_HANDLER (note)
= CODE_LABEL_NUMBER (entry->exception_handler_label);
if (exceptions_via_longjmp == 0 && ! flag_new_exceptions
/* We share outer_context between regions; only emit it once. */
entry->finalization = handler;
/* create region entry in final exception table */
- r = new_eh_region_entry (NOTE_BLOCK_NUMBER (note), entry->rethrow_label);
+ r = new_eh_region_entry (NOTE_EH_HANDLER (note), entry->rethrow_label);
enqueue_eh_entry (&ehqueue, entry);
Called from final_scan_insn when a NOTE_INSN_EH_REGION_BEG is seen.
(Or NOTE_INSN_EH_REGION_END sometimes)
- N is the NOTE_BLOCK_NUMBER of the note, which comes from the code
+ N is the NOTE_EH_HANDLER of the note, which comes from the code
label number of the exception handler for the region. */
void
if (GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG)
{
- ptr = get_first_handler (NOTE_BLOCK_NUMBER (insn));
+ ptr = get_first_handler (NOTE_EH_HANDLER (insn));
for ( ; ptr; ptr = ptr->next)
{
/* make sure label isn't in the list already */
if (insn == NULL_RTX
|| GET_CODE (insn) != NOTE
|| NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_BEG
- || NOTE_BLOCK_NUMBER (insn) != n
+ || NOTE_EH_HANDLER (insn) != n
|| delete_outer == NULL)
abort ();
if (GET_CODE (insn) == NOTE
&& NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG)
{
- insn = scan_region (insn, NOTE_BLOCK_NUMBER (insn), &delete);
+ insn = scan_region (insn, NOTE_EH_HANDLER (insn), &delete);
}
insn = NEXT_INSN (insn);
}
/* The _BEG/_END NOTEs must match and nest. */
- if (NOTE_BLOCK_NUMBER (insn) != n)
+ if (NOTE_EH_HANDLER (insn) != n)
abort ();
/* If anything in this exception region can throw, we can throw. */
inbetween. We are also guaranteed that the value of insn
returned will be valid, as otherwise scan_region won't
return. */
- insn = scan_region (insn, NOTE_BLOCK_NUMBER (insn), &n);
+ insn = scan_region (insn, NOTE_EH_HANDLER (insn), &n);
}
}
}
{
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG)
{
- region = find_func_region (NOTE_BLOCK_NUMBER (insn));
+ region = find_func_region (NOTE_EH_HANDLER (insn));
saw_region[region] = 1;
}
}
for (insn = *first; insn; insn = NEXT_INSN (insn))
{
- if ((GET_CODE (insn) == NOTE) &&
- (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG))
+ if ((GET_CODE (insn) == NOTE)
+ && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG))
{
- rnum = NOTE_BLOCK_NUMBER (insn);
+ rnum = NOTE_EH_HANDLER (insn);
insn_eh_region[INSN_UID (insn)] = rnum;
insn = NEXT_INSN (insn);
set_insn_eh_region (&insn, rnum);
{
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG)
{
- int block = NOTE_BLOCK_NUMBER (insn);
+ int block = NOTE_EH_HANDLER (insn);
region_count++;
info->region_index[block] = region_count;
if (eh_note)
nested_eh_region [block] =
- NOTE_BLOCK_NUMBER (XEXP (eh_note, 0));
+ NOTE_EH_HANDLER (XEXP (eh_note, 0));
else
nested_eh_region [block] = 0;
eh_note = gen_rtx_EXPR_LIST (VOIDmode, insn, eh_note);
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG
&& ! exceptions_via_longjmp)
{
- ASM_OUTPUT_INTERNAL_LABEL (file, "LEHB", NOTE_BLOCK_NUMBER (insn));
+ ASM_OUTPUT_INTERNAL_LABEL (file, "LEHB", NOTE_EH_HANDLER (insn));
if (! flag_new_exceptions)
- add_eh_table_entry (NOTE_BLOCK_NUMBER (insn));
+ add_eh_table_entry (NOTE_EH_HANDLER (insn));
#ifdef ASM_OUTPUT_EH_REGION_BEG
- ASM_OUTPUT_EH_REGION_BEG (file, NOTE_BLOCK_NUMBER (insn));
+ ASM_OUTPUT_EH_REGION_BEG (file, NOTE_EH_HANDLER (insn));
#endif
break;
}
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END
&& ! exceptions_via_longjmp)
{
- ASM_OUTPUT_INTERNAL_LABEL (file, "LEHE", NOTE_BLOCK_NUMBER (insn));
+ ASM_OUTPUT_INTERNAL_LABEL (file, "LEHE", NOTE_EH_HANDLER (insn));
if (flag_new_exceptions)
- add_eh_table_entry (NOTE_BLOCK_NUMBER (insn));
+ add_eh_table_entry (NOTE_EH_HANDLER (insn));
#ifdef ASM_OUTPUT_EH_REGION_END
- ASM_OUTPUT_EH_REGION_END (file, NOTE_BLOCK_NUMBER (insn));
+ ASM_OUTPUT_EH_REGION_END (file, NOTE_EH_HANDLER (insn));
#endif
break;
}
|| NOTE_LINE_NUMBER (copy) == NOTE_INSN_EH_REGION_END))
{
rtx label
- = get_label_from_map (map, NOTE_BLOCK_NUMBER (copy));
+ = get_label_from_map (map, NOTE_EH_HANDLER (copy));
/* we have to duplicate the handlers for the original */
if (NOTE_LINE_NUMBER (copy) == NOTE_INSN_EH_REGION_BEG)
/* We need to duplicate the handlers for the EH region
and we need to indicate where the label map is */
eif_eh_map = map;
- duplicate_eh_handlers (NOTE_BLOCK_NUMBER (copy),
+ duplicate_eh_handlers (NOTE_EH_HANDLER (copy),
CODE_LABEL_NUMBER (label),
expand_inline_function_eh_labelmap);
}
/* We have to forward these both to match the new exception
region. */
- NOTE_BLOCK_NUMBER (copy) = CODE_LABEL_NUMBER (label);
+ NOTE_EH_HANDLER (copy) = CODE_LABEL_NUMBER (label);
}
}
else