delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/10/08/10:29:11

Message-Id: <m0zQWUx-000S4gC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Date: Tue, 6 Oct 1998 09:47:53 +0000
MIME-Version: 1.0
Subject: Re: Default alignment
In-reply-to: <Pine.SUN.3.91.981006143516.17118Y-100000@is>
X-mailer: Pegasus Mail for Windows (v2.54)
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
 
> If I understand correctly the message by Ian Taylor (below), it would
> be a good idea to define COFF_DEFAULT_SECTION_ALIGNMENT_POWER to make
> executable be aligned on more than 4 bytes (is 8 okay for a Pentium?), 

16 is recommended for K6 and 32 is ideal (too much waste). I think that true 
for any advanced processor because the caches works retrieving groups of 32 
bytes (1 tag entry for 32 bytes). I saw that 16 was ok for a simple Cyrix 
5x86 (486 family) because the internal bus is 128 bits wide.

> unless [34]86 will be somehow punished by that.

I think they will be punished because of the small cache.
 
> Alternatively, we could change lib/specs to make GCC pass alignment
> options to ld when -mpentium or such likes are use, but I don't see
> any options to ld that can be used for that.  Did I miss something?

I don't know. Some time ago I solved the aligment problems in the following 
way:

1) I created a special section in the ld script aligned 512 bytes.
2) I marked all the critical functions with attribute section, forcing the 
routines to be placed in this section.
3) Compiled the modules with big aligments.

In this way only the critical routines are "bloated" by the aligment.

I got the same answer you copied when I faced this problem (COFF limitation). 
Another option is provide another copy of the libraries compiled with large 
aligments.

Some weeks ago I timed some routines in my K6 using the Pentium instructions 
to meassure the clocks, I found the difference between well aligned and 4 
bytes aligned routines (for small loops) is huge.
 
> Btw, is somebody still working on porting Binutils 2.9?

I have this link in my pages:

A beta test release of binutils 2.9.1 by <a 
href="mailto:andrewc AT rosemail DOT rose DOT hp DOT com">Andrew Crabtree</a> can be found 
<a href="ftp://www.goof.com/pub/pcg/private/andrew/">here</a> or perhaps was 
moved <a href="http://www.goof.com/pcg/data/djgpp/">here</a>.

So I think you'll get a better answer from Andrew ;-)

SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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