expmed.c (store_bit_field): Add offset unconditionally for memory targets.
2005-11-14 Dale Johannesen <dalej@apple.com> * expmed.c (store_bit_field): Add offset unconditionally for memory targets. (extract_bit_field): Don't force extzv or extv operand into a register if field is too big. From-SVN: r106919
This commit is contained in:
parent
53acd3845f
commit
69498c64a3
@ -1,3 +1,10 @@
|
||||
2005-11-14 Dale Johannesen <dalej@apple.com>
|
||||
|
||||
* expmed.c (store_bit_field): Add offset unconditionally for
|
||||
memory targets.
|
||||
(extract_bit_field): Don't force extzv or extv operand into
|
||||
a register if field is too big.
|
||||
|
||||
2005-11-14 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* config/arm/arm.c (pic_labelno): New.
|
||||
|
23
gcc/expmed.c
23
gcc/expmed.c
@ -430,14 +430,11 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
||||
|| (offset * BITS_PER_UNIT % bitsize == 0
|
||||
&& MEM_ALIGN (op0) % GET_MODE_BITSIZE (fieldmode) == 0))))
|
||||
{
|
||||
if (GET_MODE (op0) != fieldmode)
|
||||
{
|
||||
if (MEM_P (op0))
|
||||
op0 = adjust_address (op0, fieldmode, offset);
|
||||
else
|
||||
op0 = simplify_gen_subreg (fieldmode, op0, GET_MODE (op0),
|
||||
byte_offset);
|
||||
}
|
||||
if (MEM_P (op0))
|
||||
op0 = adjust_address (op0, fieldmode, offset);
|
||||
else if (GET_MODE (op0) != fieldmode)
|
||||
op0 = simplify_gen_subreg (fieldmode, op0, GET_MODE (op0),
|
||||
byte_offset);
|
||||
emit_move_insn (op0, value);
|
||||
return value;
|
||||
}
|
||||
@ -1410,6 +1407,11 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
||||
xbitpos = bitnum % unit;
|
||||
xop0 = adjust_address (xop0, bestmode, xoffset);
|
||||
|
||||
/* Make sure register is big enough for the whole field. */
|
||||
if (xoffset * BITS_PER_UNIT + unit
|
||||
< offset * BITS_PER_UNIT + bitsize)
|
||||
goto extzv_loses;
|
||||
|
||||
/* Fetch it to a register in that size. */
|
||||
xop0 = force_reg (bestmode, xop0);
|
||||
|
||||
@ -1539,6 +1541,11 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
||||
xbitpos = bitnum % unit;
|
||||
xop0 = adjust_address (xop0, bestmode, xoffset);
|
||||
|
||||
/* Make sure register is big enough for the whole field. */
|
||||
if (xoffset * BITS_PER_UNIT + unit
|
||||
< offset * BITS_PER_UNIT + bitsize)
|
||||
goto extv_loses;
|
||||
|
||||
/* Fetch it to a register in that size. */
|
||||
xop0 = force_reg (bestmode, xop0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user