Commit 64191612 by Michael Meissner

Get correct bit offset for big endian (SUBREG (REG))

From-SVN: r9299
parent faae18ab
......@@ -878,7 +878,21 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
tmode = mode;
while (GET_CODE (op0) == SUBREG)
{
int outer_size = GET_MODE_BITSIZE (GET_MODE (op0));
int inner_size = GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0)));
offset += SUBREG_WORD (op0);
if (BYTES_BIG_ENDIAN && (outer_size < inner_size))
{
bitpos += inner_size - outer_size;
if (bitpos > unit)
{
offset += (bitpos / unit);
bitpos %= unit;
}
}
op0 = SUBREG_REG (op0);
}
......
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