OSDN Git Service

Add -mabi=n32 support.
[pf3gnuchains/gcc-fork.git] / gcc / rtl.h
index a8a6399..be1e1fd 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, 1993 Free Software Foundation, Inc.
+   Copyright (C) 1987, 91-95, 1996 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,36 +146,10 @@ typedef struct rtx_def
   rtunion fld[1];
 } *rtx;
 
-
-/* Add prototype support.  */
-#ifndef PROTO
-#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
-#define PROTO(ARGS) ARGS
-#else
-#define PROTO(ARGS) ()
-#endif
-#endif
+#include "gansidecl.h"
 
 #define NULL_RTX (rtx) 0
 
-/* Define a generic NULL if one hasn't already been defined.  */
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef GENERIC_PTR
-#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
-#define GENERIC_PTR void *
-#else
-#define GENERIC_PTR char *
-#endif
-#endif
-
-#ifndef NULL_PTR
-#define NULL_PTR ((GENERIC_PTR)0)
-#endif
-
 /* Define macros to access the `code' field of the rtx.  */
 
 #ifdef SHORT_ENUM_BUG
@@ -334,6 +313,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.  */
@@ -421,7 +409,7 @@ extern char *note_insn_name[];
 
 /* The rest is used instead of the above, in a CODE_LABEL,
    if bytecode is being output.
-   We make the slightly klugy assumption that a LABEL has enough slots
+   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.  */
@@ -563,12 +551,15 @@ 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
     for the function arguments.
    ORIGINAL_DECL_INITIAL is a pointer to the original DECL_INITIAL for the
     function.
+   INLINE_REGNO_REG_RTX, INLINE_REGNO_POINTER_FLAG, and
+    INLINE_REGNO_POINTER_ALIGN are pointers to the corresponding arrays.
 
    We want this to lay down like an INSN.  The PREV_INSN field
    is always NULL.  The NEXT_INSN field always points to the
@@ -583,10 +574,14 @@ 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)
+#define INLINE_REGNO_REG_RTX(RTX) ((RTX)->fld[16].rtvec)
+#define INLINE_REGNO_POINTER_FLAG(RTX) ((RTX)->fld[17].rtstr)
+#define INLINE_REGNO_POINTER_ALIGN(RTX) ((RTX)->fld[18].rtstr)
 
 /* 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
@@ -643,25 +638,13 @@ extern rtx plus_constant_for_output_wide PROTO((rtx, HOST_WIDE_INT));
 
 #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 gen_rtx                     PROTO((enum rtx_code, enum machine_mode, ...));
-extern rtvec gen_rtvec                 PROTO((int, ...));
-
-#else
 extern rtx bc_gen_rtx ();
-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 gen_rtx                     PVPROTO((enum rtx_code,
+                                                enum machine_mode, ...));
+extern rtvec gen_rtvec                 PVPROTO((int, ...));
+
+extern rtx read_rtx                    STDIO_PROTO((FILE *));
 
 #if 0
 /* At present, don't prototype xrealloc, since all of the callers don't
@@ -681,6 +664,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));
@@ -692,7 +677,10 @@ 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,
+                                              rtvec, char *, char *));
 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));
@@ -703,6 +691,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));
@@ -720,6 +709,8 @@ extern int get_pool_offset          PROTO((rtx));
 extern rtx simplify_subtraction                PROTO((rtx));
 extern rtx assign_stack_local          PROTO((enum machine_mode, int, int));
 extern rtx assign_stack_temp           PROTO((enum machine_mode, int, int));
+extern rtx assign_temp                 PROTO((union tree_node*, int,
+                                              int, int));
 extern rtx protect_from_queue          PROTO((rtx, int));
 extern void emit_queue                 PROTO((void));
 extern rtx emit_move_insn              PROTO((rtx, rtx));
@@ -737,6 +728,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));
@@ -785,6 +777,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
@@ -893,20 +886,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.  */
 
@@ -936,6 +923,13 @@ extern int cse_not_expected;
    Allocated in parallel with regno_pointer_flag.  */
 extern rtx *regno_reg_rtx;
 
+/* Vector indexed by regno; contains the alignment in bytes for a
+   register that contains a pointer, if known.  */
+extern char *regno_pointer_align;
+#define REGNO_POINTER_ALIGN(REGNO) regno_pointer_align[REGNO]
+
 /* 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));