This is the mail archive of the gcc-bugs@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: x86-64 bootstrap fails on mainline


> On Fri, May 24, 2002 at 08:46:15AM +0200, Andreas Jaeger wrote:
> >    45         cmpq    $0, __cxa_finalize@GOTPCREL(%RIP)(%rip)
> >    89         cmpq    $0, _Jv_RegisterClasses@GOTPCREL(%RIP)(%rip)
> 
> Try this.
> 
> Longer term I suggest that the x86-64 port use some UNSPEC_PCREL
> relocation marker every place it intends one.

Hmm, what do you mean by this?  The PC_REL addresses are used for many
things, for instance to address static variables, you mean that every
such memory reference should contain UNSPEC?  I think that would confuse
optimizers quite a bit.
>        /* Use one byte shorter RIP relative addressing for 64bit mode.  */
> -      if (GET_CODE (disp) != CONST_INT && TARGET_64BIT)
> +      if (TARGET_64BIT
> +	  && (GET_CODE (addr) == SYMBOL_REF
> +	      || GET_CODE (addr) == LABEL_REF
> +	      || (GET_CODE (addr) == CONST
> +		  && GET_CODE (XEXP (addr, 0)) == PLUS
> +		  && GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF
> +		  && GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT)))

I would guess we should add predicate function for this, as not every
symbolic reference can be RIP relative in large models...  I will check
this after the finals tomorrow.

Honza
>  	fputs ("(%rip)", file);
>      }
>    else


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