188
v2sf __builtin_ia32_pfnacc (v2sf, v2sf)
v2sf __builtin_ia32_pfpnacc (v2sf, v2sf)
v2sf __builtin_ia32_pi2fw (v2si)
v2sf __builtin_ia32_pswapdsf (v2sf)
v2si __builtin_ia32_pswapdsi (v2si)
6.47.2. PowerPC AltiVec Built-in Functions
These built-in functions are available for the PowerPC family of computers, depending on the
command-line switches used.
The following machine modes are available for use with AltiVec built-in functions (refer to Section
6.45 Using vector instructions through built-in functions):
for a vector of four 32-bit floating point numbers,
V4SF
for a vector of sixteen 8-bit integers.
V16QI
The following functions are made available by including
. The functions implement the functionality described in Motorola's AltiVec Pro-
-mabi=altivec
gramming Interface Manual.
There are a few differences from Motorola's documentation and GCC's implementation. Vector con-
stants 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
and will be discontinued in further revisions. Use
is omitted, the vector type will default to
with macros for the C implementation. So code the following example will not work:
vec_add ((vector signed int){1, 2, 3, 4}, foo);
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.
Note: Only the
altivec.h
achieve the functionality in the aforementioned header file, but they are not supported and are subject
to change without notice.
vector signed char vec_abs (vector signed char, vector signed char);
vector signed short vec_abs (vector signed short, vector signed short);
vector signed int vec_abs (vector signed int, vector signed int);
vector signed float vec_abs (vector signed float, vector signed float);
vector signed char vec_abss (vector signed char, vector signed char);
vector signed short vec_abss (vector signed short, vector signed short);
vector signed char vec_add (vector signed char, vector signed char);
vector unsigned char vec_add (vector signed char, vector unsigned char);
vector unsigned char vec_add (vector unsigned char, vector signed char);
vector unsigned char vec_add (vector unsigned char,
vector signed short vec_add (vector signed short, vector signed short);
vector unsigned short vec_add (vector signed short,
vector unsigned short vec_add (vector unsigned short,
vector unsigned short vec_add (vector unsigned short,
vector signed int vec_add (vector signed int, vector signed int);
Chapter 6. Extensions to the C Language Family
vector signed
. Lastly, all overloaded functions are implemented
signed
interface is supported. Internally, GCC uses built-in functions to
vector unsigned char);
vector unsigned short);
vector signed short);
vector unsigned short);
for a vector of four 32-bit integers,
V4SI
for a vector of eight 16-bit integers, and
V8HI
and using
altivec.h
vector bool
instead. If
and
-maltivec
type is deprecated
or
signed
unsigned
Need help?
Do you have a question about the ENTERPRISE LINUX 3 - USING GCC and is the answer not in the manual?
Questions and answers