aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1994-11-28 22:44:19 -0700
committerJeff Law <law@gcc.gnu.org>1994-11-28 22:44:19 -0700
commitaaf87c453b384b20e54af789db76ce14021dbfdd (patch)
treea88b47a0d06d6bba653fbdb7f5ceb858bc375ded
parent766b19fbaf036bf39cdab2f966737bcbdffd0d12 (diff)
downloadgcc-aaf87c453b384b20e54af789db76ce14021dbfdd.zip
gcc-aaf87c453b384b20e54af789db76ce14021dbfdd.tar.gz
gcc-aaf87c453b384b20e54af789db76ce14021dbfdd.tar.bz2
expr.c (expand_assignment): For BLKmode structure returns...
* expr.c (expand_assignment): For BLKmode structure returns, copy the return value from registers into the target memory locations. From-SVN: r8575
-rw-r--r--gcc/expr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index d372692..57bf2ea 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2549,7 +2549,14 @@ expand_assignment (to, from, want_value, suggest_reg)
value = expand_expr (from, NULL_RTX, VOIDmode, 0);
if (to_rtx == 0)
to_rtx = expand_expr (to, NULL_RTX, VOIDmode, 0);
- emit_move_insn (to_rtx, value);
+
+ if (GET_MODE (to_rtx) == BLKmode)
+ {
+ int align = MIN (TYPE_ALIGN (TREE_TYPE (from)), BITS_PER_WORD);
+ emit_block_move (to_rtx, value, expr_size (from), align);
+ }
+ else
+ emit_move_insn (to_rtx, value);
preserve_temp_slots (to_rtx);
free_temp_slots ();
pop_temp_slots ();