Mail Archives: djgpp/2001/06/26/11:15:58
On Tue, 26 Jun 2001, Graaagh the Mighty wrote:
> >The purpose of that is to keep the stack aligned to a 32 byte
> >boundary, which improves performance on today's high-end processors.
>
> Modern processors care about alignments as large as *256 bits*!? 64
> bits for doubles or for ints on 64 bit chips, I figured, but 256!?
It's all in the Intel manuals; please read them. Due to various data
prefetch penalties, they recommend that the stack be aligned on
16-byte boundary. I didn't analyze the code produced by GCC too
deeply, but it might be considering the possibility that the stack
frame is only aligned initially to 4 bytes, since greater alignment is
normally not guaranteed, especially if you mix code produced by
different compilers.
- Raw text -