diff options
author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-19 08:00:47 +0000 |
---|---|---|
committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-19 08:00:47 +0000 |
commit | 1b4f3c7d744bb145140882ae69a71cf5797429f1 (patch) | |
tree | 43f9837f093327787b72ce5686f6ccd74f396df6 /gcc/function.c | |
parent | c03c43365d69335ab5c4d0d2ea94dd0a099e6488 (diff) | |
download | gcc-1b4f3c7d744bb145140882ae69a71cf5797429f1.tar.gz |
* function.c (assign_parms): When building decl_rtl for
SPLIT_COMPLEX_ARGS, ensure inner modes of concat match outer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/gcc/function.c b/gcc/function.c index bbb9a51b067..3991ff841fe 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5231,15 +5231,27 @@ assign_parms (tree fndecl) { if (TREE_CODE (TREE_TYPE (parm)) == COMPLEX_TYPE) { - rtx tmp; - - SET_DECL_RTL (parm, - gen_rtx_CONCAT (DECL_MODE (parm), - DECL_RTL (fnargs), - DECL_RTL (TREE_CHAIN (fnargs)))); - tmp = gen_rtx_CONCAT (DECL_MODE (parm), - DECL_INCOMING_RTL (fnargs), - DECL_INCOMING_RTL (TREE_CHAIN (fnargs))); + rtx tmp, real, imag; + enum machine_mode inner = GET_MODE_INNER (DECL_MODE (parm)); + + real = DECL_RTL (fnargs); + imag = DECL_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_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); fnargs = TREE_CHAIN (fnargs); } |