This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -mtune != -march (>=) - optimizing for a higher architecture


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]