Subject: Re: default optimization
To: Todd Vierling <tv@wasabisystems.com>
From: Rafal Boni <rafal@mediaone.net>
List: port-i386
Date: 01/22/2001 17:52:18
In message <Pine.WNT.4.30.0101221715350.-158195@tv>, tv@wasabisystems.com
writes:
-> On Mon, 22 Jan 2001, Rafal Boni wrote:
->
-> : -> It seems our gcc defines both "-mcpu=i386" and "-march=pentium" by defa
-> ult.
-> :
-> : Given that we expect things to run on any x86 processor down to the '386,
-> : maybe the defaults should be '-mcpu=pentium -march=i386' by default, in
-> : other words the opposite of what we do now.
->
-> You'd think so, but I've run on a Cyrix 6x86 (486 instruction set) as well
-> as a 486DX-33 with the precompiled system binaries, so one of the following
-> must be true:
->
-> 1. -mcpu=i386 pulls down -march= to i386 at codegen time;
From reading the gcc info page, I'd guess this is the correct answer...
What I meant to say is that the current set of default gcc flags makes it
easy to say '-mcpu=pentium' expecting to get pentium-optimized but runnable
on a '386 binaries and get binaries that won't run on a '386.
If we did '-mcpu=pentium -march=i386' (as opposed to '-mcpu=i386 -march=
pentium') by default, users would get an experience closer to the one
described by the gcc info page, is all. Now, a user saying '-mcpu=i586'
would still get binaries that ran on a '386, even if not optimally.
-> 2. gcc 2.91 (egcs 1.1) doesn't have many (or any) instruction definitions
-> for post-i386 machines;
-> 3. the doc is wrong;
-> 4. gcc does something Very Strange that makes the binaries just happen to
-> work.
--rafal
----
Rafal Boni rafal@mediaone.net