summaryrefslogtreecommitdiff
path: root/gcc/expr.h
diff options
context:
space:
mode:
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-02 14:22:09 +0000
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-02 14:22:09 +0000
commit241399f6793dac1fdefa6b6c7c33cabe1c4f1cc9 (patch)
tree3499480542d5aee3c1e4cc0cd83f51a439861617 /gcc/expr.h
parent30e87df7d5b99e14e55e7f93055e8481ffff587a (diff)
downloadgcc-241399f6793dac1fdefa6b6c7c33cabe1c4f1cc9.tar.gz
* calls.c (struct arg_data): Move offset, slot_offset, size and
alignment_pad to struct locate_and_pad_arg_data. Update all refs. (initialize_argument_information): Adjust call to locate_and_pad_parm. Delete alignment_pad var. Don't calculate slot_offset here. (emit_library_call_value_1): Delete alignment_pad, offset and size vars. Use struct locate_and_pad_arg_data instead. Adjust refs. Adjust call to locate_and_pad_parm. Don't tweak arg size for partial in-regs here. Formatting fixes. * expr.h (struct locate_and_pad_arg_data): New struct. (locate_and_pad_parm): Adjust declaration. * function.c (assign_parms): Localize vars. Use "locate" instead of other arg location vars. Don't invoke FUNCTION_ARG or FUNCTION_INCOMING_ARG unless pretend_named is different from named_arg. Heed MUST_PASS_IN_STACK and set up "partial" before calling locate_and_pad_parm. Adjust locate_and_pad_parm call. Use slot_offset for stack home of reg parms. Correct test for parm passed in memory. Formatting fixes. (locate_and_pad_parm): Add "partial" to params. Replace offset_ptr arg_size_ptr and alignment pad with "locate". Set slot_offset here. Correct initial_offset_ptr handling. Localize vars. Always pad locate->offset even when in_regs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66383 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.h')
-rw-r--r--gcc/expr.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/gcc/expr.h b/gcc/expr.h
index 7e157cdf302..dfd83d43c23 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -63,6 +63,8 @@ enum expand_modifier {EXPAND_NORMAL = 0, EXPAND_STACK_PARM = 2, EXPAND_SUM,
more information. */
#define OK_DEFER_POP (inhibit_defer_pop -= 1)
+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
@@ -74,6 +76,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. */
@@ -119,8 +139,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 \
@@ -570,11 +588,9 @@ 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. */