OSDN Git Service

2003-06-10 Andrew Haley <aph@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / expr.h
index 1210372..1e50320 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions for code generation pass of GNU compiler.
    Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -44,13 +44,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define QUEUED_NEXT(P) XEXP (P, 4)
 
 /* This is the 4th arg to `expand_expr'.
+   EXPAND_STACK_PARM means we are possibly expanding a call param onto
+   the stack.  Choosing a value of 2 isn't special;  It just allows
+   some code optimization in store_expr.
    EXPAND_SUM means it is ok to return a PLUS rtx or MULT rtx.
    EXPAND_INITIALIZER is similar but also record any labels on forced_labels.
    EXPAND_CONST_ADDRESS means it is ok to return a MEM whose address
     is a constant that is not a legitimate address.
-   EXPAND_WRITE means we are only going to write to the resulting rtx.  */
-enum expand_modifier {EXPAND_NORMAL, EXPAND_SUM, EXPAND_CONST_ADDRESS,
-                       EXPAND_INITIALIZER, EXPAND_WRITE};
+   EXPAND_WRITE means we are only going to write to the resulting rtx.
+   EXPAND_MEMORY means we are interested in a memory result, even if
+    the memory is constant and we could have propagated a constant value.  */
+enum expand_modifier {EXPAND_NORMAL = 0, EXPAND_STACK_PARM = 2, EXPAND_SUM,
+                     EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER, EXPAND_WRITE,
+                     EXPAND_MEMORY};
 
 /* Prevent the compiler from deferring stack pops.  See
    inhibit_defer_pop for more information.  */
@@ -60,6 +66,8 @@ enum expand_modifier {EXPAND_NORMAL, EXPAND_SUM, EXPAND_CONST_ADDRESS,
    more information.  */
 #define OK_DEFER_POP (inhibit_defer_pop -= 1)
 \f
+enum direction {none, upward, downward};
+
 #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.  This structure is
@@ -71,6 +79,24 @@ struct args_size
   HOST_WIDE_INT constant;
   tree var;
 };
+
+/* Package up various arg related fields of struct args for
+   locate_and_pad_parm.  */
+struct locate_and_pad_arg_data
+{
+  /* Size of this argument on the stack, rounded up for any padding it
+     gets.  If REG_PARM_STACK_SPACE is defined, then register parms are
+     counted here, otherwise they aren't.  */
+  struct args_size size;
+  /* Offset of this argument from beginning of stack-args.  */
+  struct args_size offset;
+  /* Offset to the start of the stack slot.  Different from OFFSET
+     if this arg pads downward.  */
+  struct args_size slot_offset;
+  /* The amount that the stack pointer needs to be adjusted to
+     force alignment for the next argument.  */
+  struct args_size alignment_pad;
+};
 #endif
 
 /* Add the value of the tree INC to the `struct args_size' TO.  */
@@ -116,8 +142,6 @@ do {                                                        \
    usually pad upward, but pad short args downward on
    big-endian machines.  */
 
-enum direction {none, upward, downward};  /* Value has this type.  */
-
 #ifndef FUNCTION_ARG_PADDING
 #define FUNCTION_ARG_PADDING(MODE, TYPE)                               \
   (! BYTES_BIG_ENDIAN                                                  \
@@ -137,6 +161,14 @@ enum direction {none, upward, downward};  /* Value has this type.  */
 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)      PARM_BOUNDARY
 #endif
 
+/* Define to nonzero if complex arguments should be split into their
+   corresponding components.  */
+#ifndef SPLIT_COMPLEX_ARGS
+#define SPLIT_COMPLEX_ARGS 0
+#endif
+tree split_complex_types (tree);
+tree split_complex_values (tree);
+
 /* Provide a default value for STRICT_ARGUMENT_NAMING.  */
 #ifndef STRICT_ARGUMENT_NAMING
 #define STRICT_ARGUMENT_NAMING 0
@@ -378,10 +410,13 @@ extern rtx convert_modes PARAMS ((enum machine_mode, enum machine_mode,
 enum block_op_methods
 {
   BLOCK_OP_NORMAL,
-  BLOCK_OP_CALL_PARM,
-  BLOCK_OP_NO_LIBCALL
+  BLOCK_OP_NO_LIBCALL,
+  BLOCK_OP_CALL_PARM
 };
 
+extern void init_block_move_fn PARAMS ((const char *));
+extern void init_block_clear_fn PARAMS ((const char *));
+
 extern rtx emit_block_move PARAMS ((rtx, rtx, rtx, enum block_op_methods));
 
 /* Copy all or part of a value X into registers starting at REGNO.
@@ -390,7 +425,7 @@ extern void move_block_to_reg PARAMS ((int, rtx, int, enum machine_mode));
 
 /* Copy all or part of a BLKmode value X out of registers starting at REGNO.
    The number of registers to be filled is NREGS.  */
-extern void move_block_from_reg PARAMS ((int, rtx, int, int));
+extern void move_block_from_reg PARAMS ((int, rtx, int));
 
 /* Generate a non-consecutive group of registers represented by a PARALLEL.  */
 extern rtx gen_group_rtx PARAMS ((rtx));
@@ -409,7 +444,7 @@ extern void emit_group_store PARAMS ((rtx, rtx, int));
 
 #ifdef TREE_CODE
 /* Copy BLKmode object from a set of registers.  */
-extern rtx copy_blkmode_from_reg PARAMS ((rtx,rtx,tree));
+extern rtx copy_blkmode_from_reg PARAMS ((rtx, rtx, tree));
 #endif
 
 /* Mark REG as holding a parameter for the next CALL_INSN.  */
@@ -426,6 +461,11 @@ extern void use_group_regs PARAMS ((rtx *, rtx));
    If OBJECT has BLKmode, SIZE is its length in bytes.  */
 extern rtx clear_storage PARAMS ((rtx, rtx));
 
+/* Determine whether the LEN bytes can be moved by using several move
+   instructions.  Return nonzero if a call to move_by_pieces should
+   succeed.  */
+extern int can_move_by_pieces PARAMS ((unsigned HOST_WIDE_INT, unsigned int));
+
 /* Return nonzero if it is desirable to store LEN bytes generated by
    CONSTFUN with several move instructions by store_by_pieces
    function.  CONSTFUNDATA is a pointer which will be passed as argument
@@ -439,11 +479,12 @@ extern int can_store_by_pieces PARAMS ((unsigned HOST_WIDE_INT,
 /* Generate several move instructions to store LEN bytes generated by
    CONSTFUN to block TO.  (A MEM rtx with BLKmode).  CONSTFUNDATA is a
    pointer which will be passed as argument in every CONSTFUN call.
-   ALIGN is maximum alignment we can assume.  */
-extern void store_by_pieces PARAMS ((rtx, unsigned HOST_WIDE_INT,
-                                    rtx (*) (PTR, HOST_WIDE_INT,
-                                             enum machine_mode),
-                                    PTR, unsigned int));
+   ALIGN is maximum alignment we can assume.
+   Returns TO + LEN.  */
+extern rtx store_by_pieces PARAMS ((rtx, unsigned HOST_WIDE_INT,
+                                   rtx (*) (PTR, HOST_WIDE_INT,
+                                            enum machine_mode),
+                                   PTR, unsigned int, int));
 
 /* Emit insns to set X from Y.  */
 extern rtx emit_move_insn PARAMS ((rtx, rtx));
@@ -564,15 +605,18 @@ 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 void locate_and_pad_parm PARAMS ((enum machine_mode, tree, int, int,
+                                        tree, struct args_size *,
+                                        struct locate_and_pad_arg_data *));
 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));
+
+/* As label_rtx, but additionally the label is placed on the forced label
+   list of its containing function (i.e. it is treated as reachable even
+   if how is not obvious).  */
+extern rtx force_label_rtx PARAMS ((tree));
 #endif
 
 /* Indicate how an input argument register was promoted.  */
@@ -639,7 +683,7 @@ extern rtx adjust_automodify_address_1 PARAMS ((rtx, enum machine_mode,
 /* Return a memory reference like MEMREF, but whose address is changed by
    adding OFFSET, an RTX, to it.  POW2 is the highest power of two factor
    known to be in OFFSET (possibly 1).  */
-extern rtx offset_address PARAMS ((rtx, rtx, HOST_WIDE_INT));
+extern rtx offset_address PARAMS ((rtx, rtx, unsigned HOST_WIDE_INT));
 
 /* Return a memory reference like MEMREF, but with its address changed to
    ADDR.  The caller is asserting that the actual piece of memory pointed
@@ -766,15 +810,7 @@ extern bool const_mult_add_overflow_p PARAMS ((rtx, rtx, rtx, enum machine_mode,
 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));
 
-extern rtx assemble_static_space PARAMS ((int));
-
-/* Hook called by expand_expr for language-specific tree codes.
-   It is up to the language front end to install a hook
-   if it has any such codes that expand_expr needs to know about.  */
-extern rtx (*lang_expand_expr) PARAMS ((union tree_node *, rtx,
-                                       enum machine_mode,
-                                       enum expand_modifier modifier));
-
+extern rtx assemble_static_space PARAMS ((unsigned HOST_WIDE_INT));
 extern int safe_from_p PARAMS ((rtx, tree, int));
 
 /* Call this once to initialize the contents of the optabs
@@ -796,3 +832,5 @@ extern void mark_seen_cases                 PARAMS ((tree, unsigned char *,
 #endif
 
 extern int vector_mode_valid_p         PARAMS ((enum machine_mode));
+
+extern tree placeholder_list;