gcc: SPU Built-in Functions

1 
1 6.59.29 SPU Built-in Functions
1 ------------------------------
1 
1 GCC provides extensions for the SPU processor as described in the
1 Sony/Toshiba/IBM SPU Language Extensions Specification.  GCC's
1 implementation differs in several ways.
1 
1    * The optional extension of specifying vector constants in
1      parentheses is not supported.
1 
1    * A vector initializer requires no cast if the vector constant is of
1      the same type as the variable it is initializing.
1 
1    * If 'signed' or 'unsigned' is omitted, the signedness of the vector
1      type is the default signedness of the base type.  The default
1      varies depending on the operating system, so a portable program
1      should always specify the signedness.
1 
1    * By default, the keyword '__vector' is added.  The macro 'vector' is
1      defined in '<spu_intrinsics.h>' and can be undefined.
1 
1    * GCC allows using a 'typedef' name as the type specifier for a
1      vector type.
1 
1    * For C, overloaded functions are implemented with macros so the
1      following does not work:
1 
1             spu_add ((vector signed int){1, 2, 3, 4}, foo);
1 
1      Since 'spu_add' is a macro, the vector constant in the example is
1      treated as four separate arguments.  Wrap the entire argument in
1      parentheses for this to work.
1 
1    * The extended version of '__builtin_expect' is not supported.
1 
1  _Note:_ Only the interface described in the aforementioned
1 specification is supported.  Internally, GCC uses built-in functions to
1 implement the required functionality, but these are not supported and
1 are subject to change without notice.
1