/* Definitions for code generation pass of GNU compiler.
- Copyright (C) 1987, 91-99, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
\f
#ifdef TREE_CODE /* Don't lose if tree.h not included. */
/* Structure to record the size of a sequence of arguments
- as the sum of a tree-expression and a constant. */
+ as the sum of a tree-expression and a constant. This structure is
+ also used to store offsets from the stack, which might be negative,
+ so the variable part must be ssizetype, not sizetype. */
struct args_size
{
#define ADD_PARM_SIZE(TO, INC) \
{ tree inc = (INC); \
- if (TREE_CODE (inc) == INTEGER_CST) \
- (TO).constant += TREE_INT_CST_LOW (inc); \
+ if (host_integerp (inc, 0)) \
+ (TO).constant += tree_low_cst (inc, 0); \
else if ((TO).var == 0) \
(TO).var = inc; \
else \
#define SUB_PARM_SIZE(TO, DEC) \
{ tree dec = (DEC); \
- if (TREE_CODE (dec) == INTEGER_CST) \
- (TO).constant -= TREE_INT_CST_LOW (dec); \
+ if (host_integerp (dec, 0)) \
+ (TO).constant -= tree_low_cst (dec, 0); \
else if ((TO).var == 0) \
- (TO).var = size_binop (MINUS_EXPR, integer_zero_node, dec); \
+ (TO).var = size_binop (MINUS_EXPR, ssize_int (0), dec); \
else \
(TO).var = size_binop (MINUS_EXPR, (TO).var, dec); }
-/* Convert the implicit sum in a `struct args_size' into an rtx. */
-#define ARGS_SIZE_RTX(SIZE) \
-((SIZE).var == 0 ? GEN_INT ((SIZE).constant) \
- : expand_expr (size_binop (PLUS_EXPR, (SIZE).var, \
- size_int ((SIZE).constant)), \
- NULL_RTX, VOIDmode, EXPAND_MEMORY_USE_BAD))
+/* Convert the implicit sum in a `struct args_size' into a tree
+ of type ssizetype. */
+#define ARGS_SIZE_TREE(SIZE) \
+((SIZE).var == 0 ? ssize_int ((SIZE).constant) \
+ : size_binop (PLUS_EXPR, (SIZE).var, ssize_int ((SIZE).constant)))
-/* Convert the implicit sum in a `struct args_size' into a tree. */
-#define ARGS_SIZE_TREE(SIZE) \
-((SIZE).var == 0 ? size_int ((SIZE).constant) \
- : size_binop (PLUS_EXPR, (SIZE).var, size_int ((SIZE).constant)))
+/* Convert the implicit sum in a `struct args_size' into an rtx. */
+#define ARGS_SIZE_RTX(SIZE) \
+((SIZE).var == 0 ? GEN_INT ((SIZE).constant) \
+ : expand_expr (ARGS_SIZE_TREE (SIZE), NULL_RTX, VOIDmode, \
+ EXPAND_MEMORY_USE_BAD))
/* Supply a default definition for FUNCTION_ARG_PADDING:
usually pad upward, but pad short args downward on
/* Emit one rtl insn to compare two rtx's. */
extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx,
- enum machine_mode, int, int));
+ enum machine_mode, int, unsigned int));
/* Emit a pair of rtl insns to compare two rtx's and to jump
to a label if the comparison is true. */
extern void emit_cmp_and_jump_insns PARAMS ((rtx, rtx, enum rtx_code, rtx,
- enum machine_mode, int, int, rtx));
+ enum machine_mode, int,
+ unsigned int, rtx));
/* The various uses that a comparison can have; used by can_compare_p:
jumps, conditional moves, store flag operations. */
/* Functions from loop.c: */
-/* Given a JUMP_INSN, return a description of the test being made. */
+/* Given an insn and condition, return a canonical description of
+ the test being made. */
+extern rtx canonicalize_condition PARAMS ((rtx, rtx, int, rtx *, rtx));
+
+/* Given a JUMP_INSN, return a canonical description of the test
+ being made. */
extern rtx get_condition PARAMS ((rtx, rtx *));
/* Generate a conditional trap instruction. */
extern rtx expand_builtin_setjmp PARAMS ((rtx, rtx, rtx, rtx));
extern void expand_builtin_longjmp PARAMS ((rtx, rtx));
extern rtx expand_builtin_saveregs PARAMS ((void));
-extern int get_varargs_alias_set PARAMS ((void));
+extern HOST_WIDE_INT get_varargs_alias_set PARAMS ((void));
+extern HOST_WIDE_INT get_frame_alias_set PARAMS ((void));
+extern void record_base_value PARAMS ((unsigned int, rtx, int));
+extern void record_alias_subset PARAMS ((HOST_WIDE_INT,
+ HOST_WIDE_INT));
+#ifdef TREE_CODE
+extern HOST_WIDE_INT get_alias_set PARAMS ((tree));
+extern HOST_WIDE_INT lang_get_alias_set PARAMS ((tree));
+#endif
+extern HOST_WIDE_INT new_alias_set PARAMS ((void));
\f
/* Functions from expr.c: */
extern rtx convert_to_mode PARAMS ((enum machine_mode, rtx, int));
/* Convert an rtx to MODE from OLDMODE and return the result. */
-extern rtx convert_modes PARAMS ((enum machine_mode, enum machine_mode, rtx, int));
+extern rtx convert_modes PARAMS ((enum machine_mode, enum machine_mode,
+ rtx, int));
/* Emit code to move a block Y to a block X. */
-extern rtx emit_block_move PARAMS ((rtx, rtx, rtx, int));
+extern rtx emit_block_move PARAMS ((rtx, rtx, rtx, unsigned int));
/* Copy all or part of a value X into registers starting at REGNO.
The number of registers to be filled is NREGS. */
/* Load a BLKmode value into non-consecutive registers represented by a
PARALLEL. */
-extern void emit_group_load PARAMS ((rtx, rtx, int, int));
+extern void emit_group_load PARAMS ((rtx, rtx, int, unsigned int));
+
/* Store a BLKmode value from non-consecutive registers represented by a
PARALLEL. */
-extern void emit_group_store PARAMS ((rtx, rtx, int, int));
+extern void emit_group_store PARAMS ((rtx, rtx, int, unsigned int));
#ifdef TREE_CODE
/* Copy BLKmode object from a set of registers. */
/* Mark REG as holding a parameter for the next CALL_INSN. */
extern void use_reg PARAMS ((rtx *, rtx));
+
/* Mark NREGS consecutive regs, starting at REGNO, as holding parameters
for the next CALL_INSN. */
extern void use_regs PARAMS ((rtx *, int, int));
+
/* Mark a PARALLEL as holding a parameter for the next CALL_INSN. */
extern void use_group_regs PARAMS ((rtx *, rtx));
/* Write zeros through the storage of OBJECT.
If OBJECT has BLKmode, SIZE is its length in bytes and ALIGN is its
alignment. */
-extern rtx clear_storage PARAMS ((rtx, rtx, int));
+extern rtx clear_storage PARAMS ((rtx, rtx, unsigned int));
/* Emit insns to set X from Y. */
extern rtx emit_move_insn PARAMS ((rtx, rtx));
#ifdef TREE_CODE
/* Generate code to push something onto the stack, given its mode and type. */
-extern void emit_push_insn PARAMS ((rtx, enum machine_mode, tree, rtx, int,
- int, rtx, int, rtx, rtx, int, rtx));
+extern void emit_push_insn PARAMS ((rtx, enum machine_mode, tree, rtx,
+ unsigned int, int, rtx, int, rtx, rtx,
+ int, rtx));
/* Emit library call. */
-extern void emit_library_call PARAMS ((rtx orgfun, int no_queue,
- enum machine_mode outmode, int nargs, ...));
-extern rtx emit_library_call_value PARAMS ((rtx orgfun, rtx value, int no_queue,
- enum machine_mode outmode, int nargs, ...));
+extern void emit_library_call PARAMS ((rtx, int, enum machine_mode, int, ...));
+extern rtx emit_library_call_value PARAMS ((rtx, rtx, int, enum machine_mode,
+ int, ...));
/* Expand an assignment that stores the value of FROM into TO. */
extern rtx expand_assignment PARAMS ((tree, tree, int, int));
/* Generate rtl to compare two rtx's, will call emit_cmp_insn. */
extern rtx compare_from_rtx PARAMS ((rtx, rtx, enum rtx_code, int,
- enum machine_mode, rtx, int));
+ enum machine_mode, rtx, unsigned int));
extern void do_compare_rtx_and_jump PARAMS ((rtx, rtx, enum rtx_code, int,
- enum machine_mode, rtx, int,
- rtx, rtx));
+ enum machine_mode, rtx,
+ unsigned int, rtx, rtx));
/* Generate a tablejump instruction (used for switch statements). */
extern void do_tablejump PARAMS ((rtx, enum machine_mode, rtx, rtx, rtx));
extern rtx expand_call PARAMS ((tree, rtx, int));
-extern rtx expand_shift PARAMS ((enum tree_code, enum machine_mode, rtx, tree, rtx, int));
-extern rtx expand_divmod PARAMS ((int, enum tree_code, enum machine_mode, rtx, rtx, rtx, int));
-extern void locate_and_pad_parm PARAMS ((enum machine_mode, tree, int, tree, struct args_size *, struct args_size *, struct args_size *, struct args_size *));
+extern rtx expand_shift PARAMS ((enum tree_code, enum machine_mode, rtx, tree,
+ rtx, int));
+extern rtx expand_divmod PARAMS ((int, enum tree_code, enum machine_mode, rtx,
+ rtx, rtx, int));
+extern void locate_and_pad_parm PARAMS ((enum machine_mode, tree, int, tree,
+ struct args_size *,
+ struct args_size *,
+ struct args_size *,
+ struct args_size *));
extern rtx expand_inline_function PARAMS ((tree, tree, rtx, int, tree, rtx));
+
/* Return the CODE_LABEL rtx for a LABEL_DECL, creating it if necessary. */
extern rtx label_rtx PARAMS ((tree));
#endif
/* Indicate how an input argument register was promoted. */
-extern rtx promoted_input_arg PARAMS ((int, enum machine_mode *, int *));
+extern rtx promoted_input_arg PARAMS ((unsigned int, enum machine_mode *,
+ int *));
/* Return an rtx like arg but sans any constant terms.
Returns the original rtx if it has no constant terms.
/* Return a memory reference like MEMREF, but which is known to have a
valid address. */
-
extern rtx validize_mem PARAMS ((rtx));
+#ifdef TREE_CODE
+/* Given REF, either a MEM or a REG, and T, either the type of X or
+ the expression corresponding to REF, set RTX_UNCHANGING_P if
+ appropriate. */
+extern void maybe_set_unchanging PARAMS ((rtx, tree));
+
+/* Given REF, a MEM, and T, either the type of X or the expression
+ corresponding to REF, set the memory attributes. OBJECTP is nonzero
+ if we are making a new object of this type. */
+extern void set_mem_attributes PARAMS ((rtx, tree, int));
+#endif
+
/* Assemble the static constant template for function entry trampolines. */
extern rtx assemble_trampoline_template PARAMS ((void));
of STACK_BOUNDARY / BITS_PER_UNIT. */
extern rtx round_push PARAMS ((rtx));
-extern rtx store_bit_field PARAMS ((rtx, int, int, enum machine_mode, rtx, int, int));
-extern rtx extract_bit_field PARAMS ((rtx, int, int, int, rtx, enum machine_mode, enum machine_mode, int, int));
+extern rtx store_bit_field PARAMS ((rtx, unsigned HOST_WIDE_INT,
+ unsigned HOST_WIDE_INT,
+ enum machine_mode, rtx,
+ unsigned int, HOST_WIDE_INT));
+extern rtx extract_bit_field PARAMS ((rtx, unsigned HOST_WIDE_INT,
+ unsigned HOST_WIDE_INT, int, rtx,
+ enum machine_mode, enum machine_mode,
+ unsigned int, HOST_WIDE_INT));
extern rtx expand_mult PARAMS ((enum machine_mode, rtx, rtx, rtx, int));
extern rtx expand_mult_add PARAMS ((rtx, rtx, rtx, rtx,enum machine_mode, int));
extern rtx expand_mult_highpart_adjust PARAMS ((enum machine_mode, rtx, rtx, rtx, rtx, int));
#ifdef TREE_CODE /* Don't lose if tree.h not included. */
extern void mark_seen_cases PARAMS ((tree, unsigned char *,
- long, int));
+ HOST_WIDE_INT, int));
#endif