aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/expmed.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 30a6112..f9193fd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2012-11-20 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR middle-end/55403
+ PR middle-end/55391
+ * expmed.c (store_bit_field_1): Use adjust_bitfield_address_size
+ rather than adjust_bitfield_address to change the mode of a reference.
+ (extract_bit_field_1): Likewise.
+
2012-11-20 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (movdf_hardfloat32): Add a comment
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 752aecd..11f1550 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -645,7 +645,7 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
if (imode != GET_MODE (op0))
{
if (MEM_P (op0))
- op0 = adjust_bitfield_address (op0, imode, 0);
+ op0 = adjust_bitfield_address_size (op0, imode, 0, MEM_SIZE (op0));
else
{
gcc_assert (imode != BLKmode);
@@ -1380,7 +1380,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
if (imode != GET_MODE (op0))
{
if (MEM_P (op0))
- op0 = adjust_bitfield_address (op0, imode, 0);
+ op0 = adjust_bitfield_address_size (op0, imode, 0, MEM_SIZE (op0));
else if (imode != BLKmode)
{
op0 = gen_lowpart (imode, op0);
@@ -1403,10 +1403,10 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
}
else
{
- rtx mem = assign_stack_temp (GET_MODE (op0),
- GET_MODE_SIZE (GET_MODE (op0)));
+ HOST_WIDE_INT size = GET_MODE_SIZE (GET_MODE (op0));
+ rtx mem = assign_stack_temp (GET_MODE (op0), size);
emit_move_insn (mem, op0);
- op0 = adjust_bitfield_address (mem, BLKmode, 0);
+ op0 = adjust_bitfield_address_size (mem, BLKmode, 0, size);
}
}
}