OSDN Git Service

(clrstrsi): New pattern and associate anonymous pattern.
[pf3gnuchains/gcc-fork.git] / gcc / rtl.h
index d6bfac8..b757aec 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1,5 +1,5 @@
 /* Register Transfer Language (RTL) definitions for GNU C-Compiler
-   Copyright (C) 1987, 1991, 1992 Free Software Foundation, Inc.
+   Copyright (C) 1987, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -15,7 +15,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 
 #include "machmode.h"
@@ -25,6 +26,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #undef ABS /* Likewise.  */
 #undef PC /* Likewise.  */
 
+#ifndef TREE_CODE
+union tree_node;
+#endif
+
 /* Register Transfer Language EXPRESSIONS CODES */
 
 #define RTX_CODE       enum rtx_code
@@ -141,6 +146,7 @@ typedef struct rtx_def
   rtunion fld[1];
 } *rtx;
 
+
 /* Add prototype support.  */
 #ifndef PROTO
 #if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
@@ -150,6 +156,26 @@ typedef struct rtx_def
 #endif
 #endif
 
+#ifndef VPROTO
+#ifdef __STDC__
+#define PVPROTO(ARGS)          ARGS
+#define VPROTO(ARGS)           ARGS
+#define VA_START(va_list,var)  va_start(va_list,var)
+#else
+#define PVPROTO(ARGS)          ()
+#define VPROTO(ARGS)           (va_alist) va_dcl
+#define VA_START(va_list,var)  va_start(va_list)
+#endif
+#endif
+
+#ifndef STDIO_PROTO
+#ifdef BUFSIZ
+#define STDIO_PROTO(ARGS) PROTO(ARGS)
+#else
+#define STDIO_PROTO(ARGS) ()
+#endif
+#endif
+
 #define NULL_RTX (rtx) 0
 
 /* Define a generic NULL if one hasn't already been defined.  */
@@ -333,6 +359,15 @@ enum reg_note { REG_DEAD = 1, REG_INC = 2, REG_EQUIV = 3, REG_WAS_0 = 4,
 extern char *reg_note_name[];
 #define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int)(MODE)])
 
+/* This field is only present on CALL_INSNs.  It holds a chain of EXPR_LIST of
+   USE and CLOBBER expressions.
+     USE expressions list the registers filled with arguments that
+   are passed to the function.
+     CLOBBER expressions document the registers explicitly clobbered
+   by this CALL_INSN.
+     Pseudo registers can not be mentioned in this list.  */
+#define CALL_INSN_FUNCTION_USAGE(INSN) ((INSN)->fld[7].rtx)
+
 /* The label-number of a code-label.  The assembler label
    is made from `L' and the label-number printed in decimal.
    Label numbers are unique in a compilation.  */
@@ -418,6 +453,17 @@ extern char *note_insn_name[];
    of LABEL_REFs that point at it, so unused labels can be deleted.  */
 #define LABEL_NUSES(LABEL) ((LABEL)->fld[5].rtint)
 
+/* The rest is used instead of the above, in a CODE_LABEL,
+   if bytecode is being output.
+   We make the slightly kludgy assumption that a LABEL has enough slots
+   to hold these things.  That happens to be true.  */
+
+/* For static or external objects.  */
+#define BYTECODE_LABEL(X) (XEXP ((X), 0))
+
+/* For goto labels inside bytecode functions.  */
+#define BYTECODE_BC_LABEL(X) (*(struct bc_label **) &XEXP ((X), 1))
+
 /* In jump.c, each JUMP_INSN can point to a label that it can jump to,
    so that if the JUMP_INSN is deleted, the label's LABEL_NUSES can
    be decremented and possibly the label can be deleted.  */
@@ -551,6 +597,7 @@ extern char *note_insn_name[];
    FUNCTION_ARGS_SIZE is the size of the argument block in the stack.
    POPS_ARGS is the number of bytes of input arguments popped by the function
    STACK_SLOT_LIST is the list of stack slots.
+   FORCED_LABELS is the list of labels whose address was taken.
    FUNCTION_FLAGS are where single-bit flags are saved.
    OUTGOING_ARGS_SIZE is the size of the largest outgoing stack parameter list.
    ORIGINAL_ARG_VECTOR is a vector of the original DECL_RTX values
@@ -571,10 +618,11 @@ extern char *note_insn_name[];
 #define FUNCTION_ARGS_SIZE(RTX) ((RTX)->fld[8].rtint)
 #define POPS_ARGS(RTX) ((RTX)->fld[9].rtint)
 #define STACK_SLOT_LIST(RTX) ((RTX)->fld[10].rtx)
-#define FUNCTION_FLAGS(RTX) ((RTX)->fld[11].rtint)
-#define OUTGOING_ARGS_SIZE(RTX) ((RTX)->fld[12].rtint)
-#define ORIGINAL_ARG_VECTOR(RTX) ((RTX)->fld[13].rtvec)
-#define ORIGINAL_DECL_INITIAL(RTX) ((RTX)->fld[14].rtx)
+#define FORCED_LABELS(RTX) ((RTX)->fld[11].rtx)
+#define FUNCTION_FLAGS(RTX) ((RTX)->fld[12].rtint)
+#define OUTGOING_ARGS_SIZE(RTX) ((RTX)->fld[13].rtint)
+#define ORIGINAL_ARG_VECTOR(RTX) ((RTX)->fld[14].rtvec)
+#define ORIGINAL_DECL_INITIAL(RTX) ((RTX)->fld[15].rtx)
 
 /* In FUNCTION_FLAGS we save some variables computed when emitting the code
    for the function and which must be `or'ed into the current flag values when
@@ -629,26 +677,15 @@ extern char *note_insn_name[];
 extern rtx plus_constant_wide           PROTO((rtx, HOST_WIDE_INT));
 extern rtx plus_constant_for_output_wide PROTO((rtx, HOST_WIDE_INT));
 
-#define GEN_INT(N) gen_rtx (CONST_INT, VOIDmode, (N))
+#define GEN_INT(N) gen_rtx (CONST_INT, VOIDmode, (HOST_WIDE_INT) (N))
 
-#if 0
-/* We cannot define prototypes for the variable argument functions,
-   since they have not been ANSI-fied, and an ANSI compiler would
-   complain when compiling the definition of these functions.  */
+extern rtx bc_gen_rtx ();
 
-extern rtx gen_rtx                     PROTO((enum rtx_code, enum machine_mode, ...));
-extern rtvec gen_rtvec                 PROTO((int, ...));
+extern rtx gen_rtx                     PVPROTO((enum rtx_code,
+                                                enum machine_mode, ...));
+extern rtvec gen_rtvec                 PVPROTO((int, ...));
 
-#else
-extern rtx gen_rtx ();
-extern rtvec gen_rtvec ();
-#endif
-
-#ifdef BUFSIZ                  /* stdio.h has been included */
-extern rtx read_rtx                    PROTO((FILE *));
-#else
-extern rtx read_rtx ();
-#endif
+extern rtx read_rtx                    STDIO_PROTO((FILE *));
 
 #if 0
 /* At present, don't prototype xrealloc, since all of the callers don't
@@ -668,6 +705,8 @@ extern rtx rtx_alloc                        PROTO((RTX_CODE));
 extern rtvec rtvec_alloc               PROTO((int));
 extern rtx find_reg_note               PROTO((rtx, enum reg_note, rtx));
 extern rtx find_regno_note             PROTO((rtx, enum reg_note, int));
+extern int find_reg_fusage             PROTO((rtx, enum rtx_code, rtx));
+extern int find_regno_fusage           PROTO((rtx, enum rtx_code, int));
 extern HOST_WIDE_INT get_integer_term  PROTO((rtx));
 extern rtx get_related_value           PROTO((rtx));
 extern rtx single_set                  PROTO((rtx));
@@ -679,7 +718,9 @@ extern rtx replace_rtx                      PROTO((rtx, rtx, rtx));
 extern rtvec gen_rtvec_v               PROTO((int, rtx *));
 extern rtx gen_reg_rtx                 PROTO((enum machine_mode));
 extern rtx gen_label_rtx               PROTO((void));
-extern rtx gen_inline_header_rtx       PROTO((rtx, rtx, int, int, int, int, int, int, rtx, int, int, rtvec, rtx));
+extern rtx gen_inline_header_rtx       PROTO((rtx, rtx, int, int, int, int,
+                                              int, int, rtx, rtx, int, int,
+                                              rtvec, rtx));
 extern rtx gen_lowpart_common          PROTO((enum machine_mode, rtx));
 extern rtx gen_lowpart                 PROTO((enum machine_mode, rtx));
 extern rtx gen_lowpart_if_possible     PROTO((enum machine_mode, rtx));
@@ -690,6 +731,7 @@ extern rtx operand_subword          PROTO((rtx, int, int, enum machine_mode));
 extern rtx operand_subword_force       PROTO((rtx, int, enum machine_mode));
 extern int subreg_lowpart_p            PROTO((rtx));
 extern rtx make_safe_from              PROTO((rtx, rtx));
+extern rtx convert_memory_address      PROTO((enum machine_mode, rtx));
 extern rtx memory_address              PROTO((enum machine_mode, rtx));
 extern rtx get_insns                   PROTO((void));
 extern rtx get_last_insn               PROTO((void));
@@ -724,6 +766,7 @@ extern rtx emit_line_note_after             PROTO((char *, int, rtx));
 extern rtx emit_insn                   PROTO((rtx));
 extern rtx emit_insns                  PROTO((rtx));
 extern rtx emit_insns_before           PROTO((rtx, rtx));
+extern rtx emit_insns_after            PROTO((rtx, rtx));
 extern rtx emit_jump_insn              PROTO((rtx));
 extern rtx emit_call_insn              PROTO((rtx));
 extern rtx emit_label                  PROTO((rtx));
@@ -772,6 +815,7 @@ extern rtx gen_bge                  PROTO((rtx));
 extern rtx gen_ble                     PROTO((rtx));
 extern rtx eliminate_constant_term     PROTO((rtx, rtx *));
 extern rtx expand_complex_abs          PROTO((enum machine_mode, rtx, rtx, int));
+extern enum machine_mode choose_hard_reg_mode PROTO((int, int));
 
 /* Maximum number of parallel sets and clobbers in any insn in this fn.
    Always at least 3, since the combiner could put that many togetherm
@@ -813,6 +857,7 @@ extern rtx const_tiny_rtx[3][(int) MAX_MACHINE_MODE];
    go through these unique rtx objects.  */
 extern rtx stack_pointer_rtx;
 extern rtx frame_pointer_rtx;
+extern rtx hard_frame_pointer_rtx;
 extern rtx arg_pointer_rtx;
 extern rtx pic_offset_table_rtx;
 extern rtx struct_value_rtx;
@@ -820,6 +865,16 @@ extern rtx struct_value_incoming_rtx;
 extern rtx static_chain_rtx;
 extern rtx static_chain_incoming_rtx;
 
+/* If HARD_FRAME_POINTER_REGNUM is defined, then a special dummy reg
+   is used to represent the frame pointer.  This is because the
+   hard frame pointer and the automatic variables are separated by an amount
+   that cannot be determined until after register allocation.  We can assume
+   that in this case ELIMINABLE_REGS will be defined, one action of which
+   will be to eliminate FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM. */
+#ifndef HARD_FRAME_POINTER_REGNUM
+#define HARD_FRAME_POINTER_REGNUM FRAME_POINTER_REGNUM
+#endif
+
 /* Virtual registers are used during RTL generation to refer to locations into
    the stack frame when the actual location isn't known until RTL generation
    is complete.  The routine instantiate_virtual_regs replaces these with
@@ -869,20 +924,14 @@ extern rtx *find_single_use               PROTO((rtx, rtx, rtx *));
    expr.h to be included for the enumeration.  */
 
 extern rtx expand_expr ();
-extern rtx immed_real_const_1();
 
-#ifdef TREE_CODE
-/* rtl.h and tree.h were included.  */
-extern rtx  output_constant_def PROTO((tree));
-extern rtx  immed_real_const   PROTO((tree));
-extern rtx  immed_real_const_1 PROTO((REAL_VALUE_TYPE, enum machine_mode));
-extern tree make_tree          PROTO((tree, rtx));
+extern rtx output_constant_def         PROTO((union tree_node *));
+extern rtx immed_real_const            PROTO((union tree_node *));
+extern union tree_node *make_tree      PROTO((union tree_node *, rtx));
 
-#else
-extern rtx output_constant_def ();
-extern rtx immed_real_const ();
-extern rtx immed_real_const_1 ();
-#endif
+/* Abort routines */
+extern void fatal_insn_not_found       PROTO((rtx));
+extern void fatal_insn                 PROTO((char *, rtx));
 
 /* Define a default value for STORE_FLAG_VALUE.  */
 
@@ -913,5 +962,7 @@ extern int cse_not_expected;
 extern rtx *regno_reg_rtx;
 
 /* Translates rtx code to tree code, for those codes needed by
-   REAL_ARITHMETIC.  */
-extern int rtx_to_tree_code ();
+   REAL_ARITHMETIC.  The function returns an int because the caller may not
+   know what `enum tree_code' means.  */
+
+extern int rtx_to_tree_code    PROTO((enum rtx_code));