This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -mtune != -march (>=) - optimizing for a higher architecture
On Sat, Sep 25, 2004 at 01:50:59PM +0100, Paul Brook wrote:
> On Saturday 25 September 2004 10:06, Tom Alsberg wrote:
> > Hi there...
> >
> > Recently I built GCC 3.4.2 for Linux, and read through a bit of its
> > documentation. In (gcc.info)i386 and x86-64 Options, it is said under
> > `-march=CPU-TYPE': specifying `-march=CPU-TYPE' implies
> > `-mtune=CPU-TYPE'.
> >
> > I wonder, then - how could I compile code that would be optimized for
> > one x86 CPU family member (say, pentium3), but that would run on all
> > x86 CPUs since some older one (say, i586), and fully take advantage of
> > that older (but still newer than i386) one's instruction and register
> > set, etc?
>
> Specify both -march= and -mtune=
OK, so this would work as I asked? Thanks, then...
I suggest a documentation correction, then, though... As in the
documentation, it states under `-march=CPU-TYPE' in
(gcc.info)i386 and x86-64 Options:
Moreover, specifying `-march=CPU-TYPE' implies `-mtune=CPU-TYPE'.
Which I would understand to mean that -march=pentium would imply
-mtune=pentium, and thus adding -mtune=pentium3 won't apply.
> Paul
Thanks,
-- Tom
> P.S. This is the wrong place to be asking this sort of question.
I'm sorry for that. Didn't grasp the exact description of this list.
Further usage help requests from me will go to gcc-help...
> This list is for development *of" gcc, not development *with* gcc.
> You might try gcc-help@gcc.gnu.org for further questions.
--
Tom Alsberg - hacker (being the best description fitting this space)
Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER: The above message does not even necessarily represent
what
my fingers have typed on the keyboard, save anything further.