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: Gcc extra alignment..


> The stack is aligned to 16 bytes for some reason I don't entirely see
> the point in.  (Like, why can't the few functions that use 128-bit SIMD
> use `and' to align their stack instead?)

Keeping the stack always aligned is felt to be cheaper than burning another
register in order to still access the arguments when using 'and' to align
the stack.  I didn't have any benchmark numbers which clearly indicated the
best approach when I supplied the patches for both approaches in late 1998
/ early 1999 (in fact there may not be one best approach).

Of course both the stack and frame pointer are normally present unless
-fomit-frame-pointer is in use so really no additional registers are
needed to support using 'and' to align the stack.  I don't believe that
there's any reason it can't be supported as an option if someone was to
update the my original patch and supply convincing benchmark numbers.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------


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