This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Code generation clarification (Submodels)
- From: Ian Lance Taylor <ian at airs dot com>
- To: Andrew Walrond <andrew at walrond dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: 03 May 2005 10:38:35 -0400
- Subject: Re: Code generation clarification (Submodels)
- References: <200505021301.12602.andrew@walrond.org>
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