+2007-12-19 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * tree.h (set_decl_incoming_rtl): Add a by_reference_p parameter.
+ * emit-rtl.c (set_decl_incoming_rtl): Likewise. Don't set the
+ rtl's register attributes when the parameter is true.
+ * function.c (assign_parms_unsplit_complex, assign_parms)
+ (expand_function_start): Update calls to set_decl_incoming_rtl.
+
2007-12-19 Richard Sandiford <rsandifo@nildram.co.uk>
* rtl.def (SUBREG): Update comments.
set_reg_attrs_for_decl_rtl (t, x);
}
-/* Assign the RTX X to parameter declaration T. */
+/* Assign the RTX X to parameter declaration T. BY_REFERENCE_P is true
+ if the ABI requires the parameter to be passed by reference. */
void
-set_decl_incoming_rtl (tree t, rtx x)
+set_decl_incoming_rtl (tree t, rtx x, bool by_reference_p)
{
DECL_INCOMING_RTL (t) = x;
- if (x)
+ if (x && !by_reference_p)
set_reg_attrs_for_decl_rtl (t, x);
}
imag = gen_lowpart_SUBREG (inner, imag);
}
tmp = gen_rtx_CONCAT (DECL_MODE (parm), real, imag);
- set_decl_incoming_rtl (parm, tmp);
+ set_decl_incoming_rtl (parm, tmp, false);
fnargs = TREE_CHAIN (fnargs);
}
else
{
SET_DECL_RTL (parm, DECL_RTL (fnargs));
- set_decl_incoming_rtl (parm, DECL_INCOMING_RTL (fnargs));
+ set_decl_incoming_rtl (parm, DECL_INCOMING_RTL (fnargs), false);
/* Set MEM_EXPR to the original decl, i.e. to PARM,
instead of the copy of decl, i.e. FNARGS. */
}
/* Record permanently how this parm was passed. */
- set_decl_incoming_rtl (parm, data.entry_parm);
+ set_decl_incoming_rtl (parm, data.entry_parm, data.passed_pointer);
/* Update info on where next arg arrives in registers. */
FUNCTION_ARG_ADVANCE (all.args_so_far, data.promoted_mode,
tree parm = cfun->static_chain_decl;
rtx local = gen_reg_rtx (Pmode);
- set_decl_incoming_rtl (parm, static_chain_incoming_rtx);
+ set_decl_incoming_rtl (parm, static_chain_incoming_rtx, false);
SET_DECL_RTL (parm, local);
mark_reg_pointer (local, TYPE_ALIGN (TREE_TYPE (TREE_TYPE (parm))));
/* Assign the RTX to declaration. */
extern void set_decl_rtl (tree, rtx);
-extern void set_decl_incoming_rtl (tree, rtx);
+extern void set_decl_incoming_rtl (tree, rtx, bool);
\f
/* Enum and arrays used for tree allocation stats.
Keep in sync with tree.c:tree_node_kind_names. */