[Cbe-oss-dev] [RFC, PATCH] selection of CPU optimization

Segher Boessenkool segher at kernel.crashing.org
Fri Apr 13 05:50:04 EST 2007


>> I think -mcpu=8540 will work for e500 (same for tune)
>
> Interestingly, -mcpu=8540 is known to gcc, according to
> gcc-4.0.3 -dumpspecs, but is not listed in the documentation.

Sure it is: gcc/gcc/config/rs6000/rs6000.c, line #s about
1250 and further ;-)

It's supposed to be in the info manual too, if not, please
file a PR; looks good to me though.

> There is also -me500, while -me200 seems to be known only
> to gas but not gcc.

There is no -mcpu=e500.  -me500 is a GAS option.
GCC's -mcpu= options generally take specific CPU names
as parameter; I suppose it would make sense to add e200
et. al.

> What would be the right options to pass on e200 and on
> pa6t?

The best thing would be to add GCC -mcpu= options.  For
now, you're probably best of with -mcpu=powerpc and
-mcpu=powerpc64 resp., i.e. the "blended models".  This
is a good option for multiplatform kernels too; add -mtune=
to optimise for a specific core, but it will *work* on
the whole family.


Segher




More information about the cbe-oss-dev mailing list