aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/rtl.c4
-rw-r--r--gcc/rtl.h19
2 files changed, 16 insertions, 7 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c
index 9a25158..d5eea12 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -170,13 +170,13 @@ char rtx_class[] = {
/* Names for kinds of NOTEs and REG_NOTEs. */
-char *note_insn_name[] = { "NOTE_INSN_FUNCTION_BEG", "NOTE_INSN_DELETED",
+char *note_insn_name[] = { 0 , "NOTE_INSN_DELETED",
"NOTE_INSN_BLOCK_BEG", "NOTE_INSN_BLOCK_END",
"NOTE_INSN_LOOP_BEG", "NOTE_INSN_LOOP_END",
"NOTE_INSN_FUNCTION_END", "NOTE_INSN_SETJMP",
"NOTE_INSN_LOOP_CONT", "NOTE_INSN_LOOP_VTOP",
"NOTE_INSN_PROLOGUE_END", "NOTE_INSN_EPILOGUE_BEG",
- "NOTE_INSN_DELETED_LABEL"};
+ "NOTE_INSN_DELETED_LABEL", "NOTE_INSN_FUNCTION_BEG"};
char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
"REG_EQUAL", "REG_RETVAL", "REG_LIBCALL",
diff --git a/gcc/rtl.h b/gcc/rtl.h
index f223cf6..fbebd17 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -353,11 +353,17 @@ extern char *reg_note_name[];
#define NOTE_LINE_NUMBER(INSN) ((INSN)->fld[4].rtint)
/* Codes that appear in the NOTE_LINE_NUMBER field
- for kinds of notes that are not line numbers. */
+ for kinds of notes that are not line numbers.
-/* This note indicates the end of the real body of the function,
- after moving the parms into their homes, etc. */
-#define NOTE_INSN_FUNCTION_BEG 0
+ Notice that we do not try to use zero here for any of
+ the special note codes because sometimes the source line
+ actually can be zero! This happens (for example) when we
+ are generating code for the per-translation-unit constructor
+ and destructor routines for some C++ translation unit.
+
+ If you should change any of the following values, or if you
+ should add a new value here, don't forget to change the
+ note_insn_name array in rtl.c. */
/* This note is used to get rid of an insn
when it isn't safe to patch the insn out of the chain. */
@@ -384,7 +390,10 @@ extern char *reg_note_name[];
#define NOTE_INSN_EPILOGUE_BEG -11
/* Generated in place of user-declared labels when they are deleted. */
#define NOTE_INSN_DELETED_LABEL -12
-/* Don't forget to change note_insn_name in rtl.c. */
+/* This note indicates the start of the real body of the function,
+ i.e. the point just after all of the parms have been moved into
+ their homes, etc. */
+#define NOTE_INSN_FUNCTION_BEG -13
#if 0 /* These are not used, and I don't know what they were for. --rms. */