real_to_target (data, &d, mode);
/* Put out the first word with the specified alignment. */
+ unsigned int chunk_nunits = MIN (nunits, units_per);
if (reverse)
elt = flip_storage_order (SImode, gen_int_mode (data[nelts - 1], SImode));
else
- elt = GEN_INT (data[0]);
- assemble_integer (elt, MIN (nunits, units_per), align, 1);
- nunits -= units_per;
+ elt = GEN_INT (sext_hwi (data[0], chunk_nunits * BITS_PER_UNIT));
+ assemble_integer (elt, chunk_nunits, align, 1);
+ nunits -= chunk_nunits;
/* Subsequent words need only 32-bit alignment. */
align = min_align (align, 32);
for (int i = 1; i < nelts; i++)
{
+ chunk_nunits = MIN (nunits, units_per);
if (reverse)
elt = flip_storage_order (SImode,
gen_int_mode (data[nelts - 1 - i], SImode));
else
- elt = GEN_INT (data[i]);
- assemble_integer (elt, MIN (nunits, units_per), align, 1);
- nunits -= units_per;
+ elt = GEN_INT (sext_hwi (data[i], chunk_nunits * BITS_PER_UNIT));
+ assemble_integer (elt, chunk_nunits, align, 1);
+ nunits -= chunk_nunits;
}
}
\f