This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
document altivec discrepancies from moto's docs
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 24 Jun 2002 20:56:16 -0700
- Subject: document altivec discrepancies from moto's docs
to avoid confusion.
ok?
2002-06-24 Aldy Hernandez <aldyh@redhat.com>
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Document
discrepancies from motorola's documentation.
Index: doc/extend.texi
===================================================================
RCS file: /cvs/uberbaum/gcc/doc/extend.texi,v
retrieving revision 1.84
diff -c -p -r1.84 extend.texi
*** doc/extend.texi 24 Jun 2002 17:21:01 -0000 1.84
--- doc/extend.texi 25 Jun 2002 03:54:47 -0000
*************** The following functions are made availab
*** 5111,5116 ****
--- 5111,5135 ----
@option{-mabi=altivec}. The functions implement the functionality
described in Motorola's AltiVec Programming Interface Manual.
+ There are a few differences from Motorola's documentation and gcc's
+ implementation. Vector constants are done with curly braces (not
+ parentheses). Vector initializers require no casts if the vector
+ constant is of the same type as the variable it is initializing. The
+ @code{vector bool} type is deprecated and will be discontinued in
+ further revisions. Use @code{vector signed} instead. If @code{signed}
+ or @code{unsigned} is omitted, the vector type will default to
+ @{signed}. Lastly, all overloaded functions are implemented with macros
+ for the C implementation. So code the following example will not work:
+
+ @smallexample
+ vec_add ((vector signed int){1, 2, 3, 4}, foo);
+ @end smallexample
+
+ Since vec_add is a macro, the vector constant in the above example will
+ be treated as four different arguments. Wrap the entire argument in
+ parentheses for this to work. The C++ implementation does not use
+ macros.
+
@emph{Note:} Only the @code{<altivec.h>} interface is supported.
Internally, GCC uses built-in functions to achieve the functionality in
the aforementioned header file, but they are not supported and are