summaryrefslogtreecommitdiffstats
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-06-01 22:51:41 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-06-01 22:51:41 +0000
commit1abfcb049bf34275190b17a713bcde1b89007897 (patch)
tree54ddc1948e0ed9c4b56c5a44ee5fdcc581f388f4 /gcc/expmed.c
parent05a08d74d3c89e36ce79419fed961413bf80b2e6 (diff)
downloadppe42-gcc-1abfcb049bf34275190b17a713bcde1b89007897.tar.gz
ppe42-gcc-1abfcb049bf34275190b17a713bcde1b89007897.zip
(extract_fixed_bit_field): For REG case, compute total_bits from mode
instead of assuming BITS_PER_WORD. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9865 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index bf5b6527350..b6f6d82748a 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -1362,7 +1362,7 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos,
int unsignedp;
int align;
{
- int total_bits = BITS_PER_WORD;
+ int total_bits;
enum machine_mode mode;
if (GET_CODE (op0) == SUBREG || GET_CODE (op0) == REG)
@@ -1371,6 +1371,9 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos,
if (bitsize + bitpos > BITS_PER_WORD)
return extract_split_bit_field (op0, bitsize, bitpos,
unsignedp, align);
+
+ mode = GET_MODE (op0);
+ total_bits = GET_MODE_BITSIZE (mode);
}
else
{
@@ -1411,8 +1414,6 @@ extract_fixed_bit_field (tmode, op0, offset, bitsize, bitpos,
plus_constant (XEXP (op0, 0), offset));
}
- mode = GET_MODE (op0);
-
if (BYTES_BIG_ENDIAN)
{
/* BITPOS is the distance between our msb and that of OP0.
OpenPOWER on IntegriCloud