OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / expr.h
index 792c18c..1210372 100644 (file)
@@ -81,7 +81,7 @@ do {                                                  \
   if (host_integerp (inc, 0))                          \
     (TO).constant += tree_low_cst (inc, 0);            \
   else if ((TO).var == 0)                              \
-    (TO).var = inc;                                    \
+    (TO).var = convert (ssizetype, inc);               \
   else                                                 \
     (TO).var = size_binop (PLUS_EXPR, (TO).var,                \
                           convert (ssizetype, inc));   \
@@ -132,7 +132,7 @@ enum direction {none, upward, downward};  /* Value has this type.  */
 /* Supply a default definition for FUNCTION_ARG_BOUNDARY.  Normally, we let
    FUNCTION_ARG_PADDING, which also pads the length, handle any needed
    alignment.  */
-  
+
 #ifndef FUNCTION_ARG_BOUNDARY
 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)      PARM_BOUNDARY
 #endif
@@ -153,33 +153,10 @@ enum direction {none, upward, downward};  /* Value has this type.  */
 #define PRETEND_OUTGOING_VARARGS_NAMED 0
 #endif
 
-/* Nonzero if we do not know how to pass TYPE solely in registers.
-   We cannot do so in the following cases:
-
-   - if the type has variable size
-   - if the type is marked as addressable (it is required to be constructed
-     into the stack)
-   - if the padding and mode of the type is such that a copy into a register
-     would put it into the wrong part of the register.
-
-   Which padding can't be supported depends on the byte endianness.
-
-   A value in a register is implicitly padded at the most significant end.
-   On a big-endian machine, that is the lower end in memory.
-   So a value padded in memory at the upper end can't go in a register.
-   For a little-endian machine, the reverse is true.  */
-
+/* Nonzero if we do not know how to pass TYPE solely in registers.  */
+extern bool default_must_pass_in_stack PARAMS((enum machine_mode, tree));
 #ifndef MUST_PASS_IN_STACK
-#define MUST_PASS_IN_STACK(MODE,TYPE)                  \
-  ((TYPE) != 0                                         \
-   && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST     \
-       || TREE_ADDRESSABLE (TYPE)                      \
-       || ((MODE) == BLKmode                           \
-          && ! ((TYPE) != 0 && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \
-                && 0 == (int_size_in_bytes (TYPE)      \
-                         % (PARM_BOUNDARY / BITS_PER_UNIT))) \
-          && (FUNCTION_ARG_PADDING (MODE, TYPE)        \
-              == (BYTES_BIG_ENDIAN ? upward : downward)))))
+#define MUST_PASS_IN_STACK(MODE,TYPE) default_must_pass_in_stack(MODE, TYPE)
 #endif
 
 /* Nonzero if type TYPE should be returned in memory.
@@ -289,7 +266,7 @@ extern rtx gen_move_insn PARAMS ((rtx, rtx));
 extern int have_add2_insn PARAMS ((rtx, rtx));
 extern int have_sub2_insn PARAMS ((rtx, rtx));
 
-/* Emit a pair of rtl insns to compare two rtx's and to jump 
+/* 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, rtx));
@@ -303,10 +280,13 @@ rtx emit_conditional_move PARAMS ((rtx, enum rtx_code, rtx, rtx,
                                   enum machine_mode, rtx, rtx,
                                   enum machine_mode, int));
 
-/* Return non-zero if the conditional move is supported.  */
+/* Return nonzero if the conditional move is supported.  */
 int can_conditionally_move_p PARAMS ((enum machine_mode mode));
 
 #endif
+rtx emit_conditional_add PARAMS ((rtx, enum rtx_code, rtx, rtx,
+                                 enum machine_mode, rtx, rtx,
+                                 enum machine_mode, int));
 
 \f
 /* Functions from expmed.c:  */
@@ -340,20 +320,18 @@ extern rtx get_condition PARAMS ((rtx, rtx *));
 extern rtx gen_cond_trap PARAMS ((enum rtx_code, rtx, rtx, rtx));
 \f
 /* Functions from builtins.c:  */
-#ifdef TREE_CODE
 extern rtx expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int));
-extern void std_expand_builtin_va_start PARAMS ((int, tree, rtx));
+extern void std_expand_builtin_va_start PARAMS ((tree, rtx));
 extern rtx std_expand_builtin_va_arg PARAMS ((tree, tree));
 extern rtx expand_builtin_va_arg PARAMS ((tree, tree));
 extern void default_init_builtins PARAMS ((void));
 extern rtx default_expand_builtin PARAMS ((tree, rtx, rtx,
                                           enum machine_mode, int));
-#endif
-
 extern void expand_builtin_setjmp_setup PARAMS ((rtx, rtx));
 extern void expand_builtin_setjmp_receiver PARAMS ((rtx));
 extern void expand_builtin_longjmp PARAMS ((rtx, rtx));
 extern rtx expand_builtin_saveregs PARAMS ((void));
+extern void expand_builtin_trap 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));
@@ -371,10 +349,6 @@ extern void init_expr_once PARAMS ((void));
 /* This is run at the start of compiling a function.  */
 extern void init_expr PARAMS ((void));
 
-/* This function is run once to initialize stor-layout.c.  */
-
-extern void init_stor_layout_once PARAMS ((void));
-
 /* This is run at the end of compiling a function.  */
 extern void finish_expr_for_function PARAMS ((void));
 
@@ -400,7 +374,15 @@ 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));
+
+enum block_op_methods
+{
+  BLOCK_OP_NORMAL,
+  BLOCK_OP_CALL_PARM,
+  BLOCK_OP_NO_LIBCALL
+};
+
+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.
    The number of registers to be filled is NREGS.  */
@@ -410,10 +392,17 @@ extern void move_block_to_reg PARAMS ((int, rtx, int, enum machine_mode));
    The number of registers to be filled is NREGS.  */
 extern void move_block_from_reg PARAMS ((int, rtx, int, int));
 
+/* Generate a non-consecutive group of registers represented by a PARALLEL.  */
+extern rtx gen_group_rtx PARAMS ((rtx));
+
 /* Load a BLKmode value into non-consecutive registers represented by a
    PARALLEL.  */
 extern void emit_group_load PARAMS ((rtx, rtx, int));
 
+/* Move a non-consecutive group of registers represented by a PARALLEL into
+   a non-consecutive group of registers represented by a PARALLEL.  */
+extern void emit_group_move PARAMS ((rtx, rtx));
+
 /* Store a BLKmode value from non-consecutive registers represented by a
    PARALLEL.  */
 extern void emit_group_store PARAMS ((rtx, rtx, int));
@@ -437,7 +426,7 @@ 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));
 
-/* Return non-zero if it is desirable to store LEN bytes generated by
+/* 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
    in every CONSTFUN call.
@@ -550,6 +539,10 @@ extern unsigned int case_values_threshold PARAMS ((void));
 /* Return an rtx for the size in bytes of the value of an expr.  */
 extern rtx expr_size PARAMS ((tree));
 
+/* Return a wide integer for the size in bytes of the value of EXP, or -1
+   if the size can vary or is larger than an integer.  */
+extern HOST_WIDE_INT int_expr_size PARAMS ((tree));
+
 extern rtx lookup_static_chain PARAMS ((tree));
 
 /* Convert a stack slot address ADDR valid in function FNDECL
@@ -610,6 +603,9 @@ extern void set_mem_expr PARAMS ((rtx, tree));
 /* Set the offset for MEM to OFFSET.  */
 extern void set_mem_offset PARAMS ((rtx, rtx));
 
+/* Set the size for MEM to SIZE.  */
+extern void set_mem_size PARAMS ((rtx, rtx));
+
 /* Return a memory reference like MEMREF, but with its mode changed
    to MODE and its address changed to ADDR.
    (VOIDmode means don't change the mode.
@@ -672,6 +668,12 @@ extern void maybe_set_unchanging PARAMS ((rtx, tree));
    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));
+
+/* Similar, except that BITPOS has not yet been applied to REF, so if
+   we alter MEM_OFFSET according to T then we should subtract BITPOS
+   expecting that it'll be added back in later.  */
+extern void set_mem_attributes_minus_bitpos PARAMS ((rtx, tree, int,
+                                                    HOST_WIDE_INT));
 #endif
 
 /* Assemble the static constant template for function entry trampolines.  */
@@ -729,7 +731,7 @@ extern void emit_stack_restore PARAMS ((enum save_level, rtx, rtx));
    says how many bytes.  */
 extern rtx allocate_dynamic_stack_space PARAMS ((rtx, rtx, int));
 
-/* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive. 
+/* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive.
    FIRST is a constant and size is a Pmode RTX.  These are offsets from the
    current stack pointer.  STACK_GROWS_DOWNWARD says whether to add or
    subtract from the stack.  If SIZE is constant, this is done
@@ -760,6 +762,7 @@ extern rtx extract_bit_field PARAMS ((rtx, unsigned HOST_WIDE_INT,
                                      enum machine_mode, enum machine_mode,
                                      HOST_WIDE_INT));
 extern rtx expand_mult PARAMS ((enum machine_mode, rtx, rtx, rtx, int));
+extern bool const_mult_add_overflow_p PARAMS ((rtx, rtx, rtx, enum machine_mode, 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));
 
@@ -791,3 +794,5 @@ extern void do_jump_by_parts_greater_rtx    PARAMS ((enum machine_mode,
 extern void mark_seen_cases                    PARAMS ((tree, unsigned char *,
                                                         HOST_WIDE_INT, int));
 #endif
+
+extern int vector_mode_valid_p         PARAMS ((enum machine_mode));