Re: -malign-loops=2 -malign-jumps=2 -malign-functions=2, Why?

Marc Lehmann (pcg@goof.com)
Sun, 28 Jun 1998 22:32:59 +0200


On Sat, Jun 27, 1998 at 10:18:47AM +0930, Alan Modra wrote:
>
> Thanks for posting this info. It does disagree with other Intel documents
> though. See for example

They are wrong, or at least misleading (in many cases, not only this one)

> 3.4.1 Code
> Pentium, Pentium Pro and Pentium II processors have a cache line size
> of 32 bytes. Since the prefetch buffers fetch on 16-byte boundaries,
> code alignment has a direct impact on prefetch buffer efficiency.

Since the pentium/pmmx has two independent prefetch-buffers, this
doesn't mnatter to these chips as it matters to other chips
in this family.

>
> For optimal performance across the Intel Architecture family, it is
> recommended that:

This is quite true. It does not really matter on the pentium, so
aligning them to 16 is not that bad (except for wasted
memory).

> Well, there is a good reason to not supply the -malign options on current
> versions of egcs: If not given, egcs will now use the above strategy, ie.
> pad code up to a 16-byte boundary if the padding required is 7 bytes or
> less.

Exactly. But there are good reasons to supply a variety of switches with a
variety of compilers....

-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg@goof.com |e|
-=====/_/_//_/\_,_/ /_/\_\ --+
The choice of a GNU generation |
|

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu