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: [x86-64] Large code models (static and PIC)


> 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
     {


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