Commit 374de9e2 by Richard Kenner

(extract_fixed_bit_field): For REG case, compute total_bits from mode

instead of assuming BITS_PER_WORD.

From-SVN: r9865
parent 5d36722d
...@@ -1362,7 +1362,7 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos, ...@@ -1362,7 +1362,7 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos,
int unsignedp; int unsignedp;
int align; int align;
{ {
int total_bits = BITS_PER_WORD; int total_bits;
enum machine_mode mode; enum machine_mode mode;
if (GET_CODE (op0) == SUBREG || GET_CODE (op0) == REG) if (GET_CODE (op0) == SUBREG || GET_CODE (op0) == REG)
...@@ -1371,6 +1371,9 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos, ...@@ -1371,6 +1371,9 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos,
if (bitsize + bitpos > BITS_PER_WORD) if (bitsize + bitpos > BITS_PER_WORD)
return extract_split_bit_field (op0, bitsize, bitpos, return extract_split_bit_field (op0, bitsize, bitpos,
unsignedp, align); unsignedp, align);
mode = GET_MODE (op0);
total_bits = GET_MODE_BITSIZE (mode);
} }
else else
{ {
...@@ -1411,8 +1414,6 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos, ...@@ -1411,8 +1414,6 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos,
plus_constant (XEXP (op0, 0), offset)); plus_constant (XEXP (op0, 0), offset));
} }
mode = GET_MODE (op0);
if (BYTES_BIG_ENDIAN) if (BYTES_BIG_ENDIAN)
{ {
/* BITPOS is the distance between our msb and that of OP0. /* BITPOS is the distance between our msb and that of 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