This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rfc: constant pool and floats



On 18/10/2004, at 12:44 PM, Aldy Hernandez wrote:


Aha! So it should not do that. I think the right thing to do is to
pass the original VALUE here, but if that doesn't work, try passing the
mode of VALUE instead of FIELDMODE (the mode of VALUE is the mode that
got passed to gen_lowpart).

Neato. Passing the original value does the trick.


Bootstraped on powerpc-linux.

OK, pending on tests completion?

This is OK.


Aldy

	* expmed.c (store_bit_field): Pass original 'value' before
	recursing.

Index: expmed.c
===================================================================
RCS file: /cvs/uberbaum/gcc/expmed.c,v
retrieving revision 1.198
diff -c -p -r1.198 expmed.c
*** expmed.c	7 Oct 2004 05:56:51 -0000	1.198
--- expmed.c	18 Oct 2004 19:42:03 -0000
*************** store_bit_field (rtx str_rtx, unsigned H
*** 338,343 ****
--- 338,344 ----
    unsigned HOST_WIDE_INT bitpos = bitnum % unit;
    rtx op0 = str_rtx;
    int byte_offset;
+   rtx orig_value;

enum machine_mode op_mode = mode_for_extraction (EP_insv, 3);

*************** store_bit_field (rtx str_rtx, unsigned H
*** 601,606 ****
--- 602,608 ----
corresponding size. This can occur on a machine with 64 bit registers
that uses SFmode for float. This can also occur for unaligned float
structure fields. */
+ orig_value = value;
if (GET_MODE_CLASS (GET_MODE (value)) != MODE_INT
&& GET_MODE_CLASS (GET_MODE (value)) != MODE_PARTIAL_INT)
value = gen_lowpart ((GET_MODE (value) == VOIDmode
*************** store_bit_field (rtx str_rtx, unsigned H
*** 667,673 ****
/* Fetch that unit, store the bitfield in it, then store
the unit. */
tempreg = copy_to_reg (op0);
! store_bit_field (tempreg, bitsize, bitpos, fieldmode, value);
emit_move_insn (op0, tempreg);
return value;
}
--- 669,675 ----
/* Fetch that unit, store the bitfield in it, then store
the unit. */
tempreg = copy_to_reg (op0);
! store_bit_field (tempreg, bitsize, bitpos, fieldmode, orig_value);
emit_move_insn (op0, tempreg);
return value;
}

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]