This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: generic simd and c++
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: aldyh at redhat dot com (Aldy Hernandez)
- Cc: pinskia at physics dot uc dot edu (Andrew Pinski), gcc at gcc dot gnu dot org
- Date: Wed, 31 Jul 2002 16:10:53 -0400 (EDT)
- Subject: Re: generic simd and c++
no this is not the problem, if you copy gcc/testsuite/gcc.c-torture/execute/simd-1.c to simd.cc and add #include <stdlib.h> to the top of the file and try to compile it, you will get the same error as I reported.
Thanks,
Andrew Pinski
I will be filling a bug report soon for some of simd problems with -O1 and -msse also.
>
> >>>>> "Andrew" == Andrew Pinski <pinskia@physics.uc.edu> writes:
>
> > Does generic simd works in c++?
> > When I try it I get the following error:
> > findPeaks.cc:47: error: invalid operands of types `vector int' and
> > `vector int'
> > to binary `operator-'
>
> vector doesn't exist as a keyword. You're going to have to define a
> macro defining it as we did for altivec:
>
> #define vector __attribute__((vector_size(16)))
>
> This will give you 128 bit vectors. Use 8 for 64-bit vectors, etc.
>
> however, try to use something else but vector, since this will cause
> conflicts with C++ libraries.
>
> Aldy
>
>