Subject: alignment of common blocks
From: [email-masked] (Larry Meadows)

8 Aug 1997 19:53:55 -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]
X-Mailer: ELM [version 2.4ME+ PL25 (25)]
Original-Sender: [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)
as well.

It seems that the cygwin32 stuff aligns common blocks on (at most) 4-byte
boundaries. Looking at the gas source, .lcomm stuff is aligned on at most
8-byte boundaries based on the size of the common, which is at least
reasonable (although it would be nice to control).

Many assemblers accept a third argument to .comm . On linux, I think gas
accepts:
	.comm	stuff,400,8

saying 'stuff is 400 bytes long, and align it on an 8-byte boundary'.

Does anyone have any idea if the vanilla cygwin32 toolkit has a way
to align .comm blocks (even brute force option to the linker)? Otherwise,
I guess it is time to hack source code. And, any info on .lcomm.

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".