mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-20 01:25:03 +08:00
function.c (assign_parms): Convert arguments passed by reference to the right mode.
* function.c (assign_parms): Convert arguments passed by reference to the right mode. From-SVN: r38528
This commit is contained in:
parent
fb8b656c65
commit
f523247a94
@ -1,3 +1,8 @@
|
||||
2000-12-29 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* function.c (assign_parms): Convert arguments passed by
|
||||
reference to the right mode.
|
||||
|
||||
2000-12-28 Geoffrey Keating <geoffk@redhat.com>
|
||||
|
||||
* c-parse.in (select_or_iter_stmt): Use truthvalue_conversion
|
||||
|
@ -4726,7 +4726,22 @@ assign_parms (fndecl)
|
||||
Pmode above. We must use the actual mode of the parm. */
|
||||
parmreg = gen_reg_rtx (TYPE_MODE (TREE_TYPE (parm)));
|
||||
mark_user_reg (parmreg);
|
||||
emit_move_insn (parmreg, DECL_RTL (parm));
|
||||
if (GET_MODE (parmreg) != GET_MODE (DECL_RTL (parm)))
|
||||
{
|
||||
rtx tempreg = gen_reg_rtx (GET_MODE (DECL_RTL (parm)));
|
||||
|
||||
push_to_sequence (conversion_insns);
|
||||
emit_move_insn (tempreg, DECL_RTL (parm));
|
||||
DECL_RTL (parm)
|
||||
= convert_to_mode (GET_MODE (parmreg), tempreg,
|
||||
TREE_UNSIGNED (TREE_TYPE (parm)));
|
||||
emit_move_insn (parmreg, DECL_RTL (parm));
|
||||
conversion_insns = get_insns();
|
||||
did_conversion = 1;
|
||||
end_sequence ();
|
||||
}
|
||||
else
|
||||
emit_move_insn (parmreg, DECL_RTL (parm));
|
||||
DECL_RTL (parm) = parmreg;
|
||||
/* STACK_PARM is the pointer, not the parm, and PARMREG is
|
||||
now the parm. */
|
||||
|
Loading…
Reference in New Issue
Block a user