Subject: Re: alignment of common blocks
From: [email-masked] (Tim Iverson)

8 Aug 1997 23:59:09 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: [email-masked] (Larry Meadows)
Original-Cc: [email-masked]
In-Reply-To: <[email-masked]> from "Larry Meadows" at Aug 8, 97 05:54:36 pm
X-Mailer: ELM [version 2.4 PL25]
Original-Sender: [email-masked]

You can align an entire section using various ldscript options.  Also,
-malign-double can be used to set the default alignment to 8 bytes for
double, long double, and long long.  I don't know whether Cygnus
compiled this option into the default release.

The stack pointer is almost always kept aligned on a 4 byte boundary
unless someone makes a mistake (3,2,&1 do work, but slow the system).
I don't know what effect, if any, -malign-double has on automatic doubles.

If you do recompile from scratch, changing default alignments for the
various blocks is just a header change.  Don't remember which one off
the top, though ... somewhere in gcc/config.

Hope this helps,

- Tim Iverson
  [email-masked]


+----------------
| Subject: alignment of common blocks
| To: [email-masked]
| Date: Fri, 8 Aug 1997 17:54:36 -0700 (PDT)
| From: Larry Meadows <[email-masked]>
| 
| For performance reasons, we would like to be able to control the
| alignment of common blocks (.comm name,size). We'd probably like to
| be able to control the alignment of local common blocks (.lcomm name,size)
....
| Finally, another question -- what is the default alignment of the stack?
| 
| This is all important to get good performance on double precision stuff
| on pentium, pentium pro, and later, as well as to allow users control
| based on cache line size.
| 
| Regards,
| 
| Larry Meadows
| [email-masked]
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".