diff options
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 7ac64c64437..8f0ba071364 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1,6 +1,6 @@ /* Medium-level subroutines: convert bit-field store and extract and shifts, multiplies and divides to rtl instructions. - Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc. This file is part of GNU CC. @@ -907,6 +907,8 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp, offset += SUBREG_WORD (op0); + inner_size = MIN (inner_size, BITS_PER_WORD); + if (BYTES_BIG_ENDIAN && (outer_size < inner_size)) { bitpos += inner_size - outer_size; @@ -1076,7 +1078,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp, { int xbitpos = bitpos, xoffset = offset; rtx bitsize_rtx, bitpos_rtx; - rtx last = get_last_insn(); + rtx last = get_last_insn (); rtx xop0 = op0; rtx xtarget = target; rtx xspec_target = spec_target; @@ -1140,7 +1142,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp, /* If op0 is a register, we need it in MAXMODE (which is usually SImode). to make it acceptable to the format of extzv. */ if (GET_CODE (xop0) == SUBREG && GET_MODE (xop0) != maxmode) - abort (); + goto extzv_loses; if (GET_CODE (xop0) == REG && GET_MODE (xop0) != maxmode) xop0 = gen_rtx_SUBREG (maxmode, xop0, 0); @@ -1216,7 +1218,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp, { int xbitpos = bitpos, xoffset = offset; rtx bitsize_rtx, bitpos_rtx; - rtx last = get_last_insn(); + rtx last = get_last_insn (); rtx xop0 = op0, xtarget = target; rtx xspec_target = spec_target; rtx xspec_target_subreg = spec_target_subreg; @@ -1274,7 +1276,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp, /* If op0 is a register, we need it in MAXMODE (which is usually SImode) to make it acceptable to the format of extv. */ if (GET_CODE (xop0) == SUBREG && GET_MODE (xop0) != maxmode) - abort (); + goto extv_loses; if (GET_CODE (xop0) == REG && GET_MODE (xop0) != maxmode) xop0 = gen_rtx_SUBREG (maxmode, xop0, 0); |