This is the mail archive of the gcc@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]

Re: ix86 `double' alignment (was Re: egcs-1.1 release schedule)



  In message <199806241507.LAA11762@melange.gnu.org>you write:
  > >Basically the ABI just mandates a 4 byte alignment, we get better
  > >performance if we could get the args 8 byte aligned.  But  I'll be
  > >a little suprised if we can do this without having the callee copy
  > >it out of the arglist to an aligned memory slot.
  > 
  > I guess we shouldn't try aligning outoing/incoming doubles passed
  > "by value" (C style) at all, now that I think about it more.  It'd
  > surely break the ABI.
Right.  That's basically what I was trying to explain in one or more
of those longer messages.  You can't align stuff in the arglist without
either breaking the ABI or blowing away the alignment we want for the
stack pointer.

  > And, I suspect the real performance penalties come mostly from arrays
  > and such inside loops anyway.  People don't pass arrays by value
  > (not usually ;-), and if an incoming by-value double is used
  > frequently in a loop, all that's really needed is to make the
  > compiler smart enough to make an aligned copy of that argument...but
  > let's wait until we see real code that could benefit from that.
Right.  It may also be the case that we'll need to align stack slots
for pseudos that don't get hard regs.  But that can wait until we
determine its important.


  > So, AFAICT, the doubles end up where they end up, either aligned
  > or not, and there's nothing we can do about it at that point.
Right.


  > >Before we can do *anything* about the alignment of args and autos we
  > >first need to get the stack pointer aligned at all times.  Let's deal
  > >with that first, then try to come up with solutions for the auto and
  > >argument alignment afterwards.
  > 
  > Uh-guh-reed!  :) 
Yeppers. :-)  

jeff


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