This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
exception-section patch, part 5
- To: egcs-patches at cygnus dot com
- Subject: exception-section patch, part 5
- From: Bruno Haible <haible at ilog dot fr>
- Date: Wed, 1 Jul 1998 00:16:33 +0200 (MET DST)
This patch defines two types of notes used for delimiting the insns which
shall go into the separate sections. Using notes instead of a separate
insn list has two advantages:
- It doesn't interfere with function inlining and the other gcc passes.
- It is possible to "move" a block from the eh_text section to the text
section by simply disabling the two notes.
Sun Jun 28 19:49:33 1998 Bruno Haible <bruno@linuix.math.u-bordeaux.fr>
* rtl.h (NOTE_INSN_EH_HANDLER_{BEG,END}): Define.
* rtl.c (note_insn_name): Add NOTE_INSN_EH_HANDLER_{BEG,END}.
diff -c3p egcs-19980628/gcc/rtl.h.bak egcs-19980628/gcc/rtl.h
*** egcs-19980628/gcc/rtl.h.bak Sat Jun 27 17:51:48 1998
--- egcs-19980628/gcc/rtl.h Tue Jun 30 13:06:41 1998
*************** extern char *reg_note_name[];
*** 457,462 ****
--- 457,467 ----
/* Record which registers are currently live. */
#define NOTE_INSN_LIVE -19
+ /* These note where exception handlers begin and end. For some targets,
+ exception handling code is put into a separate section. */
+ #define NOTE_INSN_EH_HANDLER_BEG -20
+ #define NOTE_INSN_EH_HANDLER_END -21
+
#if 0 /* These are not used, and I don't know what they were for. --rms. */
#define NOTE_DECL_NAME(INSN) ((INSN)->fld[3].rtstr)
#define NOTE_DECL_CODE(INSN) ((INSN)->fld[4].rtint)
diff -c3p egcs-19980628/gcc/rtl.c.bak egcs-19980628/gcc/rtl.c
*** egcs-19980628/gcc/rtl.c.bak Wed May 13 23:13:42 1998
--- egcs-19980628/gcc/rtl.c Tue Jun 30 13:06:41 1998
*************** char *note_insn_name[] = { 0
*** 173,179 ****
"NOTE_INSN_DELETED_LABEL", "NOTE_INSN_FUNCTION_BEG",
"NOTE_INSN_EH_REGION_BEG", "NOTE_INSN_EH_REGION_END",
"NOTE_REPEATED_LINE_NUMBER", "NOTE_INSN_RANGE_START",
! "NOTE_INSN_RANGE_END", "NOTE_INSN_LIVE" };
char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
"REG_EQUAL", "REG_RETVAL", "REG_LIBCALL",
--- 173,181 ----
"NOTE_INSN_DELETED_LABEL", "NOTE_INSN_FUNCTION_BEG",
"NOTE_INSN_EH_REGION_BEG", "NOTE_INSN_EH_REGION_END",
"NOTE_REPEATED_LINE_NUMBER", "NOTE_INSN_RANGE_START",
! "NOTE_INSN_RANGE_END", "NOTE_INSN_LIVE",
! "NOTE_INSN_EH_HANDLER_BEG",
! "NOTE_INSN_EH_HANDLER_END" };
char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
"REG_EQUAL", "REG_RETVAL", "REG_LIBCALL",