Commit 4d9cfc7b by Richard Kenner

(expand_field_assignment): Take SUBREG_WORD into account when have STRICT_LOW_PART.

(expand_field_assignment): Take SUBREG_WORD into account when have
STRICT_LOW_PART.
(make_extraction): Make a STRICT_LOW_PART at any low-order word.

From-SVN: r11775
parent cf440348
...@@ -4957,7 +4957,7 @@ expand_field_assignment (x) ...@@ -4957,7 +4957,7 @@ expand_field_assignment (x)
{ {
inner = SUBREG_REG (XEXP (SET_DEST (x), 0)); inner = SUBREG_REG (XEXP (SET_DEST (x), 0));
len = GET_MODE_BITSIZE (GET_MODE (XEXP (SET_DEST (x), 0))); len = GET_MODE_BITSIZE (GET_MODE (XEXP (SET_DEST (x), 0)));
pos = const0_rtx; pos = GEN_INT (BITS_PER_WORD * SUBREG_WORD (XEXP (SET_DEST (x), 0)));
} }
else if (GET_CODE (SET_DEST (x)) == ZERO_EXTRACT else if (GET_CODE (SET_DEST (x)) == ZERO_EXTRACT
&& GET_CODE (XEXP (SET_DEST (x), 1)) == CONST_INT) && GET_CODE (XEXP (SET_DEST (x), 1)) == CONST_INT)
...@@ -5133,7 +5133,8 @@ make_extraction (mode, inner, pos, pos_rtx, len, ...@@ -5133,7 +5133,8 @@ make_extraction (mode, inner, pos, pos_rtx, len,
if (tmode != BLKmode if (tmode != BLKmode
&& ! (spans_byte && inner_mode != tmode) && ! (spans_byte && inner_mode != tmode)
&& ((pos_rtx == 0 && pos == 0 && GET_CODE (inner) != MEM && ((pos_rtx == 0 && (pos % BITS_PER_WORD) == 0
&& GET_CODE (inner) != MEM
&& (! in_dest && (! in_dest
|| (GET_CODE (inner) == REG || (GET_CODE (inner) == REG
&& (movstrict_optab->handlers[(int) tmode].insn_code && (movstrict_optab->handlers[(int) tmode].insn_code
...@@ -5153,8 +5154,8 @@ make_extraction (mode, inner, pos, pos_rtx, len, ...@@ -5153,8 +5154,8 @@ make_extraction (mode, inner, pos, pos_rtx, len,
field. If the original and current mode are the same, we need not field. If the original and current mode are the same, we need not
adjust the offset. Otherwise, we do if bytes big endian. adjust the offset. Otherwise, we do if bytes big endian.
If INNER is not a MEM, get a piece consisting of the just the field If INNER is not a MEM, get a piece consisting of just the field
of interest (in this case POS must be 0). */ of interest (in this case POS % BITS_PER_WORD must be 0). */
if (GET_CODE (inner) == MEM) if (GET_CODE (inner) == MEM)
{ {
...@@ -5178,10 +5179,11 @@ make_extraction (mode, inner, pos, pos_rtx, len, ...@@ -5178,10 +5179,11 @@ make_extraction (mode, inner, pos, pos_rtx, len,
new = gen_rtx (SUBREG, tmode, inner, new = gen_rtx (SUBREG, tmode, inner,
(WORDS_BIG_ENDIAN (WORDS_BIG_ENDIAN
&& GET_MODE_SIZE (inner_mode) > UNITS_PER_WORD && GET_MODE_SIZE (inner_mode) > UNITS_PER_WORD
? ((GET_MODE_SIZE (inner_mode) ? (((GET_MODE_SIZE (inner_mode)
- GET_MODE_SIZE (tmode)) - GET_MODE_SIZE (tmode))
/ UNITS_PER_WORD) / UNITS_PER_WORD)
: 0)); - pos / BITS_PER_WORD)
: pos / BITS_PER_WORD));
else else
new = inner; new = inner;
} }
......
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