flow.c:initialize_uninitialized_subregs
Andrew Macleod
amacleod@cygnus.com
Thu Dec 6 06:34:00 GMT 2001
>> > failing at its purpose according to the ChangeLog, and that
>> > find_regno_partial needs to dig a little deeper or something.
>> >
>> > Possibly like this (untested as yet) patch:
>>
>> Yes, that did the trick. rtl now looks like it's doing what was
>> intended, and powerpc-linux bootstrap restored.
>>
>> OK to apply?
>>
>> > * flow.c (find_regno_partial): Return the reg rtx within the
>> > partial reg rtx.
>> >
>> > --- gcc/flow.c~ Wed Dec 5 14:35:03 2001
>> > +++ gcc/flow.c Thu Dec 6 21:57:37 2001
>> > @@ -1327,7 +1327,7 @@ find_regno_partial (ptr, data)
>> > case STRICT_LOW_PART:
>> > if (GET_CODE (XEXP (*ptr, 0)) == REG && REGNO (XEXP (*ptr, 0)) == reg)
>> > {
>> > - param->retval = *ptr;
>> > + param->retval = XEXP (*ptr, 0);
>> > return 1;
>> > }
>> > break;
>> > @@ -1336,7 +1336,7 @@ find_regno_partial (ptr, data)
>> > if (GET_CODE (SUBREG_REG (*ptr)) == REG
>> > && REGNO (SUBREG_REG (*ptr)) == reg)
>> > {
>> > - param->retval = *ptr;
>> > + param->retval = SUBREG_REG (*ptr);
>> > return 1;
>> > }
>> > break;
>> >
David Edelsohn pointed out the failure yesterday afternoon , and I responded with
the following identical patch which he verified solved the problem. What I didnt
notice was that he sent it to the gcc newsgroup rather than bugs/patches. Im
checking this in since it was the original intent and the final patch was suppose
to be this way.
Unfortunately, it bootstrapped on x86 and ia64 both ways....
Andrew
* flow.c (find_regno_partial): Return register, not the expression
the register is in.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.494
diff -c -p -r1.494 flow.c
*** flow.c 2001/12/05 01:39:41 1.494
--- flow.c 2001/12/05 20:50:13
*************** find_regno_partial (ptr, data)
*** 1327,1333 ****
case STRICT_LOW_PART:
if (GET_CODE (XEXP (*ptr, 0)) == REG && REGNO (XEXP (*ptr, 0)) == reg)
{
! param->retval = *ptr;
return 1;
}
break;
--- 1327,1333 ----
case STRICT_LOW_PART:
if (GET_CODE (XEXP (*ptr, 0)) == REG && REGNO (XEXP (*ptr, 0)) == reg)
{
! param->retval = XEXP (*ptr, 0);
return 1;
}
break;
*************** find_regno_partial (ptr, data)
*** 1336,1342 ****
if (GET_CODE (SUBREG_REG (*ptr)) == REG
&& REGNO (SUBREG_REG (*ptr)) == reg)
{
! param->retval = *ptr;
return 1;
}
break;
--- 1336,1342 ----
if (GET_CODE (SUBREG_REG (*ptr)) == REG
&& REGNO (SUBREG_REG (*ptr)) == reg)
{
! param->retval = SUBREG_REG (*ptr);
return 1;
}
break;
More information about the Gcc-patches
mailing list