Built-In Functions Specific To Particular Target Machines; X86 Built-In Functions - Red Hat ENTERPRISE LINUX 3 - USING GCC Using Instructions

Using the gnu compiler collection (gcc)
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING GCC:
Table of Contents

Advertisement

184
int
__builtin_clzl
.
unsigned long
int
__builtin_ctzl
.
unsigned long
int
__builtin_popcountl
type is
unsigned long
int
__builtin_parityl
is
.
unsigned long
int
__builtin_ffsll
is
unsigned long long
int
__builtin_clzll
is
unsigned long long
int
__builtin_ctzll
is
unsigned long long
int
__builtin_popcountll
argument type is
unsigned long long
int
__builtin_parityll
ment type is
unsigned long long
6.47. Built-in Functions Specific to Particular Target Machines
On some target machines, GCC supports many built-in functions specific to those machines. Generally
these generate calls to specific machine instructions, but allow the compiler to schedule those calls.

6.47.1. X86 Built-in Functions

These built-in functions are available for the i386 and x86-64 family of computers, depending on the
command-line switches used.
The following machine modes are available for use with MMX built-in functions (refer to Section
6.45 Using vector instructions through built-in functions):
for a vector of four 16-bit integers, and
V4HI
built-in functions operate on MMX registers as a whole 64-bit entity, these use
If 3Dnow extensions are enabled,
values.
If SSE extensions are enabled,
instructions use a vector of four 32-bit integers, these use
an entire vector register, interpreting it as a 128-bit integer, these use mode
The following built-in functions are made available by
instruction that is part of the name.
v8qi __builtin_ia32_paddb (v8qi, v8qi)
v4hi __builtin_ia32_paddw (v4hi, v4hi)
v2si __builtin_ia32_paddd (v2si, v2si)
v8qi __builtin_ia32_psubb (v8qi, v8qi)
v4hi __builtin_ia32_psubw (v4hi, v4hi)
v2si __builtin_ia32_psubd (v2si, v2si)
v8qi __builtin_ia32_paddsb (v8qi, v8qi)
v4hi __builtin_ia32_paddsw (v4hi, v4hi)
v8qi __builtin_ia32_psubsb (v8qi, v8qi)
v4hi __builtin_ia32_psubsw (v4hi, v4hi)
(unsigned long) Similar to
(unsigned long) Similar to
(unsigned long) Similar to
.
(unsigned long) Similar to
(unsigned long long) Similar to
.
(unsigned long long) Similar to
.
(unsigned long long) Similar to
.
(unsigned long long) Similar to
.
(unsigned long long) Similar to
.
is used as a mode for a vector of two 32-bit floating point
V2SF
is used for a vector of four 32-bit floating point values. Some
V4SF
Chapter 6. Extensions to the C Language Family
__builtin_clz
__builtin_ctz
__builtin_popcount
__builtin_parity
__builtin_ffs
__builtin_clz
__builtin_ctz
__builtin_popcount
__builtin_parity
for a vector of two 32-bit integers,
V2SI
for a vector of eight 8-bit integers. Some of the
V8QI
. Finally, some instructions operate on
V4SI
. All of them generate the machine
-mmmx
, except the argument type is
, except the argument type is
, except the argument
, except the argument type
, except the argument type
, except the argument type
, except the argument type
, except the
, except the argu-
as their mode.
DI
.
TI

Advertisement

Table of Contents
loading
Need help?

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

This manual is also suitable for:

Enterprise linux 3

Table of Contents