From 57fb21b0707a2f110b84f39db5d38246a20a6b6b Mon Sep 17 00:00:00 2001 From: aldyh Date: Tue, 26 Oct 2004 10:56:31 +0000 Subject: [PATCH] * expr.c (emit_group_load): Handle floats. (emit_group_store): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89579 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/expr.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c75df2bafc5..64fe9aba3d4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-10-26 Aldy Hernandez + + * expr.c (emit_group_load): Handle floats. + (emit_group_store): Same. + 2004-10-26 Nathan Sidwell * c-lex.c (get_nonpadding_token): Remove. diff --git a/gcc/expr.c b/gcc/expr.c index 7ee692ba544..e71c22f8df3 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1570,6 +1570,23 @@ emit_group_load (rtx dst, rtx orig_src, tree type ATTRIBUTE_UNUSED, int ssize) gcc_assert (GET_CODE (dst) == PARALLEL); + if (!SCALAR_INT_MODE_P (GET_MODE (orig_src))) + { + enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_src)); + if (imode == BLKmode) + src = assign_stack_temp (GET_MODE (orig_src), ssize, 0); + else + src = gen_reg_rtx (imode); + if (imode != BLKmode) + src = gen_lowpart (GET_MODE (orig_src), src); + emit_move_insn (src, orig_src); + /* ...and back again. */ + if (imode != BLKmode) + src = gen_lowpart (imode, src); + emit_group_load (dst, src, type, ssize); + return; + } + /* Check for a NULL entry, used to indicate that the parameter goes both on the stack and in registers. */ if (XEXP (XVECEXP (dst, 0, 0), 0)) @@ -1726,6 +1743,20 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize) gcc_assert (GET_CODE (src) == PARALLEL); + if (!SCALAR_INT_MODE_P (GET_MODE (orig_dst))) + { + enum machine_mode imode = int_mode_for_mode (GET_MODE (orig_dst)); + if (imode == BLKmode) + dst = assign_stack_temp (GET_MODE (orig_dst), ssize, 0); + else + dst = gen_reg_rtx (imode); + emit_group_store (dst, src, type, ssize); + if (imode != BLKmode) + dst = gen_lowpart (GET_MODE (orig_dst), dst); + emit_move_insn (orig_dst, dst); + return; + } + /* Check for a NULL entry, used to indicate that the parameter goes both on the stack and in registers. */ if (XEXP (XVECEXP (src, 0, 0), 0)) -- 2.11.0