On Sat, 15 Oct 2005, Joel Palmius wrote:
> On Sat, 15 Oct 2005, Blaisorblade wrote:
> 
>> One question - -march=athlon64 is also supported by GCC (even if I don't know
>> how much it helps).
> 
> Yup. Or -march=k8.

These are synonyms for the same thing, as is -march=opteron and
-march=athlon-fx.

-march=x86-64 is similar but disables use of 3DNow intrinsics (not that
those are used much yet unless you use vector stuff a lot: I guess when
OpenMP and autovectorization start to turn up in GCC trunks, we'll see
more use from them).

>                     The recommendation for building a 32-bit chroot in
> the gentoo docs says -march=athlon-xp though,

Indeed, this is almost identical to specifying athlon64 except that
it's 32-bit.

>From gcc-4.0.2/gcc/config/i386/i386.c's processor_alias_table:

,----
|  {"k6", PROCESSOR_K6, PTA_MMX},
|  {"k6-2", PROCESSOR_K6, PTA_MMX | PTA_3DNOW},
|  {"k6-3", PROCESSOR_K6, PTA_MMX | PTA_3DNOW},
|  {"athlon", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
|                               | PTA_3DNOW_A},
|  {"athlon-tbird", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE
|                                     | PTA_3DNOW | PTA_3DNOW_A},
|  {"athlon-4", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
|                                | PTA_3DNOW_A | PTA_SSE},
|  {"athlon-xp", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
|                                  | PTA_3DNOW_A | PTA_SSE},
|  {"athlon-mp", PROCESSOR_ATHLON, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW
|                                  | PTA_3DNOW_A | PTA_SSE},
|  {"x86-64", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_64BIT
|                           | PTA_SSE | PTA_SSE2 },
|  {"k8", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
|                                  | PTA_3DNOW_A | PTA_SSE | PTA_SSE2},
|  {"opteron", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
|                                  | PTA_3DNOW_A | PTA_SSE | PTA_SSE2},
|  {"athlon64", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | PTA_64BIT
|                                  | PTA_3DNOW_A | PTA_SSE | PTA_SSE2},
|  {"athlon-fx", PROCESSOR_K8, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW | 
PTA_64BIT
|                                  | PTA_3DNOW_A | PTA_SSE | PTA_SSE2},
`----

(As far as I can tell PROCESSOR_K8 and PROCESSOR_ATHLON are identical in
GCC except for bitness, a few predefined macros, and scheduling.

Of course the first of those changes ia a biggie, but you're not losing
much by having GCC consider 32-bit code on your K8 to be running on an
Athlon.)

>                                               possibly because there
> was some confusion about whether you'd really get it 32 bit if you set
> k8 or athlon64. I don't know, I didn't test, so I simply went with the
> recommendation.

I hope the stuff above is useful, then. (I didn't test either: I don't
even have a K8. But the source never lies. :) )

-- 
`Next: FEMA neglects to take into account the possibility of
fire in Old Balsawood Town (currently in its fifth year of drought
and home of the General Grant Home for Compulsive Arsonists).'
            --- James Nicoll


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to