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
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Cc: Tom Alsberg <alsbergt at cs dot huji dot ac dot il>
- Date: Sat, 25 Sep 2004 13:50:59 +0100
- Subject: Re: -mtune != -march (>=) - optimizing for a higher architecture
- Organization: CodeSourcery
- References: <20040925090651.GA65976@cs.huji.ac.il>
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-63 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=
Paul
P.S. This is the wrong place to be asking this sort of question. This list is
for development *of" gcc, not development *with* gcc. You might try
gcc-help@gcc.gnu.org for further questions.