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]
Other format: [Raw text]

Re: Fix x86-64 PIC


> On Tue, Oct 29, 2002 at 09:41:07PM +0100, Jan Hubicka wrote:
> > > Could you please post some testcases of source lousy code?
> > > I'd like to know what valid 32-bit sign extended values my recent x86_64_sign_extended_value
> > > changes don't catch.
> > 
> > static int t;
> > q()
> > {
> >   t=1;
> > }
> > &t is not sign_extended_value, but t(%rip) is valid and recognized by the
> > pic_operand later.
> 
> With -O2 -fpic I get:
> q:
> 	movl    $1, t(%rip)
>         ret
> t is a x86_64_sign_extended_value in CM_SMALL_PIC model (since 2002-10-21).
OK,
I now see what you did.  I had old checkout that had this broken.
I don't think it makes sense to add allowrip for
x86_64_sign_extended_value and I think you are wrong to allow it in
x86_64_general_operand and friends since these can not be RIP relative
except for addresses that goes trought valid_address code anyway.  What
did you needed?

Honza


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