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: Code generation clarification (Submodels)


Andrew Walrond <andrew@walrond.org> writes:

> If I have a gcc configured for i686-* target system and I use that compiler to 
> build a package without any -m submodel options , is the generated code
>  1) only suitable for i686 and better, or
>  2) tuned for i686 and better but still OK for i386

The latter.  Configuring for i686-* is equivalent to configuring for
i386-* with the option --with-cpu=i686.  This causes the compiler to
be built as though you specified -mtune=i686 for each compile which
does not explicitly use -mtune, -march, or -mcpu.

> Whatever the answer, is it a generic rule that holds true for submodels of all 
> architectures?

It should always be true, although of course there may be bugs.

> What about 32bit code generated with x86_64 targeted gcc (with -m32)?

If you configure for x86-64, I believe the default architecture will
be MMX, SSE, and SSE2.  I believe that will apply even if you use
-m32.  But I haven't really tested it.

Ian


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