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]

[3.3 only] PATCH: fix target/18004


Applied to gcc-3_3-branch.

2005-04-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* Apply:
	2004-10-21  Aldy Hernandez  <aldyh@redhat.com>

	PR target/18004.
	* expmed.c (store_bit_field): Pass original 'value' before
	recursing.

Index: expmed.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expmed.c,v
retrieving revision 1.128.2.1
diff -p -r1.128.2.1 expmed.c
*** expmed.c	13 Jun 2003 00:32:28 -0000	1.128.2.1
--- expmed.c	30 Apr 2005 14:56:27 -0000
*************** store_bit_field (str_rtx, bitsize, bitnu
*** 299,304 ****
--- 299,305 ----
    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 (str_rtx, bitsize, bitnu
*** 532,537 ****
--- 533,539 ----
       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 (str_rtx, bitsize, bitnu
*** 598,604 ****
  	  /* 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,
  			   total_size);
  	  emit_move_insn (op0, tempreg);
  	  return value;
--- 600,606 ----
  	  /* 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,
  			   total_size);
  	  emit_move_insn (op0, tempreg);
  	  return value;


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