This is the mail archive of the gcc-patches@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:
> 
> > > On Mon, Jun 17, 2002 at 04:26:09PM +0200, Jan Hubicka wrote:
> > > > I am just poking around this.  It appears to be tricky, as the __builtin
> > > > interface appears to be built around assumtpion that __m64 == long long.
> > > > All the functions returns long long and I don't see way to cast it into
> > > > V8QI and back easilly.
> > > 
> > > Well, duh, you'd do it uneasily and change them all, or add
> > > a cast at every single invocation.
> > 
> > Problem is that I don't see how to write the cast in C.  Simple (long
> > long)__m64 does not work of course :(
> 
> You could add another builtin to do it.  And I thought the cast worked -
> casting to and from a vector the same size of an integer ought to be allowed.

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

ICC responds similary with __m64 type.  Still allowing the cast looks
most resonable for me.  I don't see why it should not work except that
it will make people to use the cast and write code incompatible with the
other compilers.

So should I add support for the cast? What to do with differently sized
integers?

Honza
> 
> 
> Bernd


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