[Cbe-oss-dev] mars and fsf-gcc

Jonathan Adamczewski jadamcze at utas.edu.au
Sun Jun 7 18:42:12 EST 2009


Attempting to compile mars-1.1.3 with spu-gcc-4.4.0 (as packaged for
debian sid), on the following code from base/src/mpu/kernel/kernel.c

static int kernel_memcmp(const void *s1, const void *s2, int size)
{
        __vector const int *vptr_1 = (__vector const int *)s1;
        __vector const int *vptr_2 = (__vector const int *)s2;
        __vector const int *vptr_e = (__vector const int *)(s1 + size);

        while (vptr_1 < vptr_e)
                if (!(*vptr_1++ == *vptr_2++))
                        return 1;

        return 0;
}


I see this error :

kernel.c: In function 'kernel_memcmp':
kernel.c:101: error: invalid operands to binary == (have 'const int
__vector__' and 'const int __vector__')


It appears that == is not supported for vectors in this version of
gcc, or I'm missing something obvious.


j.



More information about the cbe-oss-dev mailing list