aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2003-08-27 07:05:18 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2003-08-27 07:05:18 +0000
commit648bb15912c20dcc1a601bd0f7c35a8cdb26bbdf (patch)
tree4fb176f0e3f8d0be12e1b3e8dc88d2e5e55ee7b6 /gcc/calls.c
parent0c7829a97b309d2290ce83d0d1c2a9e23b9dec2e (diff)
downloadgcc-648bb15912c20dcc1a601bd0f7c35a8cdb26bbdf.zip
gcc-648bb15912c20dcc1a601bd0f7c35a8cdb26bbdf.tar.gz
gcc-648bb15912c20dcc1a601bd0f7c35a8cdb26bbdf.tar.bz2
calls.c (initialize_argument_information): If an argument has no stack space associated with it...
* calls.c (initialize_argument_information): If an argument has no stack space associated with it, and BLOCK_REG_PADDING is defined, use it to decide at which end the argument should be padded. * function.c (assign_parms): Allocate BLKmode stack slots. * config/mips/mips-protos.h (mips_pad_arg_upward): Declare. (mips_pad_reg_upward): Declare. * config/mips/mips.h (PAD_VARARGS_DOWN): Use FUNCTION_ARG_PADDING. (CUMULATIVE_ARGS): Remove num_adjusts and adjusts. (FUNCTION_ARG_PADDING): Use mips_pad_arg_upward. (BLOCK_REG_PADDING): Use mips_pad_reg_upward. * config/mips/mips.c (struct mips_arg_info): Remove struct_p. (mips_expand_call): Remove code for generating structure shifts. (mips_arg_info): Don't set struct_p. Don't set fpr_p for non-float types unless using the EABI. (function_arg_advance): Don't generate shift instructions. (function_arg): Don't return them. Don't short-circuit the check for double structure chunks for DFmode arguments. (mips_pad_arg_upward, mips_pad_reg_upward): New functions. (mips_expand_prologue): Remove code to emit structure shifts. * config/mips/irix6-libc-compat.c: Remove workarounds for buggy structure passing (inet_ntoa, inet_lnaof, inet_netof). Update comments to say that only structure returns are a problem. From-SVN: r70843
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index 900290f..50fa592 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1238,6 +1238,14 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
#endif
args[i].pass_on_stack ? 0 : args[i].partial,
fndecl, args_size, &args[i].locate);
+#ifdef BLOCK_REG_PADDING
+ else
+ /* The argument is passed entirely in registers. See at which
+ end it should be padded. */
+ args[i].locate.where_pad =
+ BLOCK_REG_PADDING (mode, type,
+ int_size_in_bytes (type) <= UNITS_PER_WORD);
+#endif
/* Update ARGS_SIZE, the total stack space for args so far. */