This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SSE types and structures


> On Tue, 18 Jun 2002, Jan Hubicka wrote:
> > I was checking and it does not work for me:
> > typedef int __v8qi __attribute__ ((__mode__ (__V8QI__)));
> > __v8qi t;
> > long long q;
> > e()
> > {
> >         t=q;
> > }
> > hubicka@atrey:~/egcs2/egcs/build/gcc$ ./xgcc -B ./ -O2 t.c -msse
> > t.c: In function `e':
> > t.c:6: error: incompatible types in assignment
> 
> Well, it does work if you make the cast explicit.  It just won't do the
> conversion automatically.
OK, now I see what confused me:
typedef int __v8qi __attribute__ ((__mode__ (__V8QI__)));

int i;
__v8qi q;
t ()
{
  long long e = i;
  q = (__v8qi) e;
  q = (__v8qi) (long long) i;
}
hubicka@atrey:~/egcs2/egcs/build/gcc$ ./xgcc -B
./ -O2 q.c -msse -S
q.c: In function `t':
q.c:9: error: can't convert between vector
values of different size

The first convesion passes, while the second not.  Is that intended
behaviour.  How this happent?

Honza

> 
> 
> Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]