This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc extra alignment..
- To: egcs at tantalophile dot demon dot co dot uk
- Subject: Re: Gcc extra alignment..
- From: John Wehle <john at feith dot com>
- Date: Thu, 2 Nov 2000 13:14:04 -0500 (EST)
- Cc: rittle at latour dot rsch dot comm dot mot dot com, gcc at gcc dot gnu dot org, torvalds at transmeta dot com
>> 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.
>
>It's also possible to copy the arguments to the aligned stack area, so
>you don't need two stack registers.
Sure at the price of a more complex prologue and watch out for varargs.
> Well the most obvious thing is that _most_ programs don't need 16-byte
> alignment at all, and relatively small parts of relatively few programs
> need 8-byte alignment either.
>
> That means alignments in code which _doesn't_ use floating point, MMX or
> SSE are pure overhead. The Linux kernel is one such program.
>
> Is that accounted for in your benchmark?
If you mean did I compile the Linux kernel, the answer is no. I certainly
agree that there are some downsides to the current implementation. Please
feel free to dust off my old patch which used 'and' to align the stack and
provide benchmark numbers. Other approaches are also welcomed.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------