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]

Re: pic problem on the x86


On Mon, Feb 15, 1999 at 06:48:32PM +0000, Graham wrote:
> > > >         * i386.c (legitimate_pic_address_disp_p): Remove static.
> > > >         * i386.h (LEGITIMATE_PIC_OPERAND_P): Use it instead of
> > > >         open-coding cases.
> >
> > I disbelieve this is the cause.  I've had this patch applied to
> > a Cygnus branch since November sometime.  I actually thought the
> > patch had already been in egcs.
> > 
> > Tracking the real culprit now.

The real problem is that gas is lame and does not recognize @GOTOFF
except in a memory context, and so generates incorrect relocations.

The problem is excacerbated by a tiny bit of lameness in addsi3.
Fixing that allows lea in the right place and a complete bootstrap.


r~


	* i386.md (addsi3): Allow lea for any constant_p.

Index: i386.md
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.48
diff -c -p -d -r1.48 i386.md
*** i386.md	1999/02/02 19:06:58	1.48
--- i386.md	1999/02/16 00:12:17
***************
*** 3055,3061 ****
    "*
  {
    if (REG_P (operands[0]) && REG_P (operands[1])
!       && (REG_P (operands[2]) || GET_CODE (operands[2]) == CONST_INT)
        && REGNO (operands[0]) != REGNO (operands[1]))
      {
        if (REG_P (operands[2]) && REGNO (operands[0]) == REGNO (operands[2]))
--- 3055,3061 ----
    "*
  {
    if (REG_P (operands[0]) && REG_P (operands[1])
!       && (REG_P (operands[2]) || CONSTANT_P (operands[2]))
        && REGNO (operands[0]) != REGNO (operands[1]))
      {
        if (REG_P (operands[2]) && REGNO (operands[0]) == REGNO (operands[2]))


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