Commit 196c42cd by Alan Modra Committed by Alan Modra

function.c (assign_parms): When building decl_rtl for SPLIT_COMPLEX_ARGS...

	* function.c (assign_parms): When building decl_rtl for
	SPLIT_COMPLEX_ARGS, ensure inner modes of concat match outer.

From-SVN: r78079
parent 9188db2d
2004-02-19 Alan Modra <amodra@bigpond.net.au>
* function.c (assign_parms): When building decl_rtl for
SPLIT_COMPLEX_ARGS, ensure inner modes of concat match outer.
2004-02-19 Olivier Hainque <hainque@act-europe.fr> 2004-02-19 Olivier Hainque <hainque@act-europe.fr>
* expr.c (is_aligning_offset): Check if we are aligning the * expr.c (is_aligning_offset): Check if we are aligning the
......
...@@ -5231,15 +5231,27 @@ assign_parms (tree fndecl) ...@@ -5231,15 +5231,27 @@ assign_parms (tree fndecl)
{ {
if (TREE_CODE (TREE_TYPE (parm)) == COMPLEX_TYPE) if (TREE_CODE (TREE_TYPE (parm)) == COMPLEX_TYPE)
{ {
rtx tmp; rtx tmp, real, imag;
enum machine_mode inner = GET_MODE_INNER (DECL_MODE (parm));
SET_DECL_RTL (parm,
gen_rtx_CONCAT (DECL_MODE (parm), real = DECL_RTL (fnargs);
DECL_RTL (fnargs), imag = DECL_RTL (TREE_CHAIN (fnargs));
DECL_RTL (TREE_CHAIN (fnargs)))); if (inner != GET_MODE (real))
tmp = gen_rtx_CONCAT (DECL_MODE (parm), {
DECL_INCOMING_RTL (fnargs), real = gen_lowpart_SUBREG (inner, real);
DECL_INCOMING_RTL (TREE_CHAIN (fnargs))); imag = gen_lowpart_SUBREG (inner, imag);
}
tmp = gen_rtx_CONCAT (DECL_MODE (parm), real, imag);
SET_DECL_RTL (parm, tmp);
real = DECL_INCOMING_RTL (fnargs);
imag = DECL_INCOMING_RTL (TREE_CHAIN (fnargs));
if (inner != GET_MODE (real))
{
real = gen_lowpart_SUBREG (inner, real);
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);
fnargs = TREE_CHAIN (fnargs); fnargs = TREE_CHAIN (fnargs);
} }
......
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