aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/dwarf2out.c14
-rw-r--r--gcc/rtl.c3
-rw-r--r--gcc/rtl.h12
-rw-r--r--gcc/rtl.texi6
5 files changed, 37 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8b65a18..dd5d664 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+Sat Sep 5 22:05:25 1998 Richard Henderson <rth@cygnus.com>
+
+ * rtl.h (enum reg_note): Add REG_FRAME_RELATED_EXPR.
+ * rtl.c (reg_note_name): Likewise.
+ * rtl.texi (REG_NOTES): Likewise.
+ * dwarf2out.c (dwarf2out_frame_debug): Use it. Recognize a store
+ without an offset.
+
Sat Sep 5 14:47:17 1998 Richard Henderson <rth@cygnus.com>
* i386.h (PREFERRED_RELOAD_CLASS): Standard fp constants load to TOS.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 6af786c..e3acb98 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -1223,7 +1223,12 @@ dwarf2out_frame_debug (insn)
label = dwarf2out_cfi_label ();
- insn = PATTERN (insn);
+ src = find_reg_note (insn, REG_FRAME_RELATED_EXPR, NULL_RTX);
+ if (src)
+ insn = XEXP (src, 0);
+ else
+ insn = PATTERN (insn);
+
/* Assume that in a PARALLEL prologue insn, only the first elt is
significant. Currently this is true. */
if (GET_CODE (insn) == PARALLEL)
@@ -1392,6 +1397,13 @@ dwarf2out_frame_debug (insn)
offset -= cfa_store_offset;
break;
+ /* Without an offset. */
+ case REG:
+ if (cfa_store_reg != REGNO (XEXP (dest, 0)))
+ abort();
+ offset = -cfa_store_offset;
+ break;
+
default:
abort ();
}
diff --git a/gcc/rtl.c b/gcc/rtl.c
index 396566d..26ffc9a 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -181,7 +181,8 @@ char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
"REG_CC_SETTER", "REG_CC_USER", "REG_LABEL",
"REG_DEP_ANTI", "REG_DEP_OUTPUT", "REG_BR_PROB",
"REG_EXEC_COUNT", "REG_NOALIAS", "REG_SAVE_AREA",
- "REG_BR_PRED", "REG_EH_CONTEXT" };
+ "REG_BR_PRED", "REG_EH_CONTEXT",
+ "REG_FRAME_RELATED_EXPR" };
static void dump_and_abort PROTO((int, int, FILE *));
static void read_name PROTO((char *, FILE *));
diff --git a/gcc/rtl.h b/gcc/rtl.h
index c26b76e..6f4e73d 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -338,8 +338,10 @@ typedef struct rtvec_def{
REG_SAVE_AREA is used to optimize rtl generated by dynamic stack
allocations for targets where SETJMP_VIA_SAVE_AREA is true.
REG_BR_PRED is attached to JUMP_INSNs only, it holds the branch prediction
- flags computed by get_jump_flags() after dbr scheduling is complete. */
-
+ flags computed by get_jump_flags() after dbr scheduling is complete.
+ REG_FRAME_RELATED_EXPR is attached to insns that are RTX_FRAME_RELATED_P,
+ but are too complex for DWARF to interpret what they imply. The attached
+ rtx is used instead of intuition. */
#define REG_NOTES(INSN) ((INSN)->fld[6].rtx)
@@ -352,7 +354,8 @@ enum reg_note { REG_DEAD = 1, REG_INC = 2, REG_EQUIV = 3, REG_WAS_0 = 4,
REG_CC_SETTER = 11, REG_CC_USER = 12, REG_LABEL = 13,
REG_DEP_ANTI = 14, REG_DEP_OUTPUT = 15, REG_BR_PROB = 16,
REG_EXEC_COUNT = 17, REG_NOALIAS = 18, REG_SAVE_AREA = 19,
- REG_BR_PRED = 20, REG_EH_CONTEXT = 21 };
+ REG_BR_PRED = 20, REG_EH_CONTEXT = 21,
+ REG_FRAME_RELATED_EXPR = 22 };
/* The base value for branch probability notes. */
#define REG_BR_PROB_BASE 10000
@@ -969,6 +972,7 @@ extern int rtx_addr_varies_p PROTO((rtx));
extern HOST_WIDE_INT get_integer_term PROTO((rtx));
extern rtx get_related_value PROTO((rtx));
extern int reg_mentioned_p PROTO((rtx, rtx));
+extern int reg_mentioned_between_p PROTO((rtx, rtx, rtx));
extern int reg_referenced_p PROTO((rtx, rtx));
extern int reg_used_between_p PROTO((rtx, rtx, rtx));
extern int reg_referenced_between_p PROTO((rtx, rtx, rtx));
@@ -1065,7 +1069,7 @@ extern rtx struct_value_rtx;
extern rtx struct_value_incoming_rtx;
extern rtx static_chain_rtx;
extern rtx static_chain_incoming_rtx;
-
+extern rtx return_address_pointer_rtx;
/* Include the RTL generation functions. */
diff --git a/gcc/rtl.texi b/gcc/rtl.texi
index b90393e..9b69eae 100644
--- a/gcc/rtl.texi
+++ b/gcc/rtl.texi
@@ -2691,6 +2691,12 @@ probability that the branch will be taken.
These notes are found in JUMP insns after delayed branch scheduling
has taken place. They indicate both the direction and the likelyhood
of the JUMP. The format is a bitmask of ATTR_FLAG_* values.
+
+@findex REG_FRAME_RELATED_EXPR
+@item REG_FRAME_RELATED_EXPR
+This is used on an RTX_FRAME_RELATED_P insn wherein the attached expression
+is used in place of the actual insn pattern. This is done in cases where
+the pattern is either complex or misleading.
@end table
For convenience, the machine mode in an @code{insn_list} or