aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2008-12-09 09:14:28 +0000
committerKai Tietz <ktietz@gcc.gnu.org>2008-12-09 10:14:28 +0100
commit457691343552e43ffbce002ef2bd4065e09d7c39 (patch)
tree22389f9764187766baa819ce9d1fcc32e25e5dc3 /gcc/calls.c
parentf2dc2f86ae47e722651f005b31ca435e3f1f231f (diff)
downloadgcc-457691343552e43ffbce002ef2bd4065e09d7c39.zip
gcc-457691343552e43ffbce002ef2bd4065e09d7c39.tar.gz
gcc-457691343552e43ffbce002ef2bd4065e09d7c39.tar.bz2
function.c (aggregate_value_p): Get fntype from CALL_EXPR in any case.
2008-12-09 Kai Tietz <kai.tietz@onevision.com> PR/38366 * function.c (aggregate_value_p): Get fntype from CALL_EXPR in any case. * calls.c (nitialize_argument_information): Add fntype argument and use it for calls.promote_function_args. (expand_call): Pass fntype to aggregate_value_p if no fndecl available and pass additional fntype to initialize_argument_information. * config/i386/i386.c (ix86_reg_parm_stack_space): Remove cfun part to get function abi type. (init_cumulative_args): Use for abi kind detection fntype, when no fndecl is available. From-SVN: r142584
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index e2c4fcb..03994d4 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -136,7 +136,7 @@ static int compute_argument_block_size (int, struct args_size *, tree, tree, int
static void initialize_argument_information (int, struct arg_data *,
struct args_size *, int,
tree, tree,
- tree, CUMULATIVE_ARGS *, int,
+ tree, tree, CUMULATIVE_ARGS *, int,
rtx *, int *, int *, int *,
bool *, bool);
static void compute_argument_addresses (struct arg_data *, rtx, int);
@@ -938,7 +938,7 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
struct args_size *args_size,
int n_named_args ATTRIBUTE_UNUSED,
tree exp, tree struct_value_addr_value,
- tree fndecl,
+ tree fndecl, tree fntype,
CUMULATIVE_ARGS *args_so_far,
int reg_parm_stack_space,
rtx *old_stack_level, int *old_pending_adj,
@@ -1119,7 +1119,9 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,
mode = TYPE_MODE (type);
unsignedp = TYPE_UNSIGNED (type);
- if (targetm.calls.promote_function_args (fndecl ? TREE_TYPE (fndecl) : 0))
+ if (targetm.calls.promote_function_args (fndecl
+ ? TREE_TYPE (fndecl)
+ : fntype))
mode = promote_mode (type, mode, &unsignedp, 1);
args[i].unsignedp = unsignedp;
@@ -2088,7 +2090,7 @@ expand_call (tree exp, rtx target, int ignore)
/* Set up a place to return a structure. */
/* Cater to broken compilers. */
- if (aggregate_value_p (exp, fndecl))
+ if (aggregate_value_p (exp, (!fndecl ? fntype : fndecl)))
{
/* This call returns a big structure. */
flags &= ~(ECF_CONST | ECF_PURE | ECF_LOOPING_CONST_OR_PURE);
@@ -2245,7 +2247,7 @@ expand_call (tree exp, rtx target, int ignore)
arguments into ARGS_SIZE, etc. */
initialize_argument_information (num_actuals, args, &args_size,
n_named_args, exp,
- structure_value_addr_value, fndecl,
+ structure_value_addr_value, fndecl, fntype,
&args_so_far, reg_parm_stack_space,
&old_stack_level, &old_pending_adj,
&must_preallocate, &flags,