diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2002-06-25 21:29:41 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2002-06-25 21:29:41 +0000 |
commit | 90989b26757083f6c83df8e34a237afabd7f2eaa (patch) | |
tree | a5d0af760e2dbb45959b08002606e187081d1f0b | |
parent | 9881adffaa5ceb049055fd7e3da9efab4dde32b1 (diff) | |
download | gcc-90989b26757083f6c83df8e34a237afabd7f2eaa.zip gcc-90989b26757083f6c83df8e34a237afabd7f2eaa.tar.gz gcc-90989b26757083f6c83df8e34a237afabd7f2eaa.tar.bz2 |
extend.texi (PowerPC AltiVec Built-in Functions): Document discrepancies from motorola's documentation.
2002-06-24 Aldy Hernandez <aldyh@redhat.com>
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Document
discrepancies from motorola's documentation.
From-SVN: r54997
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/doc/extend.texi | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 735d56f..255c3a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-06-25 Aldy Hernandez <aldyh@redhat.com> + + * doc/extend.texi (PowerPC AltiVec Built-in Functions): Document + discrepancies from motorola's documentation. + Tue Jun 25 21:51:13 2002 J"orn Rennecke <joern.rennecke@superh.com> * optabs.c (expand_vector_binop, expand_vector_unop): Don't assume diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 37451c47..be49067 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -5111,6 +5111,25 @@ The following functions are made available by including @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 |