aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index cb294bb..edcd7e8 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2628,9 +2628,10 @@ copy_blkmode_from_reg (rtx target, rtx srcreg, tree type)
rtx src = NULL, dst = NULL;
unsigned HOST_WIDE_INT bitsize = MIN (TYPE_ALIGN (type), BITS_PER_WORD);
unsigned HOST_WIDE_INT bitpos, xbitpos, padding_correction = 0;
- machine_mode mode = GET_MODE (srcreg);
- machine_mode tmode = GET_MODE (target);
- machine_mode copy_mode;
+ /* No current ABI uses variable-sized modes to pass a BLKmnode type. */
+ fixed_size_mode mode = as_a <fixed_size_mode> (GET_MODE (srcreg));
+ fixed_size_mode tmode = as_a <fixed_size_mode> (GET_MODE (target));
+ fixed_size_mode copy_mode;
/* BLKmode registers created in the back-end shouldn't have survived. */
gcc_assert (mode != BLKmode);
@@ -2728,19 +2729,21 @@ copy_blkmode_from_reg (rtx target, rtx srcreg, tree type)
}
}
-/* Copy BLKmode value SRC into a register of mode MODE. Return the
+/* Copy BLKmode value SRC into a register of mode MODE_IN. Return the
register if it contains any data, otherwise return null.
This is used on targets that return BLKmode values in registers. */
rtx
-copy_blkmode_to_reg (machine_mode mode, tree src)
+copy_blkmode_to_reg (machine_mode mode_in, tree src)
{
int i, n_regs;
unsigned HOST_WIDE_INT bitpos, xbitpos, padding_correction = 0, bytes;
unsigned int bitsize;
rtx *dst_words, dst, x, src_word = NULL_RTX, dst_word = NULL_RTX;
- machine_mode dst_mode;
+ /* No current ABI uses variable-sized modes to pass a BLKmnode type. */
+ fixed_size_mode mode = as_a <fixed_size_mode> (mode_in);
+ fixed_size_mode dst_mode;
gcc_assert (TYPE_MODE (TREE_TYPE (src)) == BLKmode);