problem with emit-rtl.c change
Michael Hayes
m.hayes@elec.canterbury.ac.nz
Sun Jun 10 17:22:00 GMT 2001
Richard Henderson writes:
> On Mon, Jun 11, 2001 at 11:32:36AM +1200, Michael Hayes wrote:
> > - final_offset = byte % (GET_MODE_UNIT_SIZE (innermode) / 2);
> > + final_offset = byte % (GET_MODE_SIZE (innermode) / 2);
>
> No. The correct fix is to remove the /2.
OK, how about this:
Index: simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/simplify-rtx.c,v
retrieving revision 1.59
diff -c -3 -p -r1.59 simplify-rtx.c
*** simplify-rtx.c 2001/06/08 12:02:24 1.59
--- simplify-rtx.c 2001/06/11 00:13:13
*************** simplify_subreg (outermode, op, innermod
*** 2423,2433 ****
of real and imaginary part. */
if (GET_CODE (op) == CONCAT)
{
! int is_realpart = byte < GET_MODE_UNIT_SIZE (innermode) / 2;
rtx part = is_realpart ? XEXP (op, 0) : XEXP (op, 1);
unsigned int final_offset;
! final_offset = byte % (GET_MODE_UNIT_SIZE (innermode) / 2);
return simplify_subreg (outermode, part, GET_MODE (part), final_offset);
}
--- 2423,2433 ----
of real and imaginary part. */
if (GET_CODE (op) == CONCAT)
{
! int is_realpart = byte < GET_MODE_UNIT_SIZE (innermode);
rtx part = is_realpart ? XEXP (op, 0) : XEXP (op, 1);
unsigned int final_offset;
! final_offset = byte % (GET_MODE_UNIT_SIZE (innermode));
return simplify_subreg (outermode, part, GET_MODE (part), final_offset);
}
More information about the Gcc-patches
mailing list