MVME5500 broken with gcc-4.0.2

Till Straumann strauman at slac.stanford.edu
Thu Nov 3 17:53:50 UTC 2005


Phillip Sorensen wrote:

> Joel Sherrill <joel at OARcorp.com> wrote:
>
>> Till Straumann wrote:
>>
>>> WARNING:
>>>
>>> rtems/gcc (implicitely) uses -maltivec on all 74xx CPUS and
>>> the MVME5500 calls for -mcpu=7450.
>>>
>>> Unfortunately, with -maltivec, gcc uses vector registers for
>>> some optimizations.
>>
>>
>>
>> What are those optimizations?  Are they integer or floating point
>> related?
>
>
> I have found at least one place.  For some reason, one of the 
> optimizations uses a vector register in the bootpc_init function.  I 
> don't have a version with debugging symbols, but it appears that the 
> code is possible a translation of the bzero function.  (The dhcp_init 
> function which runs fine is almost identical, except it uses memset 
> instead of bzero.)
>
> The code generated is
>
> vxor    v0,v0,v0
> stvx    v0,r24,r0
> lis     r4,6
> mr      r3,r24
> stvx    v0,r0,r24


Yes. There are more of those. The strange thing is that it doesn't seem
to be possible to reproduce the compiler's behavior with something simple
like

tst()
{
unsigned xx[4];
    bzero(xx,16);
    tst1(xx);
}

Another place where vxor/stvx appeared was svctcp_create() [rpc library].
I played a little bit with that code and as I simplified it by deleting 
chunks,
the inline assembly for bzero() changed (now using stw)...

YMMV
T.

>
>>> Workaround:
>>>
>>> make/custom/mvme5500: use -mcpu=750
>>>
>
> Compiling with -mcpu=750 produces code that runs without the previous 
> problem.





More information about the users mailing list