Commit 9f5e2e11 by Richard Sandiford Committed by Richard Sandiford

expmed.c (store_bit_field): Don't search for an integer mode unless we need the result.

	* expmed.c (store_bit_field): Don't search for an integer mode
	unless we need the result.

From-SVN: r71819
parent 5581fc91
2003-09-26 Richard Sandiford <rsandifo@redhat.com>
* expmed.c (store_bit_field): Don't search for an integer mode
unless we need the result.
2003-09-26 Richard Sandiford <rsandifo@redhat.com>
* expr.c (emit_move_insn_1): If there is no move pattern for the
original mode, try using a pattern for the corresponding integer mode.
......
......@@ -461,6 +461,8 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
VOIDmode, because that is what store_field uses to indicate that this
is a bit field, but passing VOIDmode to operand_subword_force will
result in an abort. */
fieldmode = GET_MODE (value);
if (fieldmode == VOIDmode)
fieldmode = smallest_mode_for_size (nwords * BITS_PER_WORD, MODE_INT);
for (i = 0; i < nwords; i++)
......@@ -477,10 +479,7 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
store_bit_field (op0, MIN (BITS_PER_WORD,
bitsize - i * BITS_PER_WORD),
bitnum + bit_offset, word_mode,
operand_subword_force (value, wordnum,
(GET_MODE (value) == VOIDmode
? fieldmode
: GET_MODE (value))),
operand_subword_force (value, wordnum, fieldmode),
total_size);
}
return value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment