This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [x86-64] Large code models (static and PIC)
- From: Jan Hubicka <jh at suse dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org, ubizjak at gmail dot com
- Date: Tue, 6 Mar 2007 15:03:38 +0100
- Subject: Re: [x86-64] Large code models (static and PIC)
- References: <20070122195452.GS10654@kam.mff.cuni.cz> <20070123135645.GA29911@devserv.devel.redhat.com> <20070124113757.GI30424@kam.mff.cuni.cz> <20070124201151.GM29911@devserv.devel.redhat.com>
> On Wed, Jan 24, 2007 at 12:37:57PM +0100, Jan Hubicka wrote:
> > Right except for ...
> > >
> > > > --- reg-stack.c (revision 121034)
> > > > +++ reg-stack.c (working copy)
> > > > @@ -3120,7 +3120,8 @@ reg_to_stack (void)
> > > > the PIC register hasn't been set up. In that case, fall back
> > > > on zero, which we can get from `ldz'. */
> > > >
> > > > - if (flag_pic)
> > > > + if ((flag_pic && !TARGET_64BIT)
> > > > + || ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
> > > > not_a_num = CONST0_RTX (SFmode);
> > > > else
> > > > {
> > >
> > > But e.g. the above changes behavior for CM_SMALL_PIC or CM_MEDIUM_PIC.
> >
> > Here I actually included SMALL_PIC/MEDIUM_PIC models because there we
> > can load NaN without having temporary register too.
>
> Then can't you commit the "flag_pic" -> "flag_pic && !TARGET_64BIT" change separately?
> Might make things easier to understand for anybody who will try to make
> sense/backport/whatever the patch in the future.
Hi,
I've comitted the attached patch as suggested as obvious. I will also
commit the updated large model patch after re-testing. Thanks!
Honza
Index: ChangeLog
===================================================================
--- ChangeLog (revision 122618)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2007-03-06 Jan Hubicka <jh@suse.cz>
+
+ * regstack.c (reg_to_stack): When in 64bit PIC mode, we still can load
+ NANs easilly.
+
2007-03-06 Richard Sandiford <richard@codesourcery.com>
* configure.ac: Allow tm_file to contain build-directory files.
Index: reg-stack.c
===================================================================
--- reg-stack.c (revision 122618)
+++ reg-stack.c (working copy)
@@ -3141,7 +3141,7 @@ reg_to_stack (void)
the PIC register hasn't been set up. In that case, fall back
on zero, which we can get from `ldz'. */
- if (flag_pic)
+ if (flag_pic && !TARGET_64BIT)
not_a_num = CONST0_RTX (SFmode);
else
{