lkml.org 
[lkml]   [2002]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5.45: gcc 3.2 aligns everything to 16 bytes when I compile for 486
On Sun, 3 Nov 2002, Denis Vlasenko wrote:

> I'm compiling 2.5.45 for 486.
>
> For example, exit.c got compiled with this command:
>
> gcc -v -Wp,-MD,kernel/.exit.o.d -D__KERNEL__ -Iinclude -Wall \
> -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer \
> -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 \
> -march=i486 -Iarch/i386/mach-generic -nostdinc -iwithprefix include \
> -DKBUILD_BASENAME=exit -c -o zz25.o kernel/exit.c
>
> Whereas for 2.4, command is different:
>
> gcc -v -D__KERNEL__ -Iinclude -Iarch/i386/mach-generic \
> -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing \
> -fno-common -pipe -mpreferred-stack-boundary=2 -march=i386 -nostdinc \
> -iwithprefix include -DKBUILD_BASENAME=exit -c -o zz24.o kernel/exit.c
>
> (commands slightly adapted to actually execute in 2.5 tree and
> don't destroy exit.o)
>
> As you can see, the difference is in -march=.
> 2.5 compiles for 486. I have nothing against 486, but
> gcc 3.x got nasty habit of aligning functions and sometimes
> *even loops* to 16 bytes. Result:

From memory that's to handle cache line length. I seem to remember back in
the 486 days setting my flags explicitly for anything which might be the
target of a branch. However, my recollection is that things were put on a
quadbyte, not position 16.

You can set the placement of loops, functions, and something else to be
mod any power of two, I believe.

I still run routers on one 486 and a boatload of Cyrix and similar clones.

--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.068 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site