/* 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.
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"
#undef ABS /* Likewise. */
#undef PC /* Likewise. */
+#ifndef TREE_CODE
+union tree_node;
+#endif
+
/* Register Transfer Language EXPRESSIONS CODES */
#define RTX_CODE enum rtx_code
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
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. */
/* 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. */
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
#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
#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
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));
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));
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));
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));
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));
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
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. */
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));