aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2004-10-26 10:56:31 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2004-10-26 10:56:31 +0000
commit782fa603f90e9aebe57c1c252b99892cee8eb7e4 (patch)
treea99ecf57445660a6ada62dd6d1c43240fb68f89d /gcc/expr.c
parentea0ffdd2601e6a2807ac75bd9eea9c6d7a609e91 (diff)
downloadgcc-782fa603f90e9aebe57c1c252b99892cee8eb7e4.zip
gcc-782fa603f90e9aebe57c1c252b99892cee8eb7e4.tar.gz
gcc-782fa603f90e9aebe57c1c252b99892cee8eb7e4.tar.bz2
expr.c (emit_group_load): Handle floats.
* expr.c (emit_group_load): Handle floats. (emit_group_store): Same. From-SVN: r89579
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 7ee692b..e71c22f 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))