www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/26/11:15:58

Date: Tue, 26 Jun 2001 16:27:54 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: DJGPP reserves wrong int size
In-Reply-To: <3b37e92e.288745911@news.primus.ca>
Message-ID: <Pine.SUN.3.91.1010626162738.17201T-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019