Commit 3f9e6aed by Paul Brook Committed by Paul Brook

function.c (assign_parm_setup_reg): Use function argument promotion rules.

2006-02-01  Paul Brook  <paul@codesourcery.com>

	* function.c (assign_parm_setup_reg): Use function argument promotion
	rules.
	* expr.c (expand_expr_real_1): Use function argument promotion rules
	for PARM_DECLs.

From-SVN: r110477
parent 1832d326
2006-02-01 Paul Brook <paul@codesourcery.com>
* function.c (assign_parm_setup_reg): Use function argument promotion
rules.
* expr.c (expand_expr_real_1): Use function argument promotion rules
for PARM_DECLs.
2006-02-01 Steve Ellcey <sje@cup.hp.com> 2006-02-01 Steve Ellcey <sje@cup.hp.com>
* gcc.c (process_command): Change j to 'unsigned int'. * gcc.c (process_command): Change j to 'unsigned int'.
......
...@@ -6774,7 +6774,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -6774,7 +6774,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
/* Get the signedness used for this variable. Ensure we get the /* Get the signedness used for this variable. Ensure we get the
same mode we got when the variable was declared. */ same mode we got when the variable was declared. */
pmode = promote_mode (type, DECL_MODE (exp), &unsignedp, pmode = promote_mode (type, DECL_MODE (exp), &unsignedp,
(TREE_CODE (exp) == RESULT_DECL ? 1 : 0)); (TREE_CODE (exp) == RESULT_DECL
|| TREE_CODE (exp) == PARM_DECL) ? 1 : 0);
gcc_assert (GET_MODE (DECL_RTL (exp)) == pmode); gcc_assert (GET_MODE (DECL_RTL (exp)) == pmode);
temp = gen_lowpart_SUBREG (mode, DECL_RTL (exp)); temp = gen_lowpart_SUBREG (mode, DECL_RTL (exp));
......
...@@ -2624,8 +2624,10 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm, ...@@ -2624,8 +2624,10 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
/* Store the parm in a pseudoregister during the function, but we may /* Store the parm in a pseudoregister during the function, but we may
need to do it in a wider mode. */ need to do it in a wider mode. */
/* This is not really promoting for a call. However we need to be
consistent with assign_parm_find_data_types and expand_expr_real_1. */
promoted_nominal_mode promoted_nominal_mode
= promote_mode (data->nominal_type, data->nominal_mode, &unsignedp, 0); = promote_mode (data->nominal_type, data->nominal_mode, &unsignedp, 1);
parmreg = gen_reg_rtx (promoted_nominal_mode); parmreg = gen_reg_rtx (promoted_nominal_mode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment