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]

Re: mutex in frame code



> While i686 code can not be used on older processors, we do not generate i686
> code by default.  ie, for the x86 we generate "common" code which can execute
> on any variant of the chip.  To enable i686 specific features one has to use
> a flag.

That is, the default is -march=i386.  But I just noticed that different
ports (in particular, Sparc and ix86) are using the same -m flag with a
completely different meaning:

Generally, there are two semi-independent flags to be set when dealing
with processor families: one says which processor to optimize for, one
says which processor to assume that we have.

Thus for the sparc port I can write
	-mtune=v9 -mcpu=v8

to get code that is tuned to run best on v9 (Ultrasparcs) but that
will run on v8 machines (but will not run on v7 machines).

But for i386, we have -mcpu=x -march=y, and -mcpu for Intel means
the same as -mtune on Sparc!  -march is used to generate code that
requires a particular processor.



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