Commit 07ebc930 by Richard Henderson Committed by Richard Henderson

rtl.h (enum reg_note): Add REG_FRAME_RELATED_EXPR.

        * 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.

From-SVN: r22273
parent 6c30752f
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.
......
......@@ -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 ();
}
......
......@@ -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 *));
......
......@@ -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. */
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment