-mtune != -march (>=) - optimizing for a higher architecture
Paul Brook
paul@codesourcery.com
Sat Sep 25 14:56:00 GMT 2004
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.
More information about the Gcc
mailing list