This is the mail archive of the
mailing list for the GCC project.
Re: x86-64 bootstrap fails on mainline
- From: Jan Hubicka <jh at suse dot cz>
- To: Richard Henderson <rth at redhat dot com>, Andreas Jaeger <aj at suse dot de>,gcc-bugs at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Date: Wed, 29 May 2002 12:10:20 +0200
- Subject: Re: x86-64 bootstrap fails on mainline
- References: <email@example.com> <20020528182803.D3633@redhat.com>
> 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.
> fputs ("(%rip)", file);