[power-gnu-discuss] Support for the MPC5554 (e200z6 core)
David Brown
david at westcontrol.com
Tue Jun 2 12:41:49 UTC 2009
Andrew Dennison wrote:
> On Tue, Jun 2, 2009 at 4:44 PM, David Brown <david at westcontrol.com> wrote:
>> Andrew Dennison wrote:
>>> Works for my 5554 code.
>>>
>> What -mcpu flag (and any other -m flags) do you use? I can't find any that
>> cause gcc (latest 4.3.3 version) to generate SPE instructions for single
>> precision floating point. It's easy to get the compiler to generate
>> standard "book E" floating point instructions (fmuls, etc.), but those don't
>> work on the 5554 as far as I understand.
>
> David,
>
> No other flags have been necessary (for floating point anyway), but
> from memory powerpc-eabi-spe defaults to 8540 (e500). There are some
> other issues where altivec instructions were generated in some cases!!
> Another switch cleans this up. Embedded powerpc can be fun...
>
> Earlier on (4.0, 4.1) I was using -fsingle-precision-constants (or
> something like that) and this also triggered the spe single precision
> instruction generation. However when I wanted to use VARGS I found
> they were still promoted to double (normal c abi). The short-double
> switch fixed this. We have had to browse gcc source on occasion to try
> to work out how the options really work.
>
> We are now using 4.4.0 but have used various versions of 4.0, 4.1, 4.2
> and 4.3 along the way.
>
> Hope this helps
>
> Andrew
>
Did you build your own gcc? So far I've just tried using CodeSourcery's
"lite" download, which is 4.3.2. If you've built your own version
(which the "powerpc-eabi-spi-" prefix suggests - the CodeSourcery build
I tried has simply powerpc-eabi- prefix, and IIRC has -mcpu=603 as
default), then perhaps the build I have is not configured to support SPE
instructions properly. Compilation with -mcpu=8540 failed entirely (I
can't remember the error message - I'm at a different computer at the
moment), while using -mcpu=e500 (again, I don't have the details on
hand) gave either pure software floating point, or "book E" hardware
floating point.
It looks like we will be going for Code Worrier on this project - the
nature of the customer and his project make it difficult to recommend a
"home-built" version of gcc (though a pre-built and supported version
from CodeSourcery would be fine), and Code Worrier's status as the
"standard" toolchain for these devices trumps gcc's other advantages
(open source, familiarity, etc.). However, I'd still like to get to the
bottom of this, both for my own curiosity, and for the possibility of
using gcc with the MPC5554 on other projects.
Thanks for your help so far,
mvh.,
David
More information about the power-gnu-discuss
mailing list