Gcc vector extensions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
Picochip processor has a vector unit that supports operations such as

ADD imm,vsrc,vdest.

where you can add a scalar value to a vector register. This is equivalent to adding every element of the vector register with the scalar value.

GCC vector extensions allow for a scalar to be used for shift operations. This example from documentation says

     typedef int v4si __attribute__ ((vector_size (16)));

     v4si a, b;

     b = a >> 1;     /* b = a >> {1,1,1,1}; */

Is it possible to support

b = a + 1 /* b = a + {1,1,1,1} */

Or, is there any other way to represent this operation?

Thanks for your help.

Cheers
Hari

Note: I am not sure whether this is the right mailing list for this discussion.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux