OSDN Git Service

* rtl.h (gen_frame_mem, gen_tmp_stack_mem): Declare.
[pf3gnuchains/gcc-fork.git] / gcc / rtl.h
index 6c25944..1692033 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -16,8 +16,8 @@ for more details.
 
 You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.  */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA.  */
 
 #ifndef GCC_RTL_H
 #define GCC_RTL_H
@@ -25,6 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "statistics.h"
 #include "machmode.h"
 #include "input.h"
+#include "real.h"
 
 #undef FFS  /* Some systems predefine this symbol; don't let it interfere.  */
 #undef FLOAT /* Likewise.  */
@@ -249,6 +250,7 @@ struct rtx_def GTY((chain_next ("RTX_NEXT (&%h)"),
   union u {
     rtunion fld[1];
     HOST_WIDE_INT hwint[1];
+    struct real_value rv;
   } GTY ((special ("rtx_def"), desc ("GET_CODE (&%0)"))) u;
 };
 
@@ -454,6 +456,20 @@ struct rtvec_def GTY(()) {
                               __FUNCTION__);                           \
      &_rtx->u.hwint[N]; }))
 
+#define XCMWINT(RTX, N, C, M) __extension__                            \
+(*({ rtx const _rtx = (RTX);                                           \
+     if (GET_CODE (_rtx) != (C) || GET_MODE (_rtx) != (M))             \
+       rtl_check_failed_code_mode (_rtx, (C), (M), false, __FILE__,    \
+                                  __LINE__, __FUNCTION__);             \
+     &_rtx->u.hwint[N]; }))
+
+#define XCNMPRV(RTX, C, M) __extension__                               \
+({ rtx const _rtx = (RTX);                                             \
+   if (GET_CODE (_rtx) != (C) || GET_MODE (_rtx) == (M))               \
+     rtl_check_failed_code_mode (_rtx, (C), (M), true, __FILE__,       \
+                                __LINE__, __FUNCTION__);               \
+   &_rtx->u.rv; })
+
 extern void rtl_check_failed_bounds (rtx, int, const char *, int,
                                     const char *)
     ATTRIBUTE_NORETURN;
@@ -469,6 +485,9 @@ extern void rtl_check_failed_code1 (rtx, enum rtx_code, const char *,
 extern void rtl_check_failed_code2 (rtx, enum rtx_code, enum rtx_code,
                                    const char *, int, const char *)
     ATTRIBUTE_NORETURN;
+extern void rtl_check_failed_code_mode (rtx, enum rtx_code, enum machine_mode,
+                                       bool, const char *, int, const char *)
+    ATTRIBUTE_NORETURN;
 extern void rtvec_check_failed_bounds (rtvec, int, const char *, int,
                                       const char *)
     ATTRIBUTE_NORETURN;
@@ -482,6 +501,9 @@ extern void rtvec_check_failed_bounds (rtvec, int, const char *, int,
 #define RTVEC_ELT(RTVEC, I)        ((RTVEC)->elem[I])
 #define XWINT(RTX, N)              ((RTX)->u.hwint[N])
 #define XCWINT(RTX, N, C)          ((RTX)->u.hwint[N])
+#define XCMWINT(RTX, N, C, M)      ((RTX)->u.hwint[N])
+#define XCNMWINT(RTX, N, C, M)     ((RTX)->u.hwint[N])
+#define XCNMPRV(RTX, C, M)         (&(RTX)->u.rv)
 
 #endif
 
@@ -706,9 +728,6 @@ enum reg_note
   REG_NOTE_MAX
 };
 
-/* The base value for branch probability notes.  */
-#define REG_BR_PROB_BASE  10000
-
 /* Define macros to extract and insert the reg-note kind in an EXPR_LIST.  */
 #define REG_NOTE_KIND(LINK) ((enum reg_note) GET_MODE (LINK))
 #define PUT_REG_NOTE_KIND(LINK, KIND) \
@@ -761,7 +780,6 @@ extern const char * const reg_note_name[];
 #define NOTE_EH_HANDLER(INSN)  XCINT (INSN, 4, NOTE)
 #define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 4, NOTE)
 #define NOTE_EXPECTED_VALUE(INSN) XCEXP (INSN, 4, NOTE)
-#define NOTE_PREDICTION(INSN)   XCINT (INSN, 4, NOTE)
 #define NOTE_VAR_LOCATION(INSN)        XCEXP (INSN, 4, NOTE)
 
 /* In a NOTE that is a line number, this is the line number.
@@ -773,11 +791,6 @@ extern const char * const reg_note_name[];
   (GET_CODE (INSN) == NOTE                             \
    && NOTE_LINE_NUMBER (INSN) == NOTE_INSN_BASIC_BLOCK)
 
-/* Algorithm and flags for prediction.  */
-#define NOTE_PREDICTION_ALG(INSN)   (XCINT(INSN, 4, NOTE)>>8)
-#define NOTE_PREDICTION_FLAGS(INSN) (XCINT(INSN, 4, NOTE)&0xff)
-#define NOTE_PREDICT(ALG,FLAGS)     ((ALG<<8)+(FLAGS))
-
 /* Variable declaration and the location of a variable.  */
 #define NOTE_VAR_LOCATION_DECL(INSN)   (XCTREE (XCEXP (INSN, 4, NOTE), \
                                                 0, VAR_LOCATION))
@@ -921,13 +934,14 @@ enum label_kind
 #define INTVAL(RTX) XCWINT(RTX, 0, CONST_INT)
 
 /* For a CONST_DOUBLE:
-   For a DImode, there are two integers CONST_DOUBLE_LOW is the
+   For a VOIDmode, there are two integers CONST_DOUBLE_LOW is the
      low-order word and ..._HIGH the high-order.
    For a float, there is a REAL_VALUE_TYPE structure, and
      CONST_DOUBLE_REAL_VALUE(r) is a pointer to it.  */
-#define CONST_DOUBLE_LOW(r) XCWINT (r, 0, CONST_DOUBLE)
-#define CONST_DOUBLE_HIGH(r) XCWINT (r, 1, CONST_DOUBLE)
-#define CONST_DOUBLE_REAL_VALUE(r) ((struct real_value *)&CONST_DOUBLE_LOW(r))
+#define CONST_DOUBLE_LOW(r) XCMWINT (r, 0, CONST_DOUBLE, VOIDmode)
+#define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
+#define CONST_DOUBLE_REAL_VALUE(r) \
+  ((const struct real_value *) XCNMPRV (r, CONST_DOUBLE, VOIDmode))
 
 /* For a CONST_VECTOR, return element #n.  */
 #define CONST_VECTOR_ELT(RTX, N) XCVECEXP (RTX, 0, N, CONST_VECTOR)
@@ -1029,7 +1043,7 @@ do {                                                                      \
                   ASM_INPUT)->volatil)
 
 /* 1 if RTX is a mem that refers to an aggregate, either to the
-   aggregate itself of to a field of the aggregate.  If zero, RTX may
+   aggregate itself or to a field of the aggregate.  If zero, RTX may
    or may not be such a reference.  */
 #define MEM_IN_STRUCT_P(RTX)                                           \
   (RTL_FLAG_CHECK1("MEM_IN_STRUCT_P", (RTX), MEM)->in_struct)
@@ -1326,7 +1340,6 @@ extern rtx expand_builtin_expect_jump (tree, rtx, rtx);
 extern void set_stack_check_libfunc (rtx);
 extern HOST_WIDE_INT trunc_int_for_mode        (HOST_WIDE_INT, enum machine_mode);
 extern rtx plus_constant (rtx, HOST_WIDE_INT);
-extern void optimize_save_area_alloca (void);
 
 /* In emit-rtl.c */
 extern rtvec gen_rtvec (int, ...);
@@ -1906,7 +1919,7 @@ extern enum rtx_code reversed_comparison_code_parts (enum rtx_code,
                                                     rtx, rtx, rtx);
 extern void delete_for_peephole (rtx, rtx);
 extern int condjump_in_parallel_p (rtx);
-extern void purge_line_number_notes (rtx);
+extern void purge_line_number_notes (void);
 
 /* In emit-rtl.c.  */
 extern int max_reg_num (void);
@@ -1951,6 +1964,8 @@ extern rtx delete_insn_and_edges (rtx);
 extern void delete_insn_chain_and_edges (rtx, rtx);
 extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx);
 extern rtx gen_const_mem (enum machine_mode, rtx);
+extern rtx gen_frame_mem (enum machine_mode, rtx);
+extern rtx gen_tmp_stack_mem (enum machine_mode, rtx);
 extern bool validate_subreg (enum machine_mode, enum machine_mode,
                             rtx, unsigned int);
 
@@ -2072,6 +2087,9 @@ extern void dbr_schedule (rtx, FILE *);
 extern void dump_local_alloc (FILE *);
 extern int local_alloc (void);
 
+/* In reload1.c */
+extern int function_invariant_p (rtx);
+
 /* In reg-stack.c */
 extern bool reg_to_stack (FILE *);
 
@@ -2096,7 +2114,8 @@ extern rtx emit_library_call_value (rtx, rtx, enum libcall_type,
 /* In varasm.c */
 extern int in_data_section (void);
 extern void init_varasm_once (void);
-
+extern enum tls_model decl_default_tls_model (tree);
+  
 /* In rtl.c */
 extern void traverse_md_constants (int (*) (void **, void *), void *);
 struct md_constant { char *name, *value; };