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>
|
2005-11-14 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
* config/arm/arm.c (pic_labelno): New.
|
* config/arm/arm.c (pic_labelno): New.
|
||||||
|
15
gcc/expmed.c
15
gcc/expmed.c
@ -429,15 +429,12 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
|||||||
: (! SLOW_UNALIGNED_ACCESS (fieldmode, MEM_ALIGN (op0))
|
: (! SLOW_UNALIGNED_ACCESS (fieldmode, MEM_ALIGN (op0))
|
||||||
|| (offset * BITS_PER_UNIT % bitsize == 0
|
|| (offset * BITS_PER_UNIT % bitsize == 0
|
||||||
&& MEM_ALIGN (op0) % GET_MODE_BITSIZE (fieldmode) == 0))))
|
&& MEM_ALIGN (op0) % GET_MODE_BITSIZE (fieldmode) == 0))))
|
||||||
{
|
|
||||||
if (GET_MODE (op0) != fieldmode)
|
|
||||||
{
|
{
|
||||||
if (MEM_P (op0))
|
if (MEM_P (op0))
|
||||||
op0 = adjust_address (op0, fieldmode, offset);
|
op0 = adjust_address (op0, fieldmode, offset);
|
||||||
else
|
else if (GET_MODE (op0) != fieldmode)
|
||||||
op0 = simplify_gen_subreg (fieldmode, op0, GET_MODE (op0),
|
op0 = simplify_gen_subreg (fieldmode, op0, GET_MODE (op0),
|
||||||
byte_offset);
|
byte_offset);
|
||||||
}
|
|
||||||
emit_move_insn (op0, value);
|
emit_move_insn (op0, value);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@ -1410,6 +1407,11 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
|||||||
xbitpos = bitnum % unit;
|
xbitpos = bitnum % unit;
|
||||||
xop0 = adjust_address (xop0, bestmode, xoffset);
|
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. */
|
/* Fetch it to a register in that size. */
|
||||||
xop0 = force_reg (bestmode, xop0);
|
xop0 = force_reg (bestmode, xop0);
|
||||||
|
|
||||||
@ -1539,6 +1541,11 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
|||||||
xbitpos = bitnum % unit;
|
xbitpos = bitnum % unit;
|
||||||
xop0 = adjust_address (xop0, bestmode, xoffset);
|
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. */
|
/* Fetch it to a register in that size. */
|
||||||
xop0 = force_reg (bestmode, xop0);
|
xop0 = force_reg (bestmode, xop0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user