rtl.h (enum reg_note): Add REG_FRAME_RELATED_EXPR.
authorRichard Henderson <rth@cygnus.com>
Sat, 5 Sep 1998 21:57:56 +0000 (14:57 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 5 Sep 1998 21:57:56 +0000 (14:57 -0700)
        * 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

gcc/ChangeLog
gcc/dwarf2out.c
gcc/rtl.c
gcc/rtl.h
gcc/rtl.texi

index 8b65a185f6049f2fea2048e9f0b7aa9db795b530..dd5d66499ddba44af7dbf418c1507c0138fcd997 100644 (file)
@@ -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.
index 6af786cbf2bc3ababbedf574a5e45a299ef0f6e8..e3acb98d530b5d7ea3eeb0c38f8d5d2e6893aacb 100644 (file)
@@ -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 ();
        }
index 396566d36a7933d969e1a25a65f787aed71ed77c..26ffc9a2a10da3cd05b23db18d1a3e7836d914a3 100644 (file)
--- 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 *));
index c26b76eb1efbf5030fda63a6e4e7ac4757025f35..6f4e73dcb38872e0895b168d51cb6d541440848b 100644 (file)
--- 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.  */
 
index b90393e7065c5b4728c8197ab47ad0bc1f14bf22..9b69eaebabacc60e874819c8c08ef245f501d88d 100644 (file)
@@ -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