Gccint
Gccint
(GCC)
Short Contents
1 Contributing to GCC Development . . . . . . . . . . . . . . . . . . . . . . . 1
2 GCC and Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Interfacing to GCC Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4 The GCC low-level runtime library . . . . . . . . . . . . . . . . . . . . . . . 7
5 Language Front Ends in GCC . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6 Source Tree Structure and Build System . . . . . . . . . . . . . . . . . . 65
7 Testsuites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
8 Option specification files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
9 Passes and Files of the Compiler . . . . . . . . . . . . . . . . . . . . . . . 143
10 Sizes and offsets as runtime invariants . . . . . . . . . . . . . . . . . . . 163
11 GENERIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
12 GIMPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
13 Analysis and Optimization of GIMPLE tuples . . . . . . . . . . . . 265
14 RTL Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
15 Control Flow Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
16 Analysis and Representation of Loops . . . . . . . . . . . . . . . . . . . 353
17 Machine Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
18 Target Description Macros and Functions . . . . . . . . . . . . . . . . 519
19 Host Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
20 Makefile Fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
21 collect2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
22 Standard Header File Directories . . . . . . . . . . . . . . . . . . . . . . . 721
23 Memory Management and Type Information . . . . . . . . . . . . . . 723
24 Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
25 Link Time Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
26 Match and Simplify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
27 Static Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
28 User Experience Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
Funding Free Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775
The GNU Project and GNU/Linux . . . . . . . . . . . . . . . . . . . . . . . . . 777
GNU General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779
GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . . . . 791
Contributors to GCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
ii
Table of Contents
7 Testsuites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.1 Idioms Used in Testsuite Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.2 Directives used within DejaGnu tests . . . . . . . . . . . . . . . . . . . . . . . . . . 84
7.2.1 Syntax and Descriptions of test directives . . . . . . . . . . . . . . . . . 84
7.2.1.1 Specify how to build the test . . . . . . . . . . . . . . . . . . . . . . . . . 84
7.2.1.2 Specify additional compiler options . . . . . . . . . . . . . . . . . . . 85
7.2.1.3 Modify the test timeout value . . . . . . . . . . . . . . . . . . . . . . . . 85
7.2.1.4 Skip a test for some targets . . . . . . . . . . . . . . . . . . . . . . . . . . 85
7.2.1.5 Expect a test to fail for some targets . . . . . . . . . . . . . . . . . 86
7.2.1.6 Expect the compiler to crash . . . . . . . . . . . . . . . . . . . . . . . . . 86
7.2.1.7 Expect the test executable to fail . . . . . . . . . . . . . . . . . . . . 86
7.2.1.8 Verify compiler messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
7.2.1.9 Verify output of the test executable . . . . . . . . . . . . . . . . . . 88
7.2.1.10 Specify environment variables for a test . . . . . . . . . . . . . 88
7.2.1.11 Specify additional files for a test . . . . . . . . . . . . . . . . . . . . 88
7.2.1.12 Add checks at the end of a test . . . . . . . . . . . . . . . . . . . . . 88
7.2.2 Selecting targets to which a test applies . . . . . . . . . . . . . . . . . . . 88
7.2.3 Keywords describing target attributes . . . . . . . . . . . . . . . . . . . . . 90
7.2.3.1 Endianness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
7.2.3.2 Data type sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
7.2.3.3 Fortran-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
7.2.3.4 Vector-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
7.2.3.5 Thread Local Storage attributes. . . . . . . . . . . . . . . . . . . . . . 97
7.2.3.6 Decimal floating point attributes . . . . . . . . . . . . . . . . . . . . . 98
7.2.3.7 ARM-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
7.2.3.8 AArch64-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . 103
7.2.3.9 LoongArch specific attributes . . . . . . . . . . . . . . . . . . . . . . . 104
7.2.3.10 MIPS-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
7.2.3.11 MSP430-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . 105
7.2.3.12 PowerPC-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . 105
7.2.3.13 RISC-V specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . 106
v
11 GENERIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
11.1 Deficiencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
11.2 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
11.2.1 Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
11.2.2 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
11.2.3 Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
11.3 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
11.4 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
11.4.1 Working with declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
11.4.2 Internal structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
11.4.2.1 Current structure hierarchy . . . . . . . . . . . . . . . . . . . . . . . . 186
11.4.2.2 Adding new DECL node types . . . . . . . . . . . . . . . . . . . . . 187
11.5 Attributes in trees. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.6 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.6.1 Constant expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
11.6.2 References to storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
11.6.3 Unary and Binary Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . 193
11.6.4 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
11.7 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
11.7.1 Basic Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
11.7.2 Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
11.7.3 Statement Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
11.7.4 Empty Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
11.7.5 Jumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
vii
12 GIMPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
12.1 Tuple representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
12.1.1 gimple (gsbase) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
12.1.2 gimple_statement_with_ops . . . . . . . . . . . . . . . . . . . . . . . . . . 229
12.1.3 gimple_statement_with_memory_ops . . . . . . . . . . . . . . . . . . 229
12.2 Class hierarchy of GIMPLE statements . . . . . . . . . . . . . . . . . . . . . . 230
12.3 GIMPLE instruction set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
12.4 Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
12.5 Temporaries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
12.6 Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
12.6.1 Compound Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
12.6.2 Compound Lvalues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
12.6.3 Conditional Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
12.6.4 Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
12.6.5 Manipulating operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
12.6.6 Operand vector allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
12.6.7 Operand validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
12.6.8 Statement validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
12.7 Manipulating GIMPLE statements . . . . . . . . . . . . . . . . . . . . . . . . . . 238
12.7.1 Common accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
12.8 Tuple specific accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
12.8.1 GIMPLE_ASM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
12.8.2 GIMPLE_ASSIGN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
12.8.3 GIMPLE_BIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
12.8.4 GIMPLE_CALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
12.8.5 GIMPLE_CATCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
12.8.6 GIMPLE_COND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
12.8.7 GIMPLE_DEBUG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
12.8.8 GIMPLE_EH_FILTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
12.8.9 GIMPLE_LABEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
12.8.10 GIMPLE_GOTO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
viii
21 collect2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
24 Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
24.1 Loading Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
24.2 Plugin API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
24.2.1 Plugin license check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
24.2.2 Plugin initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
24.2.3 Plugin callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
24.3 Interacting with the pass manager . . . . . . . . . . . . . . . . . . . . . . . . . . . 738
24.4 Interacting with the GCC Garbage Collector. . . . . . . . . . . . . . . . . 739
24.5 Giving information about a plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
24.6 Registering custom attributes or pragmas . . . . . . . . . . . . . . . . . . . . 740
24.7 Recording information about pass execution . . . . . . . . . . . . . . . . . 740
24.8 Controlling which passes are being run . . . . . . . . . . . . . . . . . . . . . . 741
24.9 Keeping track of available passes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741
24.10 Building GCC plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741
case quotient is not stored anywhere) and remainder into rprec precision bit-precise
integer result r (similarly, unless r is NULL and rprec is 0).
long long accum __divta3 (long long accum a, long [Runtime Function]
long accum b)
These functions return the quotient of the signed division of a and b.
greater than or equal to) can be constructed. The returned values lie in the range zero
to two, to allow the high-level operators to be implemented by testing the returned result
using either signed or unsigned comparison.
_Unwind_DeleteException
_Unwind_Find_FDE
_Unwind_ForcedUnwind
_Unwind_GetGR
_Unwind_GetIP
_Unwind_GetLanguageSpecificData
_Unwind_GetRegionStart
_Unwind_GetTextRelBase
_Unwind_GetDataRelBase
_Unwind_RaiseException
_Unwind_Resume
_Unwind_SetGR
_Unwind_SetIP
_Unwind_FindEnclosingFunction
_Unwind_SjLj_Register
_Unwind_SjLj_Unregister
_Unwind_SjLj_RaiseException
_Unwind_SjLj_ForcedUnwind
_Unwind_SjLj_Resume
__deregister_frame
__deregister_frame_info
__deregister_frame_info_bases
__register_frame
__register_frame_info
__register_frame_info_bases
__register_frame_info_table
__register_frame_info_table_bases
__register_frame_table
__morestack_segments [Variable]
__morestack_current_segment [Variable]
__morestack_initial_sp [Variable]
Internal variables used by the -fsplit-stack implementation.
63
c++tools Contains the sources for the g++-mapper-server, a tool used with C++ modules.
config Autoconf macros and Makefile fragments used throughout the tree.
contrib Contributed scripts that may be found useful in conjunction with GCC. One
of these, contrib/texi2pod.pl, is used to generate man pages from Texinfo
manuals as part of the GCC build process.
fixincludes
The support for fixing system headers to work with GCC. See
fixincludes/README for more information. The headers fixed by this mecha-
nism are installed in libsubdir/include-fixed. Along with those headers,
README-fixinc is also installed, as libsubdir/include-fixed/README.
gcc The main sources of GCC itself (except for runtime libraries), including op-
timizers, support for different target architectures, language front ends, and
testsuites. See Section 6.3 [The gcc Subdirectory], page 67, for details.
gnattools
Support tools for GNAT.
gotools Support tools for Go.
include Headers for the libiberty library.
intl GNU libintl, from GNU gettext, for systems which do not include it in
libc.
libada The Ada runtime library.
libatomic
The runtime support library for atomic operations (e.g. for __sync and __
atomic).
libbacktrace
A library that allows GCC to produce backtraces when it crashes.
libcc1 A library that allows GDB to make use of the compiler.
libcody A compiler dynamism library to allow communication between compilers and
build systems, for purposes such as C++ modules.
libcpp The C preprocessor library.
libdecnumber
The Decimal Float support library.
libffi The libffi library, used as part of the Go runtime library.
libgcc The GCC runtime library.
libgfortran
The Fortran runtime library.
libgm2 The Modula-2 runtime library.
libgo The Go runtime library. The bulk of this library is mirrored from the master
Go repository (https://github.com/golang/go).
Chapter 6: Source Tree Structure and Build System 67
Objective-C++), and lto (for LTO) are documented in this manual (see Chap-
ter 9 [Passes and Files of the Compiler], page 143); those for other languages
are not. See Section 6.3.8 [Anatomy of a Language Front End], page 75, for
details of the files in these directories.
common Source files shared between the compiler drivers (such as gcc) and the compilers
proper (such as cc1). If an architecture defines target hooks shared between
those places, it also has a subdirectory in common/config. See Section 18.1
[Target Structure], page 519.
config Configuration files for supported architectures and operating systems. See Sec-
tion 6.3.9 [Anatomy of a Target Back End], page 80, for details of the files in
this directory.
doc Texinfo documentation for GCC, together with automatically generated man
pages and support for converting the installation manual to HTML. See Sec-
tion 6.3.7 [Documentation], page 73.
ginclude System headers installed by GCC, mainly those required by the C standard of
freestanding implementations. See Section 6.3.6 [Headers Installed by GCC],
page 73, for details of when these and other headers are installed.
po Message catalogs with translations of messages produced by GCC into various
languages, language.po. This directory also contains gcc.pot, the template
for these message catalogues, exgettext, a wrapper around gettext to extract
the messages from the GCC sources and create gcc.pot, which is run by ‘make
gcc.pot’, and EXCLUDES, a list of files from which messages should not be
extracted.
testsuite
The GCC testsuites (except for those for runtime libraries). See Chapter 7
[Testsuites], page 83.
• Each language subdirectory has a file language/config-lang.in that is used for front-
end-specific configuration. See Section 6.3.8.2 [The Front End config-lang.in File],
page 77, for details of this file.
• A helper script configure.frag is used as part of creating the output of configure.
• tm_p.h, which includes the header machine-protos.h that contains prototypes for
functions in the target machine.c file. The machine-protos.h header is included
after the rtl.h and/or tree.h would have been included. The tm_p.h also includes
the header tm-preds.h which is generated by genpreds program during the build to
define the declarations and inline functions for the predicate functions.
check Run the testsuite. This creates a testsuite subdirectory that has various
.sum and .log files containing the results of the testing. You can run subsets
with, for example, ‘make check-gcc’. You can specify specific tests by setting
RUNTESTFLAGS to be the name of the .exp file, optionally followed by (for some
tests) an equals and a file wildcard, like:
make check-gcc RUNTESTFLAGS="execute.exp=19980413-*"
Note that running the testsuite may require additional tools be installed, such
as Tcl or DejaGnu.
The toplevel tree from which you start GCC compilation is not the GCC directory,
but rather a complex Makefile that coordinates the various steps of the build, including
bootstrapping the compiler and using the new compiler to build target libraries.
When GCC is configured for a native configuration, the default action for make is to
do a full three-stage bootstrap. This means that GCC is built three times—once with the
native compiler, once with the native-built compiler it just built, and once with the compiler
it built the second time. In theory, the last two should produce the same results, which
‘make compare’ can check. Each stage is configured separately and compiled into a separate
directory, to minimize problems due to ABI incompatibilities between the native compiler
and GCC.
If you do a change, rebuilding will also start from the first stage and “bubble” up the
change through the three stages. Each stage is taken from its build directory (if it had
been built previously), rebuilt, and copied to its subdirectory. This will allow you to, for
example, continue a bootstrap after fixing a bug which causes the stage2 build to crash.
It does not provide as good coverage of the compiler as bootstrapping from scratch, but it
ensures that the new code is syntactically correct (e.g., that you did not use GCC extensions
by mistake), and avoids spurious bootstrap comparison failures1 .
Other targets available from the top level include:
bootstrap-lean
Like bootstrap, except that the various stages are removed once they’re no
longer needed. This saves disk space.
bootstrap2
bootstrap2-lean
Performs only the first two stages of bootstrap. Unlike a three-stage bootstrap,
this does not perform a comparison to test that the compiler is running prop-
erly. Note that the disk space required by a “lean” bootstrap is approximately
independent of the number of stages.
stageN-bubble (N = 1...4, profile, feedback)
Rebuild all the stages up to N, with the appropriate flags, “bubbling” the
changes as described above.
all-stageN (N = 1...4, profile, feedback)
Assuming that stage N has already been built, rebuild it with the appropriate
flags. This is rarely needed.
1
Except if the compiler was buggy and miscompiled some of the files that were not modified. In this case,
it’s best to use make restrap.
72 GNU Compiler Collection (GCC) Internals
cleanstrap
Remove everything (‘make clean’) and rebuilds (‘make bootstrap’).
compare Compares the results of stages 2 and 3. This ensures that the compiler is
running properly, since it should produce the same object files regardless of
how it itself was compiled.
distclean-stageN (N = 1...4, profile, feedback)
Wipe stage N and all the following ones.
For example, ‘make distclean-stage3’ wipes stage 3 and all the following ones,
so that another make then rebuilds them from scratch. This can be useful if
you’re doing changes where “bubbling” the changes as described above is not
sufficient, but a full make restrap isn’t necessary either.
profiledbootstrap
Builds a compiler with profiling feedback information. In this case, the second
and third stages are named ‘profile’ and ‘feedback’, respectively. For more
information, see the installation instructions.
restrap Restart a bootstrap, so that everything that was not built with the system
compiler is rebuilt.
stageN-start (N = 1...4, profile, feedback)
For each package that is bootstrapped, rename directories so that, for example,
gcc points to the stageN GCC, compiled with the stageN-1 GCC2 .
You will invoke this target if you need to test or debug the stageN GCC. If
you only need to execute GCC (but you need not run ‘make’ either to rebuild
it or to run test suites), you should be able to work directly in the stageN-gcc
directory. This makes it easier to debug multiple stages in parallel.
stage For each package that is bootstrapped, relocate its build directory to indicate
its stage. For example, if the gcc directory points to the stage2 GCC, after
invoking this target it will be renamed to stage2-gcc.
If you wish to use non-default GCC flags when compiling the stage2 and stage3 compilers,
set BOOT_CFLAGS on the command line when doing ‘make’.
Usually, the first stage only builds the languages that the compiler is written in: typically,
C and maybe Ada. If you are debugging a miscompilation of a different stage2 front-end (for
example, of the Fortran front-end), you may want to have front-ends for other languages in
the first stage as well. To do so, set STAGE1_LANGUAGES on the command line when doing
‘make’.
For example, in the aforementioned scenario of debugging a Fortran front-end miscompi-
lation caused by the stage1 compiler, you may need a command like
make stage2-bubble STAGE1_LANGUAGES=c,fortran
Alternatively, you can use per-language targets to build and test languages that are not
enabled by default in stage1. For example, make f951 will build a Fortran compiler even in
the stage1 build directory.
2
Customarily, the system compiler is also termed the stage0 GCC.
Chapter 6: Source Tree Structure and Build System 73
6.3.5 Library Source Files and Headers under the gcc Directory
FIXME: list here, with explanation, all the C source files and headers under the gcc direc-
tory that aren’t built into the GCC executable but rather are part of runtime libraries and
object files, such as crtstuff.c and unwind-dw2.c. See Section 6.3.6 [Headers Installed
by GCC], page 73, for more information about the ginclude directory.
be necessary to add support for more Texinfo features to this script when generating new
man pages. To improve the man page output, some special Texinfo macros are provided in
doc/include/gcc-common.texi which texi2pod.pl understands:
@gcctabopt
Use in the form ‘@table @gcctabopt’ for tables of options, where for printed
output the effect of ‘@code’ is better than that of ‘@option’ but for man page
output a different effect is wanted.
@gccoptlist
Use for summary lists of options in manuals.
FIXME: describe the texi2pod.pl input language and magic comments in more detail.
lang_dirs
If defined, this variable lists (space-separated) top level directories (parallel to
gcc), apart from the runtime libraries, that should not be configured if this
front end is not built.
build_by_default
If defined to ‘no’, this language front end is not built unless enabled in a
--enable-languages argument. Otherwise, front ends are built by default,
subject to any special logic in configure.ac (as is present to disable the Ada
front end if the Ada compiler is not already installed).
boot_language
If defined to ‘yes’, this front end is built in stage1 of the bootstrap. This is
only relevant to front ends written in their own languages.
compilers
If defined, a space-separated list of compiler executables that will be run by the
driver. The names here will each end with ‘\$(exeext)’.
outputs If defined, a space-separated list of files that should be generated by configure
substituting values in them. This mechanism can be used to create a file
language/Makefile from language/Makefile.in, but this is deprecated,
building everything from the single gcc/Makefile is preferred.
gtfiles If defined, a space-separated list of files that should be scanned by gengtype.cc
to generate the garbage collection tables and routines for this language. This
excludes the files that are common to all front ends. See Chapter 23 [Type
Information], page 723.
pdf Build PDF documentation for the front end, in the build directory. This should
be done using $(TEXI2PDF), with appropriate -I arguments pointing to direc-
tories of included files.
html Build HTML documentation for the front end, in the build directory.
man Build generated man pages for the front end from Texinfo manuals (see Sec-
tion 6.3.7.2 [Man Page Generation], page 74), in the build directory. This target
is only called if the necessary tools are available, but should ignore errors so
as not to stop the build if errors occur; man pages are optional and the tools
involved may be installed in a broken way.
install-common
Install everything that is part of the front end, apart from the compiler exe-
cutables listed in compilers in config-lang.in.
install-info
Install info documentation for the front end, if it is present in the source direc-
tory. This target should have dependencies on info files that should be installed.
install-man
Install man pages for the front end. This target should ignore errors.
install-plugin
Install headers needed for plugins.
srcextra Copies its dependencies into the source directory. This generally should be used
for generated files such as Bison output files which are not version-controlled,
but should be included in any release tarballs. This target will be executed
during a bootstrap if ‘--enable-generated-files-in-srcdir’ was specified
as a configure option.
srcinfo
srcman Copies its dependencies into the source directory. These targets will be executed
during a bootstrap if ‘--enable-generated-files-in-srcdir’ was specified
as a configure option.
uninstall
Uninstall files installed by installing the compiler. This is currently documented
not to be supported, so the hook need not do anything.
mostlyclean
clean
distclean
maintainer-clean
The language parts of the standard GNU ‘*clean’ targets. See Section “Stan-
dard Targets for Users” in GNU Coding Standards, for details of the standard
targets. For GCC, maintainer-clean should delete all generated files in the
source directory that are not version-controlled, but should not delete anything
that is.
Make-lang.in must also define a variable lang_OBJS to a list of host object files that are
used by that language.
80 GNU Compiler Collection (GCC) Internals
include declarations referencing types that are not defined when machine.h is included,
specifically including those from rtl.h and tree.h. Since both RTL and tree types may
not be available in every context where machine-protos.h is included, in this file you
should guard declarations using these types inside appropriate #ifdef RTX_CODE or #ifdef
TREE_CODE conditional code segments.
If the backend uses shared data structures that require GTY markers for garbage collec-
tion (see Chapter 23 [Type Information], page 723), you must declare those in machine.h
rather than machine-protos.h. Any definitions required for building libgcc must also go
in machine.h.
GCC uses the macro IN_TARGET_CODE to distinguish between machine-specific .c and
.cc files and machine-independent .c and .cc files. Machine-specific files should use the
directive:
#define IN_TARGET_CODE 1
before including config.h.
If the back end is added to the official GCC source repository, the following are also
necessary:
• An entry for the target architecture in readings.html on the GCC web site, with any
relevant links.
• Details of the properties of the back end and target architecture in backends.html on
the GCC web site.
• A news item about the contribution of support for that target architecture, in
index.html on the GCC web site.
• Normally, one or more maintainers of that target listed in MAINTAINERS. Some existing
architectures may be unmaintained, but it would be unusual to add support for a target
that does not have a maintainer when support is added.
• Target triplets covering all config.gcc stanzas for the target, in the list in
contrib/config-list.mk.
83
7 Testsuites
GCC contains several testsuites to help maintain compiler quality. Most of the runtime
libraries and language front ends in GCC have testsuites. Currently only the C language
testsuites are documented here; FIXME: document the others.
It may be necessary to check that an expression is an integer constant expression and has
a certain value. To check that E has value V, an idiom similar to the following is used:
char x[((E) == (V) ? 1 : -1)];
In gcc.dg tests, __typeof__ is sometimes used to make assertions about the types of
expressions. See, for example, gcc.dg/c99-condexpr-1.c. The more subtle uses depend on
the exact rules for the types of conditional expressions in the C standard; see, for example,
gcc.dg/c99-intconst-1.c.
It is useful to be able to test that optimizations are being made properly. This cannot
be done in all cases, but it can be done where the optimization will lead to code being
optimized away (for example, where flow analysis or alias analysis should show that certain
code cannot be called) or to functions not being called because they have been expanded
as built-in functions. Such tests go in gcc.c-torture/execute. Where code should be
optimized away, a call to a nonexistent function such as link_failure () may be inserted;
a definition
#ifndef __OPTIMIZE__
void
link_failure (void)
{
abort ();
}
#endif
84 GNU Compiler Collection (GCC) Internals
will also be needed so that linking still succeeds when the test is run without optimization.
When all calls to a built-in function should have been optimized and no calls to the non-
built-in version of the function should remain, that function may be defined as static to
call abort () (although redeclaring a function as static may not work on all targets).
All testcases must be portable. Target-specific testcases must have appropriate code to
avoid causing failures on unsupported systems; unfortunately, the mechanisms for this differ
by directory.
FIXME: discuss non-C testsuites here.
{ dg-require-support args }
Skip the test if the target does not provide the required support. These di-
rectives must appear after any dg-do directive in the test and before any dg-
additional-sources directive. They require at least one argument, which can
be an empty string if the specific procedure does not examine the argument. See
Section 7.2.5 [Require Support], page 117, for a complete list of these directives.
‘dg-note’ or ‘dg-bogus’. For this directive ‘xfail’ has the same effect as
‘target’.
{ dg-prune-output regexp }
Prune messages matching regexp from the test output.
• a logical expression
Depending on the context, the selector specifies whether a test is skipped and reported
as unsupported or is expected to fail. A context that allows either ‘target’ or ‘xfail’
also allows ‘{ target selector1 xfail selector2 }’ to skip the test for targets that don’t
match selector1 and the test to fail for targets that match selector2.
A selector expression appears within curly braces and uses a single logical operator: one
of ‘!’, ‘&&’, or ‘||’. An operand is one of the following:
• another selector expression, in curly braces
• an effective-target keyword, such as lp64
• a single target triplet
• a list of target triplets within quotes or curly braces
• one of the following:
‘{ any-opts opt1 ... optn }’
Each of opt1 to optn is a space-separated list of option globs. The selector
expression evaluates to true if, for one of these strings, every glob in the
string matches an option that was passed to the compiler. For example:
{ any-opts "-O3 -flto" "-O[2g]" }
is true if any of the following are true:
• -O2 was passed to the compiler
• -Og was passed to the compiler
• both -O3 and -flto were passed to the compiler
This kind of selector can only be used within dg-final directives. Use
dg-skip-if, dg-xfail-if or dg-xfail-run-if to skip whole tests based
on options, or to mark them as expected to fail with certain options.
‘{ no-opts opt1 ... optn }’
As for any-opts above, each of opt1 to optn is a space-separated list of
option globs. The selector expression evaluates to true if, for all of these
strings, there is at least one glob that does not match an option that was
passed to the compiler. It is shorthand for:
{ ! { any-opts opt1 ... optn } }
For example:
{ no-opts "-O3 -flto" "-O[2g]" }
is true if all of the following are true:
• -O2 was not passed to the compiler
• -Og was not passed to the compiler
• at least one of -O3 or -flto was not passed to the compiler
Like any-opts, this kind of selector can only be used within dg-final
directives.
Here are some examples of full target selectors:
{ target { ! "hppa*-*-* ia64*-*-*" } }
{ target { powerpc*-*-* && lp64 } }
{ xfail { lp64 || vect_no_align } }
{ xfail { aarch64*-*-* && { any-opts "-O2" } } }
90 GNU Compiler Collection (GCC) Internals
7.2.3.1 Endianness
be Target uses big-endian memory order for multi-byte and multi-word data.
le Target uses little-endian memory order for multi-byte and multi-word data.
large_double
Target supports double that is longer than float.
large_long_double
Target supports long double that is longer than double.
ptr32plus
Target has pointers that are 32 bits or longer.
size20plus
Target has a 20-bit or larger address space, so supports at least 16-bit array
and structure sizes.
size24plus
Target has a 24-bit or larger address space, so supports at least 20-bit array
and structure sizes.
size32plus
Target has a 32-bit or larger address space, so supports at least 24-bit array
and structure sizes.
4byte_wchar_t
Target has wchar_t that is at least 4 bytes.
floatn Target has the _Floatn type.
floatnx Target has the _Floatnx type.
floatn_runtime
Target has the _Floatn type, including runtime support for any options added
with dg-add-options.
floatnx_runtime
Target has the _Floatnx type, including runtime support for any options added
with dg-add-options.
floatn_nx_runtime
Target has runtime support for any options added with dg-add-options for
any _Floatn or _Floatnx type.
inf Target supports floating point infinite (inf) for type double.
inff Target supports floating point infinite (inf) for type float.
fortran_large_real
Target supports Fortran real kinds larger than real(8).
vect_long
Target supports hardware vectors of long.
vect_long_long
Target supports hardware vectors of long long.
vect_check_ptrs
Target supports the check_raw_ptrs and check_war_ptrs optabs on vectors.
vect_fully_masked
Target supports fully-masked (also known as fully-predicated) loops, so that
vector loops can handle partial as well as full vectors.
vect_masked_load
Target supports vector masked loads.
vect_masked_store
Target supports vector masked stores.
vect_gather_load_ifn
Target supports vector gather loads using internal functions (rather than via
built-in functions or emulation).
vect_scatter_store
Target supports vector scatter stores.
vect_aligned_arrays
Target aligns arrays to vector alignment boundary.
vect_hw_misalign
Target supports a vector misalign access.
vect_no_align
Target does not support a vector alignment mechanism.
vect_peeling_profitable
Target might require to peel loops for alignment purposes.
vect_no_int_min_max
Target does not support a vector min and max instruction on int.
vect_no_int_add
Target does not support a vector add instruction on int.
vect_no_bitwise
Target does not support vector bitwise instructions.
vect_bool_cmp
Target supports comparison of bool vectors for at least one vector length.
vect_char_add
Target supports addition of char vectors for at least one vector length.
vect_char_mult
Target supports vector char multiplication.
vect_short_mult
Target supports vector short multiplication.
94 GNU Compiler Collection (GCC) Internals
vect_int_mult
Target supports vector int multiplication.
vect_long_mult
Target supports 64 bit vector long multiplication.
vect_extract_even_odd
Target supports vector even/odd element extraction.
vect_extract_even_odd_wide
Target supports vector even/odd element extraction of vectors with elements
SImode or larger.
vect_interleave
Target supports vector interleaving.
vect_strided
Target supports vector interleaving and extract even/odd.
vect_strided_wide
Target supports vector interleaving and extract even/odd for wide element
types.
vect_perm
Target supports vector permutation.
vect_perm_byte
Target supports permutation of vectors with 8-bit elements.
vect_perm_short
Target supports permutation of vectors with 16-bit elements.
vect_perm3_byte
Target supports permutation of vectors with 8-bit elements, and for the default
vector length it is possible to permute:
{ a0, a1, a2, b0, b1, b2, ... }
to:
{ a0, a0, a0, b0, b0, b0, ... }
{ a1, a1, a1, b1, b1, b1, ... }
{ a2, a2, a2, b2, b2, b2, ... }
using only two-vector permutes, regardless of how long the sequence is.
vect_perm3_int
Like vect_perm3_byte, but for 32-bit elements.
vect_perm3_short
Like vect_perm3_byte, but for 16-bit elements.
vect_shift
Target supports a hardware vector shift operation.
vect_unaligned_possible
Target prefers vectors to have an alignment greater than element alignment,
but also allows unaligned vector accesses in some circumstances.
Chapter 7: Testsuites 95
vect_variable_length
Target has variable-length vectors.
vect64 Target supports vectors of 64 bits.
vect32 Target supports vectors of 32 bits.
vect_widen_sum_hi_to_si
Target supports a vector widening summation of short operands into int re-
sults, or can promote (unpack) from short to int.
vect_widen_sum_qi_to_hi
Target supports a vector widening summation of char operands into short
results, or can promote (unpack) from char to short.
vect_widen_sum_qi_to_si
Target supports a vector widening summation of char operands into int results.
vect_widen_mult_qi_to_hi
Target supports a vector widening multiplication of char operands into short
results, or can promote (unpack) from char to short and perform non-widening
multiplication of short.
vect_widen_mult_hi_to_si
Target supports a vector widening multiplication of short operands into int
results, or can promote (unpack) from short to int and perform non-widening
multiplication of int.
vect_widen_mult_si_to_di_pattern
Target supports a vector widening multiplication of int operands into long
results.
vect_sdot_qi
Target supports a vector dot-product of signed char.
vect_udot_qi
Target supports a vector dot-product of unsigned char.
vect_usdot_qi
Target supports a vector dot-product where one operand of the multiply is
signed char and the other of unsigned char.
vect_sdot_hi
Target supports a vector dot-product of signed short.
vect_udot_hi
Target supports a vector dot-product of unsigned short.
vect_pack_trunc
Target supports a vector demotion (packing) of short to char and from int to
short using modulo arithmetic.
vect_unpack
Target supports a vector promotion (unpacking) of char to short and from
char to int.
96 GNU Compiler Collection (GCC) Internals
vect_intfloat_cvt
Target supports conversion from signed int to float.
vect_uintfloat_cvt
Target supports conversion from unsigned int to float.
vect_floatint_cvt
Target supports conversion from float to signed int.
vect_floatuint_cvt
Target supports conversion from float to unsigned int.
vect_intdouble_cvt
Target supports conversion from signed int to double.
vect_doubleint_cvt
Target supports conversion from double to signed int.
vect_max_reduc
Target supports max reduction for vectors.
vect_sizes_16B_8B
Target supports 16- and 8-bytes vectors.
vect_sizes_32B_16B
Target supports 32- and 16-bytes vectors.
vect_logical_reduc
Target supports AND, IOR and XOR reduction on vectors.
vect_fold_extract_last
Target supports the fold_extract_last optab.
vect_len_load_store
Target supports the len_load and len_store optabs.
vect_partial_vectors_usage_1
Target supports loop vectorization with partial vectors and vect-partial-
vector-usage is set to 1.
vect_partial_vectors_usage_2
Target supports loop vectorization with partial vectors and vect-partial-
vector-usage is set to 2.
vect_partial_vectors
Target supports loop vectorization with partial vectors and vect-partial-
vector-usage is nonzero.
vect_slp_v2qi_store_align
Target supports vectorization of 2-byte char stores with 2-byte aligned address
at plain -O2.
vect_slp_v4qi_store_align
Target supports vectorization of 4-byte char stores with 4-byte aligned address
at plain -O2.
Chapter 7: Testsuites 97
vect_slp_v4qi_store_unalign
Target supports vectorization of 4-byte char stores with unaligned address at
plain -O2.
struct_4char_block_move
Target supports block move for 8-byte aligned 4-byte size struct initialization.
vect_slp_v4qi_store_unalign_1
Target supports vectorization of 4-byte char stores with unaligned address or
store them with constant pool at plain -O2.
struct_8char_block_move
Target supports block move for 8-byte aligned 8-byte size struct initialization.
vect_slp_v8qi_store_unalign_1
Target supports vectorization of 8-byte char stores with unaligned address or
store them with constant pool at plain -O2.
struct_16char_block_move
Target supports block move for 8-byte aligned 16-byte size struct initialization.
vect_slp_v16qi_store_unalign_1
Target supports vectorization of 16-byte char stores with unaligned address or
store them with constant pool at plain -O2.
vect_slp_v2hi_store_align
Target supports vectorization of 4-byte short stores with 4-byte aligned addres-
sat plain -O2.
vect_slp_v2hi_store_unalign
Target supports vectorization of 4-byte short stores with unaligned address at
plain -O2.
vect_slp_v4hi_store_unalign
Target supports vectorization of 8-byte short stores with unaligned address at
plain -O2.
vect_slp_v2si_store_align
Target supports vectorization of 8-byte int stores with 8-byte aligned address
at plain -O2.
vect_slp_v4si_store_unalign
Target supports vectorization of 16-byte int stores with unaligned address at
plain -O2.
arm_neonv2_hw
Test system supports executing NEON v2 instructions.
arm_neon_ok
ARM Target supports -mfpu=neon -mfloat-abi=softfp or compatible op-
tions. Some multilibs may be incompatible with these options.
arm_neon_ok_no_float_abi
ARM Target supports NEON with -mfpu=neon, but without any -mfloat-abi=
option. Some multilibs may be incompatible with this option.
arm_neonv2_ok
ARM Target supports -mfpu=neon-vfpv4 -mfloat-abi=softfp or compatible
options. Some multilibs may be incompatible with these options.
arm_fp16_ok
Target supports options to generate VFP half-precision floating-point instruc-
tions. Some multilibs may be incompatible with these options. This test is
valid for ARM only.
arm_fp16_hw
Target supports executing VFP half-precision floating-point instructions. This
test is valid for ARM only.
arm_neon_fp16_ok
ARM Target supports -mfpu=neon-fp16 -mfloat-abi=softfp or compatible
options, including -mfp16-format=ieee if necessary to obtain the __fp16 type.
Some multilibs may be incompatible with these options.
arm_neon_fp16_hw
Test system supports executing Neon half-precision float instructions. (Implies
previous.)
arm_fp16_alternative_ok
ARM target supports the ARM FP16 alternative format. Some multilibs may
be incompatible with the options needed.
arm_fp16_none_ok
ARM target supports specifying none as the ARM FP16 format.
arm_thumb1_ok
ARM target generates Thumb-1 code for -mthumb.
arm_thumb2_ok
ARM target generates Thumb-2 code for -mthumb.
arm_nothumb
ARM target that is not using Thumb.
arm_vfp_ok
ARM target supports -mfpu=vfp -mfloat-abi=softfp. Some multilibs may
be incompatible with these options.
arm_vfp3_ok
ARM target supports -mfpu=vfp3 -mfloat-abi=softfp. Some multilibs may
be incompatible with these options.
100 GNU Compiler Collection (GCC) Internals
arm_arch_v8a_hard_ok
The compiler is targeting arm*-*-* and can compile and assemble code using
the options -march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard. This
is not enough to guarantee that linking works.
arm_arch_v8a_hard_multilib
The compiler is targeting arm*-*-* and can build programs using the options
-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard. The target can
also run the resulting binaries.
arm_v8_vfp_ok
ARM target supports -mfpu=fp-armv8 -mfloat-abi=softfp. Some multilibs
may be incompatible with these options.
arm_v8_neon_ok
ARM target supports -mfpu=neon-fp-armv8 -mfloat-abi=softfp. Some
multilibs may be incompatible with these options.
arm_v8_1a_neon_ok
ARM target supports options to generate ARMv8.1-A Adv.SIMD instructions.
Some multilibs may be incompatible with these options.
arm_v8_1a_neon_hw
ARM target supports executing ARMv8.1-A Adv.SIMD instructions.
Some multilibs may be incompatible with the options needed. Implies
arm v8 1a neon ok.
arm_acq_rel
ARM target supports acquire-release instructions.
arm_v8_2a_fp16_scalar_ok
ARM target supports options to generate instructions for ARMv8.2-A and
scalar instructions from the FP16 extension. Some multilibs may be incom-
patible with these options.
arm_v8_2a_fp16_scalar_hw
ARM target supports executing instructions for ARMv8.2-A and scalar instruc-
tions from the FP16 extension. Some multilibs may be incompatible with these
options. Implies arm v8 2a fp16 neon ok.
arm_v8_2a_fp16_neon_ok
ARM target supports options to generate instructions from ARMv8.2-A with
the FP16 extension. Some multilibs may be incompatible with these options.
Implies arm v8 2a fp16 scalar ok.
arm_v8_2a_fp16_neon_hw
ARM target supports executing instructions from ARMv8.2-A with the FP16
extension. Some multilibs may be incompatible with these options. Implies
arm v8 2a fp16 neon ok and arm v8 2a fp16 scalar hw.
arm_v8_2a_dotprod_neon_ok
ARM target supports options to generate instructions from ARMv8.2-A with
the Dot Product extension. Some multilibs may be incompatible with these
options.
Chapter 7: Testsuites 101
arm_v8_2a_dotprod_neon_hw
ARM target supports executing instructions from ARMv8.2-A with the Dot
Product extension. Some multilibs may be incompatible with these options.
Implies arm v8 2a dotprod neon ok.
arm_v8_2a_i8mm_neon_hw
ARM target supports executing instructions from ARMv8.2-A with the 8-bit
Matrix Multiply extension. Some multilibs may be incompatible with these
options. Implies arm v8 2a i8mm ok.
arm_fp16fml_neon_ok
ARM target supports extensions to generate the VFMAL and VFMLS half-precision
floating-point instructions available from ARMv8.2-A and onwards. Some mul-
tilibs may be incompatible with these options.
arm_v8_2a_bf16_neon_ok
ARM target supports options to generate instructions from ARMv8.2-A with
the BFloat16 extension (bf16). Some multilibs may be incompatible with these
options.
arm_v8_2a_i8mm_ok
ARM target supports options to generate instructions from ARMv8.2-A with
the 8-Bit Integer Matrix Multiply extension (i8mm). Some multilibs may be
incompatible with these options.
arm_v8_1m_mve_ok
ARM target supports options to generate instructions from ARMv8.1-M with
the M-Profile Vector Extension (MVE). Some multilibs may be incompatible
with these options.
arm_v8_1m_mve_fp_ok
ARM target supports options to generate instructions from ARMv8.1-M with
the Half-precision floating-point instructions (HP), Floating-point Extension
(FP) along with M-Profile Vector Extension (MVE). Some multilibs may be
incompatible with these options.
arm_mve_hw
Test system supports executing MVE instructions.
arm_v8m_main_cde
ARM target supports options to generate instructions from ARMv8-M with the
Custom Datapath Extension (CDE). Some multilibs may be incompatible with
these options.
arm_v8m_main_cde_fp
ARM target supports options to generate instructions from ARMv8-M with the
Custom Datapath Extension (CDE) and floating-point (VFP). Some multilibs
may be incompatible with these options.
arm_v8_1m_main_cde_mve
Arm target supports options to generate instructions from Armv8.1-M with the
Custom Datapath Extension (CDE) and M-Profile Vector Extension (MVE).
Some multilibs may be incompatible with these options.
102 GNU Compiler Collection (GCC) Internals
arm_v8_1m_main_cde_mve_fp
Arm target supports options to generate instructions from Armv8.1-M with the
Custom Datapath Extension (CDE) and M-Profile Vector Extension (MVE)
with floating-point support. Some multilibs may be incompatible with these
options.
arm_pacbti_hw
Test system supports executing Pointer Authentication and Branch Target
Identification instructions.
arm_prefer_ldrd_strd
ARM target prefers LDRD and STRD instructions over LDM and STM instructions.
arm_thumb1_movt_ok
ARM target generates Thumb-1 code for -mthumb with MOVW and MOVT instruc-
tions available.
arm_thumb1_cbz_ok
ARM target generates Thumb-1 code for -mthumb with CBZ and CBNZ instruc-
tions available.
arm_divmod_simode
ARM target for which divmod transform is disabled, if it supports hardware
div instruction.
arm_cmse_ok
ARM target supports ARMv8-M Security Extensions, enabled by the -mcmse
option.
arm_cmse_hw
Test system supports executing CMSE instructions.
arm_coproc1_ok
ARM target supports the following coprocessor instructions: CDP, LDC, STC,
MCR and MRC.
arm_coproc2_ok
ARM target supports all the coprocessor instructions also listed as supported
in [arm coproc1 ok], page 102, in addition to the following: CDP2, LDC2, LDC2l,
STC2, STC2l, MCR2 and MRC2.
arm_coproc3_ok
ARM target supports all the coprocessor instructions also listed as supported
in [arm coproc2 ok], page 102, in addition the following: MCRR and MRRC.
arm_coproc4_ok
ARM target supports all the coprocessor instructions also listed as supported
in [arm coproc3 ok], page 102, in addition the following: MCRR2 and MRRC2.
arm_simd32_ok
ARM Target supports options suitable for accessing the SIMD32 intrinsics from
arm_acle.h. Some multilibs may be incompatible with these options.
Chapter 7: Testsuites 103
arm_sat_ok
ARM Target supports options suitable for accessing the saturation intrinsics
from arm_acle.h. Some multilibs may be incompatible with these options.
arm_dsp_ok
ARM Target supports options suitable for accessing the DSP intrinsics from
arm_acle.h. Some multilibs may be incompatible with these options.
arm_softfp_ok
ARM target supports the -mfloat-abi=softfp option.
arm_hard_ok
ARM target supports the -mfloat-abi=hard option.
arm_mve ARM target supports generating MVE instructions.
arm_v8_1_lob_ok
ARM Target supports executing the Armv8.1-M Mainline Low Overhead Loop
instructions DLS and LE. Some multilibs may be incompatible with these op-
tions.
arm_thumb2_no_arm_v8_1_lob
ARM target where Thumb-2 is used without options but does not support
executing the Armv8.1-M Mainline Low Overhead Loop instructions DLS and
LE.
arm_thumb2_ok_no_arm_v8_1_lob
ARM target generates Thumb-2 code for -mthumb but does not support exe-
cuting the Armv8.1-M Mainline Low Overhead Loop instructions DLS and LE.
mbranch_protection_ok
ARM target supporting -mbranch-protection=standard.
arm_pacbti_hw
Test system supports for executing non nop pacbti instructions.
aarch64_small_fpic
Binutils installed on test system supports relocation types required by -fpic for
AArch64 small memory model.
aarch64_sme
AArch64 target that generates instructions for SME.
aarch64_sme2
AArch64 target that generates instructions for SME2.
aarch64_sve_hw
AArch64 target that is able to generate and execute SVE code (regardless of
whether it does so by default).
aarch64_sve128_hw
aarch64_sve256_hw
aarch64_sve512_hw
aarch64_sve1024_hw
aarch64_sve2048_hw
Like aarch64_sve_hw, but also test for an exact hardware vector length.
aarch64_fjcvtzs_hw
AArch64 target that is able to generate and execute armv8.3-a FJCVTZS in-
struction.
mips_newabi_large_long_double
MIPS target supports long double larger than double when using the new
ABI.
mpaired_single
MIPS target supports -mpaired-single.
powerpc_spe_nocache
Including the options used to compile this particular test, the PowerPC target
supports PowerPC SPE.
powerpc_spu
PowerPC target supports PowerPC SPU.
powerpc_vsx_ok
PowerPC target supports -mvsx.
powerpc_405_nocache
Including the options used to compile this particular test, the PowerPC target
supports PowerPC 405.
ppc_recip_hw
PowerPC target supports executing reciprocal estimate instructions.
vmx_hw PowerPC target supports executing AltiVec instructions.
vsx_hw PowerPC target supports executing VSX instructions (ISA 2.06).
has_arch_pwr5
PowerPC target pre-defines macro ARCH PWR5 which means the -mcpu set-
ting is Power5 or later.
has_arch_pwr6
PowerPC target pre-defines macro ARCH PWR6 which means the -mcpu set-
ting is Power6 or later.
has_arch_pwr7
PowerPC target pre-defines macro ARCH PWR7 which means the -mcpu set-
ting is Power7 or later.
has_arch_pwr8
PowerPC target pre-defines macro ARCH PWR8 which means the -mcpu set-
ting is Power8 or later.
has_arch_pwr9
PowerPC target pre-defines macro ARCH PWR9 which means the -mcpu set-
ting is Power9 or later.
fenv_exceptions
Target supports fenv.h with all the standard IEEE exceptions and floating-
point exceptions are raised by arithmetic operations.
fenv_exceptions_dfp
Target supports fenv.h with all the standard IEEE exceptions and floating-
point exceptions are raised by arithmetic operations for decimal floating point.
fileio Target offers such file I/O library functions as fopen, fclose, tmpnam, and
remove. This is a link-time requirement for the presence of the functions in
the library; even if they fail at runtime, the requirement is still regarded as
satisfied.
freestanding
Target is ‘freestanding’ as defined in section 4 of the C99 standard. Effec-
tively, it is a target which supports no extra headers or libraries other than
what is considered essential.
gettimeofday
Target supports gettimeofday.
init_priority
Target supports constructors with initialization priority arguments.
inttypes_types
Target has the basic signed and unsigned types in inttypes.h. This is for
tests that GCC’s notions of these types agree with those in the header, as some
systems have only inttypes.h.
lax_strtofp
Target might have errors of a few ULP in string to floating-point conversion
functions and overflow is not always detected correctly by those functions.
mempcpy Target provides mempcpy function.
mmap Target supports mmap.
newlib Target supports Newlib.
newlib_nano_io
GCC was configured with --enable-newlib-nano-formatted-io, which re-
duces the code size of Newlib formatted I/O functions.
posix_memalign
Target supports posix_memalign.
pow10 Target provides pow10 function.
pthread Target can compile using pthread.h with no errors or warnings.
pthread_h
Target has pthread.h.
sockets Target can compile using sys/socket.h with no errors or warnings.
Chapter 7: Testsuites 111
run_expensive_tests
Expensive testcases (usually those that consume excessive amounts of CPU
time) should be run on this target. This can be enabled by setting the GCC_
TEST_RUN_EXPENSIVE environment variable to a non-empty string.
simulator
Test system runs executables on a simulator (i.e. slowly) rather than hardware
(i.e. fast).
signal Target has signal.h.
stabs Target supports the stabs debugging format.
stdint_types
Target has the basic signed and unsigned C types in stdint.h. This will be
obsolete when GCC ensures a working stdint.h for all targets.
stdint_types_mbig_endian
Target accepts the option -mbig-endian and stdint.h can be included without
error when -mbig-endian is passed.
stpcpy Target provides stpcpy function.
strndup Target provides strndup function.
sysconf Target supports sysconf.
trampolines
Target supports trampolines.
two_plus_gigs
Target supports linking programs with 2+GiB of data.
uclibc Target supports uClibc.
unwrapped
Target does not use a status wrapper.
vxworks_kernel
Target is a VxWorks kernel.
vxworks_rtp
Target is a VxWorks RTP.
wchar Target supports wide characters.
weak_undefined
Target supports weak undefined symbols
automatic_stack_alignment
Target supports automatic stack alignment.
branch_cost
Target supports -branch-cost=N.
const_volatile_readonly_section
Target places const volatile variables in readonly sections.
cxa_atexit
Target uses __cxa_atexit.
default_packed
Target has packed layout of structure members by default.
exceptions
Target supports exceptions.
exceptions_enabled
Target supports exceptions and they are enabled in the current testing config-
uration.
fgraphite
Target supports Graphite optimizations.
fixed_point
Target supports fixed-point extension to C.
bitint Target supports BitInt(N).
bitint128
Target supports BitInt(128).
bitint575
Target supports BitInt(575).
bitint65535
Target supports BitInt(65535).
fopenacc Target supports OpenACC via -fopenacc.
fopenmp Target supports OpenMP via -fopenmp.
fpic Target supports -fpic and -fPIC.
freorder Target supports -freorder-blocks-and-partition.
fstack_protector
Target supports -fstack-protector.
gas Target uses GNU as.
gc_sections
Target supports --gc-sections.
gld Target uses GNU ld.
keeps_null_pointer_checks
Target keeps null pointer checks, either due to the use of -fno-delete-null-
pointer-checks or hardwired into the target.
Chapter 7: Testsuites 113
llvm_binutils
Target is using an LLVM assembler and/or linker, instead of GNU Binutils.
lra Target supports local register allocator (LRA). This must not be called (results
in ERROR) for targets that don’t do register allocation, and therefore neither use
nor don’t use LRA.
lto Compiler has been configured to support link-time optimization (LTO).
lto_incremental
Compiler and linker support link-time optimization relocatable linking with -r
and -flto options.
thread_fence
Target implements __atomic_thread_fence without relying on non-
implemented __sync_synchronize().
naked_functions
Target supports the naked function attribute.
named_sections
Target supports named sections.
natural_alignment_32
Target uses natural alignment (aligned to type size) for types of 32 bits or less.
tail_call
Target supports tail-call optimizations.
target_natural_alignment_64
Target uses natural alignment (aligned to type size) for types of 64 bits or less.
no_alignment_constraints
Target defines BIGGEST ALIGNMENT =1. Hence target imposes no
alignment constraints. This is similar, but not necessarily the same as
[default packed], page 112. Although BIGGEST_FIELD_ALIGNMENT defaults to
BIGGEST_ALIGNMENT for most targets, it is possible for a target to set those
two with different values and have different alignment constraints for aggregate
and non-aggregate types.
noinit Target supports the noinit variable attribute.
nonpic Target does not generate PIC by default.
o_flag_in_section
Target supports the ’o’ flag in .section directive in assembly inputs.
offload_gcn
Target has been configured for OpenACC/OpenMP offloading on AMD GCN.
persistent
Target supports the persistent variable attribute.
pie_enabled
Target generates PIE by default.
114 GNU Compiler Collection (GCC) Internals
pcc_bitfield_type_matters
Target defines PCC_BITFIELD_TYPE_MATTERS.
pe_aligned_commons
Target supports -mpe-aligned-commons.
pie Target supports -pie, -fpie and -fPIE.
linker_plugin
Target supports the linker plugin.
rdynamic Target supports -rdynamic.
scalar_all_fma
Target supports all four fused multiply-add optabs for both float and double.
These optabs are: fma_optab, fms_optab, fnma_optab and fnms_optab.
section_anchors
Target supports section anchors.
short_enums
Target defaults to short enums.
stack_size
Target has limited stack size. The stack size limit can be obtained using
the STACK SIZE macro defined by [dg-add-options feature stack_size],
page 117.
Note that for certain targets, stack size limits are relevant for execution only,
and therefore considered only if dg-do run is in effect, otherwise unlimited.
static Target supports -static.
static_libgfortran
Target supports statically linking ‘libgfortran’.
string_merging
Target supports merging string constants at link time.
strub Target supports attribute strub for stack scrubbing.
ucn Target supports compiling and assembling UCN.
ucn_nocache
Including the options used to compile this particular test, the target supports
compiling and assembling UCN.
unaligned_stack
Target does not guarantee that its STACK_BOUNDARY is greater than or equal to
the required vector alignment.
vector_alignment_reachable
Vector alignment is reachable for types of 32 bits or less.
vector_alignment_reachable_for_64bit
Vector alignment is reachable for types of 64 bits or less.
Chapter 7: Testsuites 115
vma_equals_lma
Target generates executable with VMA equal to LMA for .data section.
wchar_t_char16_t_compatible
Target supports wchar_t that is compatible with char16_t.
wchar_t_char32_t_compatible
Target supports wchar_t that is compatible with char32_t.
comdat_group
Target uses comdat groups.
indirect_calls
Target supports indirect calls, i.e. calls where the target is not constant.
lgccjit Target supports -lgccjit, i.e. libgccjit.so can be linked into jit tests.
__OPTIMIZE__
Optimizations are enabled (__OPTIMIZE__) per the current compiler flags.
arm_v8_2a_dotprod_neon
Add options for ARMv8.2-A with Adv.SIMD Dot Product support, if this is
supported by the target; see the [arm v8 2a dotprod neon ok], page 100, ef-
fective target keyword.
arm_fp16fml_neon
Add options to enable generation of the VFMAL and VFMSL instructions, if this
is supported by the target; see the [arm fp16fml neon ok], page 101, effective
target keyword.
arm_dsp Add options for ARM DSP intrinsics support, if this is supported by the target;
see the [arm dsp ok effective target keyword], page 103.
bind_pic_locally
Add the target-specific flags needed to enable functions to bind locally when
using pic/PIC passes in the testsuite.
floatn Add the target-specific flags needed to use the _Floatn type.
floatnx Add the target-specific flags needed to use the _Floatnx type.
ieee Add the target-specific flags needed to enable full IEEE compliance mode.
mips16_attribute
mips16 function attributes. Only MIPS targets support this feature, and only
then in certain modes.
stack_size
Add the flags needed to define macro STACK SIZE and set it to the stack size
limit associated with the [stack_size effective target], page 114.
sqrt_insn
Add the target-specific flags needed to enable hardware square root instructions,
if any.
tls Add the target-specific flags needed to use thread-local storage.
vect_early_break
Add the target-specific flags needed to enable early break vectorization for a
target, if any. This requires the target to have an implementation of the cbranch
optab.
weak_undefined
Add the flags needed to enable support for weak undefined symbols.
dg-require-stack-check check
Skip the test if the target does not support the -fstack-check option. If check
is "", support for -fstack-check is checked, for -fstack-check=("check")
otherwise.
dg-require-stack-size size
Skip the test if the target does not support a stack size of size.
dg-require-visibility vis
Skip the test if the target does not support the visibility attribute. If vis
is "", support for visibility("hidden") is checked, for visibility("vis")
otherwise.
The original dg-require directives were defined before there was support for effective-
target keywords. The directives that do not take arguments could be replaced with effective-
target keywords.
dg-require-alias ""
Skip the test if the target does not support the ‘alias’ attribute.
dg-require-ascii-locale ""
Skip the test if the host does not support an ASCII locale.
dg-require-compat-dfp ""
Skip this test unless both compilers in a compat testsuite support decimal float-
ing point.
dg-require-cxa-atexit ""
Skip the test if the target does not support __cxa_atexit. This is equivalent
to dg-require-effective-target cxa_atexit.
dg-require-dll ""
Skip the test if the target does not support DLL attributes.
dg-require-dot ""
Skip the test if the host does not have dot.
dg-require-fork ""
Skip the test if the target does not support fork.
dg-require-gc-sections ""
Skip the test if the target’s linker does not support the --gc-sections flags.
This is equivalent to dg-require-effective-target gc-sections.
dg-require-host-local ""
Skip the test if the host is remote, rather than the same as the build system.
Some tests are incompatible with DejaGnu’s handling of remote hosts, which
involves copying the source file to the host and compiling it with a relative path
and "-o a.out".
dg-require-linker-plugin ""
Skip the test is the target does not support the linker plugin. This is equivalent
to dg-require-effective-target linker_plugin.
Chapter 7: Testsuites 119
dg-require-mkfifo ""
Skip the test if the target does not support mkfifo.
dg-require-named-sections ""
Skip the test is the target does not support named sections. This is equivalent
to dg-require-effective-target named_sections.
dg-require-weak ""
Skip the test if the target does not support weak symbols.
dg-require-weak-override ""
Skip the test if the target does not support overriding weak symbols.
a function as a single regular expression. This means that later lines can use
backslashes to refer back to ‘(...)’ captures on earlier lines. For example:
/* { dg-final { check-function-bodies "**" "" "-DCHECK_ASM" } } */
...
/*
** add_w0_s8_m:
** mov (z[0-9]+\.b), w0
** add z0\.b, p0/m, z0\.b, \1
** ret
*/
svint8_t add_w0_s8_m (...) { ... }
...
/*
** add_b0_s8_m:
** mov (z[0-9]+\.b), b0
** add z1\.b, p0/m, z1\.b, \1
** ret
*/
svint8_t add_b0_s8_m (...) { ... }
checks whether the implementations of add_w0_s8_m and add_b0_s8_m match
the regular expressions given. The test only runs when ‘-DCHECK_ASM’ is passed
on the command line.
It is possible to create non-capturing multi-line regular expression groups of
the form ‘(a|b|...)’ by putting the ‘(’, ‘|’ and ‘)’ on separate lines (each still
using prefix). For example:
/*
** cmple_f16_tied:
** (
** fcmge p0\.h, p0/z, z1\.h, z0\.h
** |
** fcmle p0\.h, p0/z, z0\.h, z1\.h
** )
** ret
*/
svbool_t cmple_f16_tied (...) { ... }
checks whether cmple_f16_tied is implemented by the fcmge instruction fol-
lowed by ret or by the fcmle instruction followed by ret. The test is still a
single regular rexpression.
A line containing just:
prefix ...
stands for zero or more unmatched lines; the whitespace after prefix is again
not significant.
keep-modules "list-of-modules-not-to-delete"
Whitespace separated list of module names that should not be deleted by
cleanup-modules. If the list of modules is empty, all modules defined in this file
are kept.
module maybe_unneeded
end module maybe_unneeded
module keep1
end module keep1
module keep2
end module keep2
! { dg-final { keep-modules "keep1 keep2" } } ! just keep these two
! { dg-final { keep-modules "" } } ! keep all
dg-keep-saved-temps "list-of-suffixes-not-to-delete"
Whitespace separated list of suffixes that should not be deleted automatically
in a testcase that uses -save-temps.
124 GNU Compiler Collection (GCC) Internals
cleanup-profile-file
Removes profiling files generated for this test.
gcc.dg/format
This subdirectory contains tests of the -Wformat format checking. Tests in this
directory are run with and without -DWIDE.
gcc.dg/noncompile
This subdirectory contains tests of code that should not compile and does not
need any special compilation options. They are run with multiple optimization
options, since sometimes invalid code crashes the compiler with optimization.
gcc.dg/special
FIXME: describe this.
gcc.c-torture
This contains particular code fragments which have historically broken easily.
These tests are run with multiple optimization options, so tests for features
which only break at some optimization levels belong here. This also contains
tests to check that certain optimizations occur. It might be worthwhile to
separate the correctness tests cleanly from the code quality tests, but it hasn’t
been done yet.
gcc.c-torture/compat
FIXME: describe this.
This directory should probably not be used for new tests.
gcc.c-torture/compile
This testsuite contains test cases that should compile, but do not need to link
or run. These test cases are compiled with several different combinations of
optimization options. All warnings are disabled for these test cases, so this
directory is not suitable if you wish to test for the presence or absence of
compiler warnings. While special options can be set, and tests disabled on
specific platforms, by the use of .x files, mostly these test cases should not
contain platform dependencies. FIXME: discuss how defines such as STACK_
SIZE are used.
gcc.c-torture/execute
This testsuite contains test cases that should compile, link and run; otherwise
the same comments as for gcc.c-torture/compile apply.
gcc.c-torture/execute/ieee
This contains tests which are specific to IEEE floating point.
gcc.c-torture/unsorted
FIXME: describe this.
This directory should probably not be used for new tests.
gcc.misc-tests
This directory contains C tests that require special handling. Some of these
tests have individual expect files, and others share special-purpose expect files:
bprob*.c Test -fbranch-probabilities using gcc.misc-
tests/bprob.exp, which in turn uses the generic,
language-independent framework (see Section 7.7 [Sup-
port for testing profile-directed optimizations], page 127).
126 GNU Compiler Collection (GCC) Internals
gcov*.c Test gcov output using gcov.exp, which in turn uses the language-
independent support (see Section 7.6 [Support for testing gcov],
page 126).
i386-pf-*.c
Test i386-specific support for data prefetch using i386-
prefetch.exp.
gcc.test-framework
dg-*.c Test the testsuite itself using gcc.test-framework/test-
framework.exp.
FIXME: merge in testsuite/README.gcc and discuss the format of test cases and magic
comments more.
on procedures in lib/gcc-dg.exp to compile and run the test program. A typical gcov
test contains the following DejaGnu commands within comments:
{ dg-options "--coverage" }
{ dg-do run { target native } }
{ dg-final { run-gcov sourcefile } }
Checks of gcov output can include line counts, branch percentages, and call return per-
centages. All of these checks are requested via commands that appear in comments in the
test’s source file. Commands to check line counts are processed by default. Commands to
check branch percentages and call return percentages are processed if the run-gcov com-
mand has arguments branches or calls, respectively. For example, the following specifies
checking both, as well as passing -b to gcov:
{ dg-final { run-gcov branches calls { -b sourcefile } } }
A line count command appears within a comment on the source line that is expected to
get the specified count and has the form count(cnt). A test should only check line counts
for lines that will get the same count for any architecture.
Commands to check branch percentages (branch) and call return percentages (returns)
are very similar to each other. A beginning command appears on or before the first of a
range of lines that will report the percentage, and the ending command follows that range
of lines. The beginning command can include a list of percentages, all of which are expected
to be found within the range. A range is terminated by the next command of the same kind.
A command branch(end) or returns(end) marks the end of a range without starting a
new one. For example:
if (i > 10 && j > i && j < 20) /* branch(27 50 75) */
/* branch(end) */
foo (i, j);
For a call return percentage, the value specified is the percentage of calls reported to
return. For a branch percentage, the value is either the expected percentage or 100 mi-
nus that value, since the direction of a branch can differ depending on the target or the
optimization level.
Not all branches and calls need to be checked. A test should not check for branches that
might be optimized away or replaced with predicated instructions. Don’t check for calls
inserted by the compiler or ones that might be inlined or optimized away.
A single test can check for combinations of line counts, branch percentages, and call
return percentages. The command to check a line count must appear on the line that will
report that count, but commands to check branch percentages and call return percentages
can bracket the lines that report them.
profopt.exp provides generic support for profile-directed optimizations. Each set of tests
that uses it provides information about a specific optimization:
tool tool being tested, e.g., gcc
profile_option
options used to generate profile data
feedback_option
options used to optimize using that profile data
prof_ext suffix of profile data files
PROFOPT_OPTIONS
list of options with which to run each test, similar to the lists for torture tests
{ dg-final-generate { local-directive } }
This directive is similar to dg-final, but the local-directive is run after the
generation of profile data.
{ dg-final-use { local-directive } }
The local-directive is run after the profile data have been used.
where tsti and alti are lists of options, with tsti used by the compiler under test and alti
used by the alternate compiler. For example, with [list [list {-g -O0} {-O3}] [list
{-fpic} {-fPIC -O2}]], the test is first built with -g -O0 by the compiler under test and
with -O3 by the alternate compiler. The test is built a second time using -fpic by the
compiler under test and -fPIC -O2 by the alternate compiler.
An alternate compiler is specified by defining an environment variable to be the full
pathname of an installed compiler; for C define ALT_CC_UNDER_TEST, and for C++ define
ALT_CXX_UNDER_TEST. These will be written to the site.exp file used by DejaGnu. The
default is to build each test with the compiler under test using the first of each pair of
compiler options from COMPAT_OPTIONS. When ALT_CC_UNDER_TEST or ALT_CXX_UNDER_
TEST is same, each test is built using the compiler under test but with combinations of the
options from COMPAT_OPTIONS.
To run only the C++ compatibility suite using the compiler under test and another version
of GCC using specific compiler options, do the following from objdir/gcc:
rm site.exp
make -k \
ALT_CXX_UNDER_TEST=${alt_prefix}/bin/g++ \
COMPAT_OPTIONS="lists as shown above" \
check-c++ \
RUNTESTFLAGS="compat.exp"
A test that fails when the source files are compiled with different compilers, but passes
when the files are compiled with the same compiler, demonstrates incompatibility of the
generated code or runtime support. A test that fails for the alternate compiler but passes
for the compiler under test probably tests for a bug that was fixed in the compiler under
test but is present in the alternate compiler.
The binary compatibility tests support a small number of test framework commands that
appear within comments in a test file.
dg-require-*
These commands can be used in testname_main.suffix to skip the test if
specific support is not available on the target.
dg-options
The specified options are used for compiling this particular source file, ap-
pended to the options from COMPAT_OPTIONS. When this command appears in
testname_main.suffix the options are also used to link the test program.
dg-xfail-if
This command can be used in a secondary source file to specify that compilation
is expected to fail for particular options on particular targets.
set-torture-options
Set lists of torture options to use for tests with and without loops. Optionally
combine a set of torture options with a set of other options, as is done with
Objective-C runtime options.
torture-finish
Finalize use of torture lists.
The .exp file for a set of tests that use torture options must include calls to these three
procedures if:
• It calls gcc-dg-runtest and overrides DG TORTURE OPTIONS.
• It calls ${tool}-torture or ${tool}-torture-execute, where tool is c, fortran, or
objc.
• It calls dg-pch.
It is not necessary for a .exp file that calls gcc-dg-runtest to call the torture procedures
if the tests should use the list in DG TORTURE OPTIONS defined in gcc-dg.exp.
Most uses of torture options can override the default lists by defin-
ing TORTURE OPTIONS or add to the default list by defining ADDI-
TIONAL TORTURE OPTIONS. Define these in a .dejagnurc file or add them
to the site.exp file; for example
set ADDITIONAL_TORTURE_OPTIONS [list \
{ -O2 -ftree-loop-linear } \
{ -O2 -fpeel-loops } ]
bb_2:
if (a > 4)
goto bb_3;
else
goto bb_4;
bb_3:
a_2 = 10;
goto bb_5;
bb_4:
a_3 = 20;
bb_5:
a_1 = __PHI (bb_3: a_2, bb_4: a_3);
a_4 = a_1 + 4;
Chapter 7: Testsuites 131
return;
}
The startwith argument indicates at which pass to begin.
Use the dump modifier -gimple (e.g. -fdump-tree-all-gimple) to make tree dumps
more closely follow the format accepted by the GIMPLE parser.
Example DejaGnu tests of GIMPLE can be seen in the source tree at
gcc/testsuite/gcc.dg/gimplefe-*.c.
The __GIMPLE parser is integrated with the C tokenizer and preprocessor, so it should be
possible to use macros to build out test coverage.
Type(type)
This property is required; type is the C type for variables set by options
using this enumeration together with Var.
UnknownError(message)
The message message will be used as an error message if the argument is
invalid; for enumerations without UnknownError, a generic error message
is used. message should contain a single ‘%qs’ format, which will be used
to format the invalid argument.
• An enumeration value record to define one of the strings in a set given in an ‘Enum’
record. These records have two fields: the string ‘EnumValue’ and a space-separated
list of properties. Properties use the same format as option properties; the following
are valid:
Enum(name)
This property is required; name says which ‘Enum’ record this ‘EnumValue’
record corresponds to.
String(string)
This property is required; string is the string option argument being de-
scribed by this record.
Value(value)
This property is required; it says what value (representable as int) should
be used for the given string.
Canonical
This property is optional. If present, it says the present string is the
canonical one among all those with the given value. Other strings yielding
that value will be mapped to this one so specs do not need to handle them.
DriverOnly
This property is optional. If present, the present string will only be ac-
cepted by the driver. This is used for cases such as -march=native that
are processed by the driver so that ‘gcc -v’ shows how the options chosen
depended on the system on which the compiler was run.
Set(number)
This property is optional, required for enumerations used in EnumSet op-
tions. number should be decimal number between 1 and 64 inclusive and
divides the enumeration into a set of sets of mutually exclusive arguments.
Arguments with the same number can’t be specified together in the same
option, but arguments with different number can. value needs to be chosen
such that a mask of all value values from the same set number bitwise ored
doesn’t overlap with masks for other sets. When -foption=arg_from_
set1,arg_from_set4 and -fno-option=arg_from_set3 are used, the ef-
fect is that previous value of the Var will get bits from set 1 and 4 masks
cleared, ored Value of arg_from_set1 and arg_from_set4 and then will
get bits from set 3 mask cleared.
• An option definition record. These records have the following fields:
1. the name of the option, with the leading “-” removed
Chapter 8: Option specification files 135
It is possible to specify several different languages for the same option. Each
language must have been declared by an earlier Language record. See Sec-
tion 8.1 [Option file format], page 133.
RejectDriver
The option is only handled by the compilers proper (cc1 etc.) and should not
be accepted by the driver.
RejectNegative
The option does not have a “no-” form. All options beginning with “f”, “g”,
“W” or “m” are assumed to have a “no-” form unless this property is used.
Negative(othername)
The option will turn off another option othername, which is the option name
with the leading “-” removed. This chain action will propagate through the
Negative property of the option to be turned off. The driver will prune op-
tions, removing those that are turned off by some later option. This pruning is
not done for options with Joined or JoinedOrMissing properties, unless the
options have both the RejectNegative property and the Negative property
mentions itself.
As a consequence, if you have a group of mutually-exclusive options, their
Negative properties should form a circular chain. For example, if options -a,
-b and -c are mutually exclusive, their respective Negative properties should
be ‘Negative(b)’, ‘Negative(c)’ and ‘Negative(a)’.
Joined
Separate The option takes a mandatory argument. Joined indicates that the option and
argument can be included in the same argv entry (as with -mflush-func=name,
for example). Separate indicates that the option and argument can be separate
argv entries (as with -o). An option is allowed to have both of these properties.
JoinedOrMissing
The option takes an optional argument. If the argument is given, it will be part
of the same argv entry as the option itself.
This property cannot be used alongside Joined or Separate.
MissingArgError(message)
For an option marked Joined or Separate, the message message will be used
as an error message if the mandatory argument is missing; for options without
MissingArgError, a generic error message is used. message should contain a
single ‘%qs’ format, which will be used to format the name of the option passed.
Args(n) For an option marked Separate, indicate that it takes n arguments. The default
is 1.
UInteger The option’s argument is a non-negative integer consisting of either decimal
or hexadecimal digits interpreted as int. Hexadecimal integers may optionally
start with the 0x or 0X prefix. The option parser validates and converts the
argument before passing it to the relevant option handler. UInteger should
also be used with options like -falign-loops where both -falign-loops and
-falign-loops=n are supported to make sure the saved options are given a
Chapter 8: Option specification files 137
full integer. Positive values of the argument in excess of INT_MAX wrap around
zero.
Host_Wide_Int
The option’s argument is a non-negative integer consisting of either decimal or
hexadecimal digits interpreted as the widest integer type on the host. As with
an UInteger argument, hexadecimal integers may optionally start with the 0x
or 0X prefix. The option parser validates and converts the argument before
passing it to the relevant option handler. Host_Wide_Int should be used with
options that need to accept very large values. Positive values of the argument
in excess of HOST_WIDE_INT_M1U are assigned HOST_WIDE_INT_M1U.
IntegerRange(n, m)
The options’s arguments are integers of type int. The option’s parser validates
that the value of an option integer argument is within the closed range [n, m].
ByteSize A property applicable only to UInteger or Host_Wide_Int arguments. The
option’s integer argument is interpreted as if in infinite precision using satu-
ration arithmetic in the corresponding type. The argument may be followed
by a ‘byte-size’ suffix designating a multiple of bytes such as kB and KiB for
kilobyte and kibibyte, respectively, MB and MiB for megabyte and mebibyte, GB
and GiB for gigabyte and gigibyte, and so on. ByteSize should be used for
with options that take a very large argument representing a size in bytes, such
as -Wlarger-than=.
ToLower The option’s argument should be converted to lowercase as part of putting it in
canonical form, and before comparing with the strings indicated by any Enum
property.
NoDriverArg
For an option marked Separate, the option only takes an argument in the com-
piler proper, not in the driver. This is for compatibility with existing options
that are used both directly and via -Wp,; new options should not have this
property.
Var(var) The state of this option should be stored in variable var (actually a macro for
global_options.x_var). The way that the state is stored depends on the type
of option:
• If the option uses the Mask or InverseMask properties, var is the integer
variable that contains the mask.
• If the option is a normal on/off switch, var is an integer variable that is
nonzero when the option is enabled. The options parser will set the variable
to 1 when the positive form of the option is used and 0 when the “no-”
form is used.
• If the option takes an argument and has the UInteger property, var is an
integer variable that stores the value of the argument.
• If the option takes an argument and has the Enum property, var is a variable
(type given in the Type property of the ‘Enum’ record whose Name property
has the same argument as the Enum property of this option) that stores the
value of the argument.
138 GNU Compiler Collection (GCC) Internals
Enum(name)
The option’s argument is a string from the set of strings associated with the
corresponding ‘Enum’ record. The string is checked and converted to the integer
specified in the corresponding ‘EnumValue’ record before being passed to option
handlers.
EnumSet Must be used together with the Enum(name) property. Corresponding ‘Enum’
record must use Set properties. The option’s argument is either a string from
the set like for Enum(name), but with a slightly different behavior that the
whole Var isn’t overwritten, but only the bits in all the enumeration values
with the same set bitwise ored together. Or option’s argument can be a comma
separated list of strings where each string is from a different Set(number).
EnumBitSet
Must be used together with the Enum(name) property. Similar to ‘EnumSet’,
but corresponding ‘Enum’ record must not use Set properties, each EnumValue
should have Value that is a power of 2, each value is treated as its own set and
its value as the set’s mask, so there are no mutually exclusive arguments.
Defer The option should be stored in a vector, specified with Var, for later processing.
Alias(opt)
Alias(opt, arg)
Alias(opt, posarg, negarg)
The option is an alias for -opt (or the negative form of that option, depending
on NegativeAlias). In the first form, any argument passed to the alias is
considered to be passed to -opt, and -opt is considered to be negated if the
alias is used in negated form. In the second form, the alias may not be negated
or have an argument, and posarg is considered to be passed as an argument
to -opt. In the third form, the alias may not have an argument, if the alias is
used in the positive form then posarg is considered to be passed to -opt, and
if the alias is used in the negative form then negarg is considered to be passed
to -opt.
Aliases should not specify Var or Mask or UInteger. Aliases should normally
specify the same languages as the target of the alias; the flags on the target
will be used to determine any diagnostic for use of an option for the wrong
language, while those on the alias will be used to identify what command-line
text is the option and what text is any argument to that option.
When an Alias definition is used for an option, driver specs do not need to
handle it and no ‘OPT_’ enumeration value is defined for it; only the canonical
form of the option will be seen in those places.
NegativeAlias
For an option marked with Alias(opt), the option is considered to be an alias
for the positive form of -opt if negated and for the negative form of -opt if
not negated. NegativeAlias may not be used with the forms of Alias taking
more than one argument.
140 GNU Compiler Collection (GCC) Internals
Ignore This option is ignored apart from printing any warning specified using Warn.
The option will not be seen by specs and no ‘OPT_’ enumeration value is defined
for it.
SeparateAlias
For an option marked with Joined, Separate and Alias, the option only acts
as an alias when passed a separate argument; with a joined argument it acts as
a normal option, with an ‘OPT_’ enumeration value. This is for compatibility
with the Java -d option and should not be used for new options.
Warn(message)
If this option is used, output the warning message. message is a format string,
either taking a single operand with a ‘%qs’ format which is the option name, or
not taking any operands, which is passed to the ‘warning’ function. If an alias
is marked Warn, the target of the alias must not also be marked Warn.
Warning This is a warning option and should be shown as such in --help output. This
flag does not currently affect anything other than --help.
Optimization
This is an optimization option. It should be shown as such in --help output,
and any associated variable named using Var should be saved and restored when
the optimization level is changed with optimize attributes.
PerFunction
This is an option that can be overridden on a per-function basis. Optimization
implies PerFunction, but options that do not affect executable code generation
may use this flag instead, so that the option is not taken into account in ways
that might affect executable code generation.
Param This is an option that is a parameter.
Undocumented
The option is deliberately missing documentation and should not be included
in the --help output.
Condition(cond)
The option should only be accepted if preprocessor condition cond is true. Note
that any C declarations associated with the option will be present even if cond
is false; cond simply controls whether the option is accepted and whether it is
printed in the --help output.
Save Build the cl_target_option structure to hold a copy of the option, add the
functions cl_target_option_save and cl_target_option_restore to save
and restore the options.
SetByCombined
The option may also be set by a combined option such as -ffast-math. This
causes the gcc_options struct to have a field frontend_set_name, where name
is the name of the field holding the value of this option (without the leading
x_). This gives the front end a way to indicate that the value has been set
explicitly and should not be changed by the combined option. For example,
Chapter 8: Option specification files 141
some front ends use this to prevent -ffast-math and -fno-fast-math from
changing the value of -fmath-errno for languages that do not use errno.
EnabledBy(opt)
EnabledBy(opt || opt2)
EnabledBy(opt && opt2)
If not explicitly set, the option is set to the value of -opt; multiple options can
be given, separated by ||. The third form using && specifies that the option is
only set if both opt and opt2 are set. The options opt and opt2 must have the
Common property; otherwise, use LangEnabledBy.
LangEnabledBy(language, opt)
LangEnabledBy(language, opt, posarg, negarg)
When compiling for the given language, the option is set to the value of -opt, if
not explicitly set. opt can be also a list of || separated options. In the second
form, if opt is used in the positive form then posarg is considered to be passed
to the option, and if opt is used in the negative form then negarg is considered
to be passed to the option. It is possible to specify several different languages.
Each language must have been declared by an earlier Language record. See
Section 8.1 [Option file format], page 133.
NoDWARFRecord
The option is omitted from the producer string written by -grecord-gcc-
switches.
PchIgnore
Even if this is a target option, this option will not be recorded / compared to
determine if a precompiled header file matches.
CPP(var) The state of this option should be kept in sync with the preprocessor option
var. If this property is set, then properties Var and Init must be set as well.
CppReason(CPP_W_Enum)
This warning option corresponds to cpplib.h warning reason code
CPP W Enum. This should only be used for warning options of the C-family
front-ends.
UrlSuffix(url_suffix)
Adjacent to each human-written .opt file in the source tree is a corresponding
file with a .opt.urls extension. These files contain UrlSuffix directives giving
the ending part of the URL for the documentation of the option, such as:
Wabi-tag
UrlSuffix(gcc/C_002b_002b-Dialect-Options.html#index-Wabi-tag)
These URL suffixes are relative to DOCUMENTATION_ROOT_URL.
There files are generated from the .opt files and the generated HTML documen-
tation by regenerate-opt-urls.py, and should be regenerated when adding
new options, via manually invoking make regenerate-opt-urls.
LangUrlSuffix_lang(url_suffix)
In addition to UrlSuffix directives, regenerate-opt-urls.py can generate
language-specific URLs, such as:
LangUrlSuffix_D(gdc/Code-Generation.html#index-MMD)
143
we hide cgraph from the front ends and move back to rest of compilation as the official
interface? Possibly we should rename all three interfaces such that the names match in
some meaningful way and that is more descriptive than "rest of".
The middle-end will, at its option, emit the function and data definitions immediately or
queue them for later processing.
Sometimes passes are supposed to share a dump file / option name. To still give these
unique names, you can use a prefix that is delimited by a space from the part that is used
for the dump file / option name. E.g. When the pass name is "ud dce", the name used for
dump file/options is "dce".
TODO: describe the global variables set up by the pass manager, and a brief description
of how a new pass should use it. I need to look at what info RTL passes use first. . .
• IPA reference
This pass gathers information about how variables whose scope is confined to the
compilation unit are used. It is located in ipa-reference.cc and is described by
pass_ipa_reference.
• IPA single use
This pass checks whether variables are used by a single function. It is located in ipa.cc
and is described by pass_ipa_single_use.
• IPA comdats
This pass looks for static symbols that are used exclusively within one comdat group,
and moves them into that comdat group. It is located in ipa-comdats.cc and is
described by pass_ipa_comdats.
of the control flow graph. The pass is located in omp-low.cc and is described by
pass_lower_omp.
• OpenMP expansion
If OpenMP generation (-fopenmp) is enabled, this pass expands parallel regions into
their own functions to be invoked by the thread library. The pass is located in omp-
low.cc and is described by pass_expand_omp.
• Lower control flow
This pass flattens if statements (COND_EXPR) and moves lexical bindings (BIND_EXPR)
out of line. After this pass, all if statements will have exactly two goto statements in
its then and else arms. Lexical binding information for each statement will be found
in TREE_BLOCK rather than being inferred from its position under a BIND_EXPR. This
pass is found in gimple-low.cc and is described by pass_lower_cf.
• Lower exception handling control flow
This pass decomposes high-level exception handling constructs (TRY_FINALLY_EXPR and
TRY_CATCH_EXPR) into a form that explicitly represents the control flow involved. After
this pass, lookup_stmt_eh_region will return a non-negative number for any state-
ment that may have EH control flow semantics; examine tree_can_throw_internal or
tree_can_throw_external for exact semantics. Exact control flow may be extracted
from foreach_reachable_handler. The EH region nesting tree is defined in except.h
and built in except.cc. The lowering pass itself is in tree-eh.cc and is described by
pass_lower_eh.
• Build the control flow graph
This pass decomposes a function into basic blocks and creates all of the edges that
connect them. It is located in tree-cfg.cc and is described by pass_build_cfg.
• Find all referenced variables
This pass walks the entire function and collects an array of all variables referenced
in the function, referenced_vars. The index at which a variable is found in the
array is used as a UID for the variable within this function. This data is needed by
the SSA rewriting routines. The pass is located in tree-dfa.cc and is described by
pass_referenced_vars.
• Enter static single assignment form
This pass rewrites the function such that it is in SSA form. After this pass, all is_
gimple_reg variables will be referenced by SSA_NAME, and all occurrences of other
variables will be annotated with VDEFS and VUSES; PHI nodes will have been inserted
as necessary for each basic block. This pass is located in tree-ssa.cc and is described
by pass_build_ssa.
• Warn for uninitialized variables
This pass scans the function for uses of SSA_NAMEs that are fed by default definition.
For non-parameter variables, such uses are uninitialized. The pass is run twice, before
and after optimization (if turned on). In the first pass we only warn for uses that
are positively uninitialized; in the second pass we warn for uses that are possibly
uninitialized. The pass is located in tree-ssa.cc and is defined by pass_early_
warn_uninitialized and pass_late_warn_uninitialized.
150 GNU Compiler Collection (GCC) Internals
Induction variable optimizations. This pass performs standard induction variable op-
timizations, including strength reduction, induction variable merging and induction
variable elimination. The pass is implemented in tree-ssa-loop-ivopts.cc.
Loop unswitching. This pass moves the conditional jumps that are invariant out of the
loops. To achieve this, a duplicate of the loop is created for each possible outcome of
conditional jump(s). The pass is implemented in tree-ssa-loop-unswitch.cc.
Loop splitting. If a loop contains a conditional statement that is always true for one
part of the iteration space and false for the other this pass splits the loop into two, one
dealing with one side the other only with the other, thereby removing one inner-loop
conditional. The pass is implemented in tree-ssa-loop-split.cc.
The optimizations also use various utility functions contained in tree-ssa-loop-
manip.cc, cfgloop.cc, cfgloopanal.cc and cfgloopmanip.cc.
Vectorization. This pass transforms loops to operate on vector types instead of scalar
types. Data parallelism across loop iterations is exploited to group data elements from
consecutive iterations into a vector and operate on them in parallel. Depending on
available target support the loop is conceptually unrolled by a factor VF (vectorization
factor), which is the number of elements operated upon in parallel in each iteration, and
the VF copies of each scalar operation are fused to form a vector operation. Additional
loop transformations such as peeling and versioning may take place to align the number
of iterations, and to align the memory accesses in the loop. The pass is implemented in
tree-vectorizer.cc (the main driver), tree-vect-loop.cc and tree-vect-loop-
manip.cc (loop specific parts and general loop utilities), tree-vect-slp (loop-aware
SLP functionality), tree-vect-stmts.cc, tree-vect-data-refs.cc and tree-vect-
slp-patterns.cc containing the SLP pattern matcher. Analysis of data references is
in tree-data-ref.cc.
SLP Vectorization. This pass performs vectorization of straight-line code. The pass
is implemented in tree-vectorizer.cc (the main driver), tree-vect-slp.cc, tree-
vect-stmts.cc and tree-vect-data-refs.cc.
Autoparallelization. This pass splits the loop iteration space to run into several threads.
The pass is implemented in tree-parloops.cc.
Graphite is a loop transformation framework based on the polyhedral model. Graphite
stands for Gimple Represented as Polyhedra. The internals of this infrastructure are
documented in https://gcc.gnu.org/wiki/Graphite. The passes working on this
representation are implemented in the various graphite-* files.
• Tree level if-conversion for vectorizer
This pass applies if-conversion to simple loops to help vectorizer. We identify if con-
vertible loops, if-convert statements and merge basic blocks in one big block. The idea
is to present loop in such form so that vectorizer can have one to one mapping between
statements and available vector operations. This pass is located in tree-if-conv.cc
and is described by pass_if_conversion.
• Conditional constant propagation
This pass relaxes a lattice of values in order to identify those that must be constant
even in the presence of conditional branches. The pass is located in tree-ssa-ccp.cc
and is described by pass_ccp.
Chapter 9: Passes and Files of the Compiler 153
A related pass that works on memory loads and stores, and not just register values, is
located in tree-ssa-ccp.cc and described by pass_store_ccp.
• Conditional copy propagation
This is similar to constant propagation but the lattice of values is the “copy-of” relation.
It eliminates redundant copies from the code. The pass is located in tree-ssa-copy.cc
and described by pass_copy_prop.
A related pass that works on memory copies, and not just register copies, is located in
tree-ssa-copy.cc and described by pass_store_copy_prop.
• Value range propagation
This transformation is similar to constant propagation but instead of propagating sin-
gle constant values, it propagates known value ranges. The implementation is based on
Patterson’s range propagation algorithm (Accurate Static Branch Prediction by Value
Range Propagation, J. R. C. Patterson, PLDI ’95). In contrast to Patterson’s algo-
rithm, this implementation does not propagate branch probabilities nor it uses more
than a single range per SSA name. This means that the current implementation cannot
be used for branch prediction (though adapting it would not be difficult). The pass is
located in tree-vrp.cc and is described by pass_vrp.
• Folding built-in functions
This pass simplifies built-in functions, as applicable, with constant arguments or with
inferable string lengths. It is located in tree-ssa-ccp.cc and is described by pass_
fold_builtins.
• Split critical edges
This pass identifies critical edges and inserts empty basic blocks such that the edge
is no longer critical. The pass is located in tree-cfg.cc and is described by pass_
split_crit_edges.
• Control dependence dead code elimination
This pass is a stronger form of dead code elimination that can eliminate unnecessary
control flow statements. It is located in tree-ssa-dce.cc and is described by pass_
cd_dce.
• Tail call elimination
This pass identifies function calls that may be rewritten into jumps. No code trans-
formation is actually applied here, but the data and control flow problem is solved.
The code transformation requires target support, and so is delayed until RTL. In the
meantime CALL_EXPR_TAILCALL is set indicating the possibility. The pass is located in
tree-tailcall.cc and is described by pass_tail_calls. The RTL transformation is
handled by fixup_tail_calls in calls.cc.
• Warn for function return without value
For non-void functions, this pass locates return statements that do not specify a value
and issues a warning. Such a statement may have been injected by falling off the end
of the function. This pass is run last so that we have as much time as possible to prove
that the statement is not reachable. It is located in tree-cfg.cc and is described by
pass_warn_function_return.
154 GNU Compiler Collection (GCC) Internals
computations to a bank of temporary variables that are rotated at the end of loop. To
avoid the need for this rotation, the loop is then unrolled and the copies of the loop
body are rewritten to use the appropriate version of the temporary variable. This pass
is located in tree-predcom.cc and described by pass_predcom.
• Array prefetching
This pass issues prefetch instructions for array references inside loops. The pass is
located in tree-ssa-loop-prefetch.cc and described by pass_loop_prefetch.
• Reassociation
This pass rewrites arithmetic expressions to enable optimizations that operate on
them, like redundancy elimination and vectorization. The pass is located in tree-
ssa-reassoc.cc and described by pass_reassoc.
• Optimization of stdarg functions
This pass tries to avoid the saving of register arguments into the stack on entry to
stdarg functions. If the function doesn’t use any va_start macros, no registers need
to be saved. If va_start macros are used, the va_list variables don’t escape the
function, it is only necessary to save registers that will be used in va_arg macros.
For instance, if va_arg is only used with integral types in the function, floating point
registers don’t need to be saved. This pass is located in tree-stdarg.cc and described
by pass_stdarg.
copy propagation and addressing mode selection. The pass is run twice, with values
being propagated into loops only on the second run. The code is located in fwprop.cc.
• Common subexpression elimination
This pass removes redundant computation within basic blocks, and optimizes address-
ing modes based on cost. The pass is run twice. The code for this pass is located in
cse.cc.
• Global common subexpression elimination
This pass performs two different types of GCSE depending on whether you are opti-
mizing for size or not (LCM based GCSE tends to increase code size for a gain in speed,
while Morel-Renvoise based GCSE does not). When optimizing for size, GCSE is done
using Morel-Renvoise Partial Redundancy Elimination, with the exception that it does
not try to move invariants out of loops—that is left to the loop optimization pass. If
MR PRE GCSE is done, code hoisting (aka unification) is also done, as well as load
motion. If you are optimizing for speed, LCM (lazy code motion) based GCSE is done.
LCM is based on the work of Knoop, Ruthing, and Steffen. LCM based GCSE also does
loop invariant code motion. We also perform load and store motion when optimizing
for speed. Regardless of which type of GCSE is used, the GCSE pass also performs
global constant and copy propagation. The source file for this pass is gcse.cc, and the
LCM routines are in lcm.cc.
• Loop optimization
This pass performs several loop related optimizations. The source files cfgloopanal.cc
and cfgloopmanip.cc contain generic loop analysis and manipulation code. Initializa-
tion and finalization of loop structures is handled by loop-init.cc. A loop invariant
motion pass is implemented in loop-invariant.cc. Basic block level optimizations—
unrolling, and peeling loops— are implemented in loop-unroll.cc. Replacing of the
exit condition of loops by special machine-dependent instructions is handled by loop-
doloop.cc.
• Jump bypassing
This pass is an aggressive form of GCSE that transforms the control flow graph of a
function by propagating constants into conditional branch instructions. The source file
for this pass is gcse.cc.
• If conversion
This pass attempts to replace conditional branches and surrounding assignments with
arithmetic, boolean value producing comparison instructions, and conditional move
instructions. In the very last invocation after reload/LRA, it will generate predicated
instructions when supported by the target. The code is located in ifcvt.cc.
• Web construction
This pass splits independent uses of each pseudo-register. This can improve effect of
the other transformation, such as CSE or register allocation. The code for this pass is
located in web.cc.
• Instruction combination
This pass attempts to combine groups of two or three instructions that are related by
data flow into single instructions. It combines the RTL expressions for the instructions
Chapter 9: Passes and Files of the Compiler 157
by substitution, simplifies the result using algebra, and then attempts to match the
result against the machine description. The code is located in combine.cc.
• Mode switching optimization
This pass looks for instructions that require the processor to be in a specific “mode”
and minimizes the number of mode changes required to satisfy all users. What these
modes are, and what they apply to are completely target-specific. The code for this
pass is located in mode-switching.cc.
• Modulo scheduling
This pass looks at innermost loops and reorders their instructions by overlapping differ-
ent iterations. Modulo scheduling is performed immediately before instruction schedul-
ing. The code for this pass is located in modulo-sched.cc.
• Instruction scheduling
This pass looks for instructions whose output will not be available by the time that it
is used in subsequent instructions. Memory loads and floating point instructions often
have this behavior on RISC machines. It re-orders instructions within a basic block
to try to separate the definition and use of items that otherwise would cause pipeline
stalls. This pass is performed twice, before and after register allocation. The code for
this pass is located in haifa-sched.cc, sched-deps.cc, sched-ebb.cc, sched-rgn.cc
and sched-vis.c.
• Register allocation
These passes make sure that all occurrences of pseudo registers are eliminated, either
by allocating them to a hard register, replacing them by an equivalent expression (e.g.
a constant) or by placing them on the stack. This is done in several subpasses:
• The integrated register allocator (IRA). It is called integrated because coalescing,
register live range splitting, and hard register preferencing are done on-the-fly
during coloring. It also has better integration with the reload/LRA pass. Pseudo-
registers spilled by the allocator or the reload/LRA have still a chance to get
hard-registers if the reload/LRA evicts some pseudo-registers from hard-registers.
The allocator helps to choose better pseudos for spilling based on their live ranges
and to coalesce stack slots allocated for the spilled pseudo-registers. IRA is a
regional register allocator which is transformed into Chaitin-Briggs allocator if
there is one region. By default, IRA chooses regions using register pressure but
the user can force it to use one region or regions corresponding to all loops.
Source files of the allocator are ira.cc, ira-build.cc, ira-costs.cc,
ira-conflicts.cc, ira-color.cc, ira-emit.cc, ira-lives, plus header files
ira.h and ira-int.h used for the communication between the allocator and the
rest of the compiler and between the IRA files.
• Reloading. This pass renumbers pseudo registers with the hardware registers num-
bers they were allocated. Pseudo registers that did not get hard registers are re-
placed with stack slots. Then it finds instructions that are invalid because a value
has failed to end up in a register, or has ended up in a register of the wrong kind.
It fixes up these instructions by reloading the problematical values temporarily
into registers. Additional instructions are generated to do the copying.
The reload pass also optionally eliminates the frame pointer and inserts instruc-
tions to save and restore call-clobbered registers around calls.
158 GNU Compiler Collection (GCC) Internals
Source files are reload.cc and reload1.cc, plus the header reload.h used for
communication between them.
• This pass is a modern replacement of the reload pass. Source files are lra.cc,
lra-assign.c, lra-coalesce.cc, lra-constraints.cc, lra-eliminations.cc,
lra-lives.cc, lra-remat.cc, lra-spills.cc, the header lra-int.h used for
communication between them, and the header lra.h used for communication be-
tween LRA and the rest of compiler.
Unlike the reload pass, intermediate LRA decisions are reflected in RTL as much as
possible. This reduces the number of target-dependent macros and hooks, leaving
instruction constraints as the primary source of control.
LRA is run on targets for which TARGET LRA P returns true.
• Basic block reordering
This pass implements profile guided code positioning. If profile information is not avail-
able, various types of static analysis are performed to make the predictions normally
coming from the profile feedback (IE execution frequency, branch probability, etc). It
is implemented in the file bb-reorder.cc, and the various prediction routines are in
predict.cc.
• Variable tracking
This pass computes where the variables are stored at each position in code and gener-
ates notes describing the variable locations to RTL code. The location lists are then
generated according to these notes to debug information if the debugging information
format supports location lists. The code is located in var-tracking.cc.
• Delayed branch scheduling
This optional pass attempts to find instructions that can go into the delay slots of other
instructions, usually jumps and calls. The code for this pass is located in reorg.cc.
• Branch shortening
On many RISC machines, branch instructions have a limited range. Thus, longer
sequences of instructions must be used for long branches. In this pass, the compiler
figures out what how far each instruction will be from each other instruction, and
therefore whether the usual instructions, or the longer sequences, must be used for
each branch. The code for this pass is located in final.cc.
• Register-to-stack conversion
Conversion from usage of some hard registers to usage of a register stack may be done
at this point. Currently, this is supported only for the floating-point registers of the
Intel 80387 coprocessor. The code for this pass is located in reg-stack.cc.
• Final
This pass outputs the assembler code for the function. The source files are final.cc
plus insn-output.cc; the latter is generated automatically from the machine descrip-
tion by the tool genoutput. The header file conditions.h is used for communication
between these files.
• Debugging information output
This is run after final because it must output the stack slot offsets for pseudo registers
that did not get hard registers. Source files are dwarfout.c for DWARF symbol table
Chapter 9: Passes and Files of the Compiler 159
format, files dwarf2out.cc and dwarf2asm.cc for DWARF2 symbol table format, and
vmsdbgout.cc for VMS debug symbol table format.
− optimization messages
− RTL dumps
− detailed dumps
int report_flags = MSG_OPTIMIZED_LOCATIONS | TDF_RTL | TDF_DETAILS;
dump_printf_loc (report_flags, insn,
"loop turned into non-loop; it never loops.\n");
dump_basic_block
Output basic block.
dump_generic_expr
Output generic expression.
dump_gimple_stmt
Output gimple statement.
Note that the above methods also have variants prefixed with _loc, such as
dump_printf_loc, which are similar except they also output the source location
information. The _loc variants take a const dump_location_t &. This class
can be constructed from a gimple * or from a rtx_insn *, and so callers can
pass a gimple * or a rtx_insn * as the _loc argument. The dump_location_t
constructor will extract the source location from the statement or instruction,
along with the profile count, and the location in GCC’s own source code (or
the plugin) from which the dump call was emitted. Only the source location
is currently used. There is also a dump_user_location_t class, capturing the
source location and profile count, but not the dump emission location, so that
locations in the user’s code can be passed around. This can also be constructed
from a gimple * and from a rtx_insn *, and it too can be passed as the _loc
argument.
Here the two output file names vec.miss and loop.opt are in conflict since only one
output file is allowed. In this case, only the first option takes effect and the subsequent
options are ignored. Thus only the vec.miss is produced which containts dumps from the
vectorizer about missed opportunities.
163
The header file poly-int-types.h provides typedefs for the most common forms of
poly_int, all having NUM_POLY_INT_COEFFS coefficients:
poly_uint16
a ‘poly_int’ with unsigned short coefficients.
poly_int64
a ‘poly_int’ with HOST_WIDE_INT coefficients.
poly_uint64
a ‘poly_int’ with unsigned HOST_WIDE_INT coefficients.
poly_offset_int
a ‘poly_int’ with offset_int coefficients.
poly_wide_int
a ‘poly_int’ with wide_int coefficients.
poly_widest_int
a ‘poly_int’ with widest_int coefficients.
Since the main purpose of poly_int is to represent sizes and offsets, the last two typedefs
are only rarely used.
p1 + p2
p1 + c2
c1 + p2
p1 - p2
p1 - c2
c1 - p2
c1 * p2
p1 * c2
p1 << c2
p1 += p2
p1 += c2
p1 -= p2
p1 -= c2
p1 *= c2
p1 <<= c2
These arithmetic operations handle integer ranks in a similar way to C++. The main
difference is that every coefficient narrower than HOST_WIDE_INT promotes to HOST_WIDE_
INT, whereas in C++ everything narrower than int promotes to int. For example:
poly_uint16 + int -> poly_int64
unsigned int + poly_uint16 -> poly_int64
170 GNU Compiler Collection (GCC) Internals
‘value.to_uhwi (&p2)’
Return true if ‘poly_int<N, T>’ value can be represented without loss of pre-
cision as a ‘poly_int<N, unsigned HOST_WIDE_INT>’, storing it in that form
in p2 if so.
‘value.force_shwi ()’
Forcibly convert each coefficient of ‘poly_int<N, T>’ value to HOST_WIDE_INT,
truncating any that are out of range. Return the result as a ‘poly_int<N,
HOST_WIDE_INT>’.
‘value.force_uhwi ()’
Forcibly convert each coefficient of ‘poly_int<N, T>’ value to unsigned
HOST_WIDE_INT, truncating any that are out of range. Return the result as a
‘poly_int<N, unsigned HOST_WIDE_INT>’.
‘wi::shwi (value, precision)’
Return a poly_int with the same value as value, but with the coefficients
converted from HOST_WIDE_INT to wide_int. precision specifies the precision of
the wide_int cofficients; if this is wider than a HOST_WIDE_INT, the coefficients
of value will be sign-extended to fit.
‘wi::uhwi (value, precision)’
Like wi::shwi, except that value has coefficients of type unsigned HOST_WIDE_
INT. If precision is wider than a HOST_WIDE_INT, the coefficients of value will
be zero-extended to fit.
‘wi::sext (value, precision)’
Return a poly_int of the same type as value, sign-extending every coefficient
from the low precision bits. This in effect applies wi::sext to each coefficient
individually.
‘wi::zext (value, precision)’
Like wi::sext, but for zero extension.
‘poly_wide_int::from (value, precision, sign)’
Convert value to a poly_wide_int in which each coefficient has precision bits.
Extend the coefficients according to sign if the coefficients have fewer bits.
‘poly_offset_int::from (value, sign)’
Convert value to a poly_offset_int, extending its coefficients according to
sign if they have fewer bits than offset_int.
‘poly_widest_int::from (value, sign)’
Convert value to a poly_widest_int, extending its coefficients according to
sign if they have fewer bits than widest_int.
example, if some work is divided into an analysis phase and an implementation phase, the
analysis phase might reject inputs that are not is_constant, in which case the implementa-
tion phase can reasonably use to_constant on the remaining inputs. The assertions should
not be used to discover whether a condition ever occurs “in the field”; in other words,
they should not be used to restrict code to constants at first, with the intention of only
implementing a poly_int version if a user hits the assertion.
If a particular asserting function like to_constant is needed more than once for the same
reason, it is probably worth adding a helper function or macro for that situation, so that
the justification only needs to be given once. For example:
/* Return the size of an element in a vector of size SIZE, given that
the vector has NELTS elements. The return value is in the same units
as SIZE (either bits or bytes).
11 GENERIC
The purpose of GENERIC is simply to provide a language-independent way of representing
an entire function in trees. To this end, it was necessary to add a few new tree codes to the
back end, but almost everything was already there. If you can express it with the codes in
gcc/tree.def, it’s GENERIC.
Early on, there was a great deal of debate about how to think about statements in a
tree IL. In GENERIC, a statement is defined as any expression whose value, if any, is
ignored. A statement will always have TREE_SIDE_EFFECTS set (or it will be discarded),
but a non-statement expression may also have side effects. A CALL_EXPR, for instance.
It would be possible for some local optimizations to work on the GENERIC form of a
function; indeed, the adapted tree inliner works fine on GENERIC, but the current compiler
performs inlining after lowering to GIMPLE (a restricted form described in the next section).
Indeed, currently the frontends perform this lowering before handing off to tree_rest_of_
compilation, but this seems inelegant.
11.1 Deficiencies
There are many places in which this document is incomplet and incorrekt. It is, as of yet,
only preliminary documentation.
11.2 Overview
The central data structure used by the internal representation is the tree. These nodes,
while all of the C type tree, are of many varieties. A tree is a pointer type, but the object
to which it points may be of a variety of types. From this point forward, we will refer to
trees in ordinary type, rather than in this font, except when talking about the actual C
type tree.
You can tell what kind of node a particular tree is by using the TREE_CODE macro. Many,
many macros take trees as input and return trees as output. However, most macros require
a certain kind of tree node as input. In other words, there is a type-system for trees, but it
is not reflected in the C type-system.
For safety, it is useful to configure GCC with --enable-checking. Although this results
in a significant performance penalty (since all tree types are checked at run-time), and is
therefore inappropriate in a release version, it is extremely helpful during the development
process.
Many macros behave as predicates. Many, although not all, of these predicates end in
‘_P’. Do not rely on the result type of these macros being of any particular type. You may,
however, rely on the fact that the type can be compared to 0, so that statements like
if (TEST_P (t) && !TEST_P (y))
x = 1;
and
int i = (TEST_P (t) != 0);
are legal. Macros that return int values now may be changed to return tree values, or
other pointers in the future. Even those that continue to return int may return multiple
178 GNU Compiler Collection (GCC) Internals
nonzero codes where previously they returned only zero and one. Therefore, you should not
write code like
if (TEST_P (t) == 1)
as this code is not guaranteed to work correctly in the future.
You should not take the address of values returned by the macros or functions described
here. In particular, no guarantee is given that the values are lvalues.
In general, the names of macros are all in uppercase, while the names of functions are
entirely in lowercase. There are rare exceptions to this rule. You should assume that any
macro or function whose name is made up entirely of uppercase letters may evaluate its
arguments more than once. You may assume that a macro or function whose name is made
up entirely of lowercase letters will evaluate its arguments only once.
The error_mark_node is a special tree. Its tree code is ERROR_MARK, but since there is
only ever one node with that code, the usual practice is to compare the tree against error_
mark_node. (This test is just a test for pointer equality.) If an error has occurred during
front-end processing the flag errorcount will be set. If the front end has encountered code
it cannot handle, it will issue a message to the user and set sorrycount. When these
flags are set, any macro or function which normally returns a tree of a particular kind may
instead return the error_mark_node. Thus, if you intend to do any processing of erroneous
code, you must be prepared to deal with the error_mark_node.
Occasionally, a particular tree slot (like an operand to an expression, or a particular field
in a declaration) will be referred to as “reserved for the back end”. These slots are used to
store RTL when the tree is converted to RTL for use by the GCC back end. However, if
that process is not taking place (e.g., if the front end is being hooked up to an intelligent
editor), then those slots may be used by the back end presently in use.
If you encounter situations that do not match this documentation, such as tree nodes of
types not mentioned here, or macros documented to return entities of a particular kind that
instead return entities of some different kind, you have found a bug, either in the front end
or in the documentation. Please report these bugs as you would any other bug.
11.2.1 Trees
All GENERIC trees have two fields in common. First, TREE_CHAIN is a pointer that can be
used as a singly-linked list to other trees. The other is TREE_TYPE. Many trees store the
type of an expression or declaration in this field.
These are some other functions for handling trees:
tree_size
Return the number of bytes a tree takes.
build0
build1
build2
build3
build4
build5
build6
Chapter 11: GENERIC 179
These functions build a tree and supply values to put in each parameter. The
basic signature is ‘code, type, [operands]’. code is the TREE_CODE, and type
is a tree representing the TREE_TYPE. These are followed by the operands, each
of which is also a tree.
11.2.2 Identifiers
An IDENTIFIER_NODE represents a slightly more general concept than the standard C or
C++ concept of identifier. In particular, an IDENTIFIER_NODE may contain a ‘$’, or other
extraordinary characters.
There are never two distinct IDENTIFIER_NODEs representing the same identifier. There-
fore, you may use pointer equality to compare IDENTIFIER_NODEs, rather than using a
routine like strcmp. Use get_identifier to obtain the unique IDENTIFIER_NODE for a
supplied string.
You can use the following macros to access identifiers:
IDENTIFIER_POINTER
The string represented by the identifier, represented as a char*. This string is
always NUL-terminated, and contains no embedded NUL characters.
IDENTIFIER_LENGTH
The length of the string returned by IDENTIFIER_POINTER, not including the
trailing NUL. This value of IDENTIFIER_LENGTH (x) is always the same as
strlen (IDENTIFIER_POINTER (x)).
IDENTIFIER_OPNAME_P
This predicate holds if the identifier represents the name of an overloaded
operator. In this case, you should not depend on the contents of either the
IDENTIFIER_POINTER or the IDENTIFIER_LENGTH.
IDENTIFIER_TYPENAME_P
This predicate holds if the identifier represents the name of a user-defined con-
version operator. In this case, the TREE_TYPE of the IDENTIFIER_NODE holds
the type to which the conversion operator converts.
11.2.3 Containers
Two common container data structures can be represented directly with tree nodes. A
TREE_LIST is a singly linked list containing two trees per node. These are the TREE_
PURPOSE and TREE_VALUE of each node. (Often, the TREE_PURPOSE contains some kind of
tag, or additional information, while the TREE_VALUE contains the majority of the payload.
In other cases, the TREE_PURPOSE is simply NULL_TREE, while in still others both the TREE_
PURPOSE and TREE_VALUE are of equal stature.) Given one TREE_LIST node, the next node
is found by following the TREE_CHAIN. If the TREE_CHAIN is NULL_TREE, then you have
reached the end of the list.
A TREE_VEC is a simple vector. The TREE_VEC_LENGTH is an integer (not a tree) giving the
number of nodes in the vector. The nodes themselves are accessed using the TREE_VEC_ELT
macro, which takes two arguments. The first is the TREE_VEC in question; the second is an
integer indicating which element in the vector is desired. The elements are indexed from
zero.
180 GNU Compiler Collection (GCC) Internals
11.3 Types
All types have corresponding tree nodes. However, you should not assume that there is
exactly one tree node corresponding to each type. There are often multiple nodes corre-
sponding to the same type.
For the most part, different kinds of types have different tree codes. (For example, pointer
types use a POINTER_TYPE code while arrays use an ARRAY_TYPE code.) However, pointers to
member functions use the RECORD_TYPE code. Therefore, when writing a switch statement
that depends on the code associated with a particular type, you should take care to handle
pointers to member functions under the RECORD_TYPE case label.
The following functions and macros deal with cv-qualification of types:
TYPE_MAIN_VARIANT
This macro returns the unqualified version of a type. It may be applied to an
unqualified type, but it is not always the identity function in that case.
A few other macros and functions are usable with all types:
TYPE_SIZE
The number of bits required to represent the type, represented as an INTEGER_
CST. For an incomplete type, TYPE_SIZE will be NULL_TREE.
TYPE_ALIGN
The alignment of the type, in bits, represented as an int.
TYPE_NAME
This macro returns a declaration (in the form of a TYPE_DECL) for the type.
(Note this macro does not return an IDENTIFIER_NODE, as you might expect,
given its name!) You can look at the DECL_NAME of the TYPE_DECL to obtain
the actual name of the type. The TYPE_NAME will be NULL_TREE for a type that
is not a built-in type, the result of a typedef, or a named class type.
TYPE_CANONICAL
This macro returns the “canonical” type for the given type node. Canonical
types are used to improve performance in the C++ and Objective-C++ front
ends by allowing efficient comparison between two type nodes in same_type_p:
if the TYPE_CANONICAL values of the types are equal, the types are equivalent;
otherwise, the types are not equivalent. The notion of equivalence for canonical
types is the same as the notion of type equivalence in the language itself. For
instance,
When TYPE_CANONICAL is NULL_TREE, there is no canonical type for the given
type node. In this case, comparison between this type and any other type
requires the compiler to perform a deep, “structural” comparison to see if the
two type nodes have the same form and properties.
The canonical type for a node is always the most fundamental type in the
equivalence class of types. For instance, int is its own canonical type. A
typedef I of int will have int as its canonical type. Similarly, I* and a typedef
IP (defined to I*) will has int* as their canonical type. When building a new
type node, be sure to set TYPE_CANONICAL to the appropriate canonical type.
If the new type is a compound type (built from other types), and any of those
Chapter 11: GENERIC 181
TYPE_STRUCTURAL_EQUALITY_P
This predicate holds when the node requires structural equality checks, e.g.,
when TYPE_CANONICAL is NULL_TREE.
SET_TYPE_STRUCTURAL_EQUALITY
This macro states that the type node it is given requires structural equality
checks, e.g., it sets TYPE_CANONICAL to NULL_TREE.
same_type_p
This predicate takes two types as input, and holds if they are the same type.
For example, if one type is a typedef for the other, or both are typedefs
for the same type. This predicate also holds if the two trees given as input
are simply copies of one another; i.e., there is no difference between them at
the source level, but, for whatever reason, a duplicate has been made in the
representation. You should never use == (pointer equality) to compare types;
always use same_type_p instead.
Detailed below are the various kinds of types, and the macros that can be used to access
them. Although other kinds of types are used elsewhere in G++, the types described here
are the only ones that you will encounter while examining the intermediate representation.
VOID_TYPE
Used to represent the void type.
INTEGER_TYPE
Used to represent the various integral types, including char, short, int, long,
and long long. This code is not used for enumeration types, nor for the bool
type. The TYPE_PRECISION is the number of bits used in the representation,
represented as an unsigned int. (Note that in the general case this is not
the same value as TYPE_SIZE; suppose that there were a 24-bit integer type,
but that alignment requirements for the ABI required 32-bit alignment. Then,
TYPE_SIZE would be an INTEGER_CST for 32, while TYPE_PRECISION would be
24.) The integer type is unsigned if TYPE_UNSIGNED holds; otherwise, it is
signed.
The TYPE_MIN_VALUE is an INTEGER_CST for the smallest integer that may be
represented by this type. Similarly, the TYPE_MAX_VALUE is an INTEGER_CST for
the largest integer that may be represented by this type.
182 GNU Compiler Collection (GCC) Internals
BITINT_TYPE
Used to represent the bit-precise integer types, _BitInt(N). These types are
similar to INTEGER_TYPE, but can have arbitrary user selected precisions and
do or can have different alignment, function argument and return value passing
conventions. Larger BITINT TYPEs can have BLKmode TYPE_MODE and need
to be lowered by a special BITINT TYPE lowering pass.
REAL_TYPE
Used to represent the float, double, and long double types. The number of
bits in the floating-point representation is given by TYPE_PRECISION, as in the
INTEGER_TYPE case.
FIXED_POINT_TYPE
Used to represent the short _Fract, _Fract, long _Fract, long long _Fract,
short _Accum, _Accum, long _Accum, and long long _Accum types. The num-
ber of bits in the fixed-point representation is given by TYPE_PRECISION, as in
the INTEGER_TYPE case. There may be padding bits, fractional bits and integral
bits. The number of fractional bits is given by TYPE_FBIT, and the number of
integral bits is given by TYPE_IBIT. The fixed-point type is unsigned if TYPE_
UNSIGNED holds; otherwise, it is signed. The fixed-point type is saturating if
TYPE_SATURATING holds; otherwise, it is not saturating.
COMPLEX_TYPE
Used to represent GCC built-in __complex__ data types. The TREE_TYPE is
the type of the real and imaginary parts.
ENUMERAL_TYPE
Used to represent an enumeration type. The TYPE_PRECISION gives (as an
int), the number of bits used to represent the type. If there are no negative
enumeration constants, TYPE_UNSIGNED will hold. The minimum and maximum
enumeration constants may be obtained with TYPE_MIN_VALUE and TYPE_MAX_
VALUE, respectively; each of these macros returns an INTEGER_CST.
The actual enumeration constants themselves may be obtained by looking at
the TYPE_VALUES. This macro will return a TREE_LIST, containing the con-
stants. The TREE_PURPOSE of each node will be an IDENTIFIER_NODE giving
the name of the constant; the TREE_VALUE will be an INTEGER_CST giving the
value assigned to that constant. These constants will appear in the order in
which they were declared. The TREE_TYPE of each of these constants will be
the type of enumeration type itself.
OPAQUE_TYPE
Used for things that have a MODE_OPAQUE mode class in the backend. Opaque
types have a size and precision, and can be held in memory or registers. They
are used when we do not want the compiler to make assumptions about the
availability of other operations as would happen with integer types.
BOOLEAN_TYPE
Used to represent the bool type.
Chapter 11: GENERIC 183
POINTER_TYPE
Used to represent pointer types, and pointer to data member types. The TREE_
TYPE gives the type to which this type points.
REFERENCE_TYPE
Used to represent reference types. The TREE_TYPE gives the type to which this
type refers.
FUNCTION_TYPE
Used to represent the type of non-member functions and of static member
functions. The TREE_TYPE gives the return type of the function. The TYPE_
ARG_TYPES are a TREE_LIST of the argument types. The TREE_VALUE of each
node in this list is the type of the corresponding argument; the TREE_PURPOSE is
an expression for the default argument value, if any. If the last node in the list
is void_list_node (a TREE_LIST node whose TREE_VALUE is the void_type_
node), then functions of this type do not take variable arguments. Otherwise,
they do take a variable number of arguments.
Note that in C (but not in C++) a function declared like void f() is an unpro-
totyped function taking a variable number of arguments; the TYPE_ARG_TYPES
of such a function will be NULL.
METHOD_TYPE
Used to represent the type of a non-static member function. Like a FUNCTION_
TYPE, the return type is given by the TREE_TYPE. The type of *this, i.e., the
class of which functions of this type are a member, is given by the TYPE_METHOD_
BASETYPE. The TYPE_ARG_TYPES is the parameter list, as for a FUNCTION_TYPE,
and includes the this argument.
ARRAY_TYPE
Used to represent array types. The TREE_TYPE gives the type of the elements
in the array. If the array-bound is present in the type, the TYPE_DOMAIN is an
INTEGER_TYPE whose TYPE_MIN_VALUE and TYPE_MAX_VALUE will be the lower
and upper bounds of the array, respectively. The TYPE_MIN_VALUE will always
be an INTEGER_CST for zero, while the TYPE_MAX_VALUE will be one less than
the number of elements in the array, i.e., the highest value which may be used
to index an element in the array.
RECORD_TYPE
Used to represent struct and class types, as well as pointers to member
functions and similar constructs in other languages. TYPE_FIELDS contains the
items contained in this type, each of which can be a FIELD_DECL, VAR_DECL,
CONST_DECL, or TYPE_DECL. You may not make any assumptions about the
ordering of the fields in the type or whether one or more of them overlap.
UNION_TYPE
Used to represent union types. Similar to RECORD_TYPE except that all FIELD_
DECL nodes in TYPE_FIELD start at bit position zero.
QUAL_UNION_TYPE
Used to represent part of a variant record in Ada. Similar to UNION_TYPE except
that each FIELD_DECL has a DECL_QUALIFIER field, which contains a boolean
184 GNU Compiler Collection (GCC) Internals
expression that indicates whether the field is present in the object. The type
will only have one field, so each field’s DECL_QUALIFIER is only evaluated if none
of the expressions in the previous fields in TYPE_FIELDS are nonzero. Normally
these expressions will reference a field in the outer object using a PLACEHOLDER_
EXPR.
LANG_TYPE
This node is used to represent a language-specific type. The front end must
handle it.
OFFSET_TYPE
This node is used to represent a pointer-to-data member. For a data member
X::m the TYPE_OFFSET_BASETYPE is X and the TREE_TYPE is the type of m.
There are variables whose values represent some of the basic types. These include:
void_type_node
A node for void.
integer_type_node
A node for int.
unsigned_type_node.
A node for unsigned int.
char_type_node.
A node for char.
It may sometimes be useful to compare one of these variables with a type in hand, using
same_type_p.
11.4 Declarations
This section covers the various kinds of declarations that appear in the internal represen-
tation, except for declarations of functions (represented by FUNCTION_DECL nodes), which
are described in Section 11.8 [Functions], page 212.
DECL_ARTIFICIAL
This predicate holds if the declaration was implicitly generated by the compiler.
For example, this predicate will hold of an implicitly declared member function,
or of the TYPE_DECL implicitly generated for a class type. Recall that in C++
code like:
struct S {};
is roughly equivalent to C code like:
struct S {};
typedef struct S S;
The implicitly generated typedef declaration is represented by a TYPE_DECL
for which DECL_ARTIFICIAL holds.
The various kinds of declarations include:
LABEL_DECL
These nodes are used to represent labels in function bodies. For more informa-
tion, see Section 11.8 [Functions], page 212. These nodes only appear in block
scopes.
CONST_DECL
These nodes are used to represent enumeration constants. The value of the
constant is given by DECL_INITIAL which will be an INTEGER_CST with the
same type as the TREE_TYPE of the CONST_DECL, i.e., an ENUMERAL_TYPE.
RESULT_DECL
These nodes represent the value returned by a function. When a value is as-
signed to a RESULT_DECL, that indicates that the value should be returned, via
bitwise copy, by the function. You can use DECL_SIZE and DECL_ALIGN on a
RESULT_DECL, just as with a VAR_DECL.
TYPE_DECL
These nodes represent typedef declarations. The TREE_TYPE is the type de-
clared to have the name given by DECL_NAME. In some cases, there is no asso-
ciated name.
VAR_DECL These nodes represent variables with namespace or block scope, as well as static
data members. The DECL_SIZE and DECL_ALIGN are analogous to TYPE_SIZE
and TYPE_ALIGN. For a declaration, you should always use the DECL_SIZE and
DECL_ALIGN rather than the TYPE_SIZE and TYPE_ALIGN given by the TREE_
TYPE, since special attributes may have been applied to the variable to give it a
particular size and alignment. You may use the predicates DECL_THIS_STATIC
or DECL_THIS_EXTERN to test whether the storage class specifiers static or
extern were used to declare a variable.
If this variable is initialized (but does not require a constructor), the DECL_
INITIAL will be an expression for the initializer. The initializer should be
evaluated, and a bitwise copy into the variable performed. If the DECL_INITIAL
is the error_mark_node, there is an initializer, but it is given by an explicit
statement later in the code; no bitwise copy is required.
GCC provides an extension that allows either automatic variables, or global
variables, to be placed in particular registers. This extension is being used for
186 GNU Compiler Collection (GCC) Internals
struct tree_field_decl
This structure inherits from struct tree_decl_common. It is used to represent
FIELD_DECL.
struct tree_label_decl
This structure inherits from struct tree_decl_common. It is used to represent
LABEL_DECL.
struct tree_translation_unit_decl
This structure inherits from struct tree_decl_common. It is used to represent
TRANSLATION_UNIT_DECL.
struct tree_decl_with_rtl
This structure inherits from struct tree_decl_common. It contains a field to
store the low-level RTL associated with a DECL node.
struct tree_result_decl
This structure inherits from struct tree_decl_with_rtl. It is used to repre-
sent RESULT_DECL.
struct tree_const_decl
This structure inherits from struct tree_decl_with_rtl. It is used to repre-
sent CONST_DECL.
struct tree_parm_decl
This structure inherits from struct tree_decl_with_rtl. It is used to repre-
sent PARM_DECL.
struct tree_decl_with_vis
This structure inherits from struct tree_decl_with_rtl. It contains fields
necessary to store visibility information, as well as a section name and assembler
name.
struct tree_var_decl
This structure inherits from struct tree_decl_with_vis. It is used to repre-
sent VAR_DECL.
struct tree_function_decl
This structure inherits from struct tree_decl_with_vis. It is used to repre-
sent FUNCTION_DECL.
{
struct tree_decl_with_vis common;
}
Would create a structure name tree_foo_decl that inherits from struct tree_
decl_with_vis.
For language specific DECL nodes, this new structure type should go in the ap-
propriate .h file. For DECL nodes that are part of the middle-end, the structure
type should go in tree.h.
Add a member to the tree structure enumerator for the node
For garbage collection and dynamic checking purposes, each DECL node struc-
ture type is required to have a unique enumerator value specified with it. For
language specific DECL nodes, this new enumerator value should go in the appro-
priate .def file. For DECL nodes that are part of the middle-end, the enumerator
values are specified in treestruct.def.
Update union tree_node
In order to make your new structure type usable, it must be added to union
tree_node. For language specific DECL nodes, a new entry should be added to
the appropriate .h file of the form
struct tree_foo_decl GTY ((tag ("TS_VAR_DECL"))) foo_decl;
For DECL nodes that are part of the middle-end, the additional member goes
directly into union tree_node in tree.h.
Update dynamic checking info
In order to be able to check whether accessing a named portion of union tree_
node is legal, and whether a certain DECL node contains one of the enumerated
DECL node structures in the hierarchy, a simple lookup table is used. This
lookup table needs to be kept up to date with the tree structure hierarchy, or
else checking and containment macros will fail inappropriately.
For language specific DECL nodes, there is an init_ts function in an appropriate
.c file, which initializes the lookup table. Code setting up the table for new DECL
nodes should be added there. For each DECL tree code and enumerator value
representing a member of the inheritance hierarchy, the table should contain
1 if that tree code inherits (directly or indirectly) from that member. Thus,
a FOO_DECL node derived from struct decl_with_rtl, and enumerator value
TS_FOO_DECL, would be set up as follows
tree_contains_struct[FOO_DECL][TS_FOO_DECL] = 1;
tree_contains_struct[FOO_DECL][TS_DECL_WRTL] = 1;
tree_contains_struct[FOO_DECL][TS_DECL_COMMON] = 1;
tree_contains_struct[FOO_DECL][TS_DECL_MINIMAL] = 1;
For DECL nodes that are part of the middle-end, the setup code goes into
tree.cc.
Add macros to access any new fields and flags
Each added field or flag should have a macro that is used to access it, that
performs appropriate checking to ensure only the right type of DECL nodes
access the field.
Chapter 11: GENERIC 189
11.6 Expressions
The internal representation for expressions is for the most part quite straightforward. How-
ever, there are a few facts that one must bear in mind. In particular, the expression “tree”
is actually a directed acyclic graph. (For example there may be many references to the
integer constant zero throughout the source program; many of these will be represented by
the same expression node.) You should not rely on certain kinds of node being shared, nor
should you rely on certain kinds of nodes being unshared.
The following macros can be used with all expression nodes:
TREE_TYPE
Returns the type of the expression. This value may not be precisely the same
type that would be given the expression in the original program.
In what follows, some nodes that one might expect to always have type bool are docu-
mented to have either integral or boolean type. At some point in the future, the C front
end may also make use of this same intermediate representation, and at this point these
nodes will certainly have integral type. The previous sentence is not meant to imply that
the C++ front end does not or will not give these nodes integral type.
190 GNU Compiler Collection (GCC) Internals
Below, we list the various kinds of expression nodes. Except where noted otherwise, the
operands to an expression are accessed using the TREE_OPERAND macro. For example, to
access the first operand to a binary plus expression expr, use:
TREE_OPERAND (expr, 0)
the first element in each pattern is needed. The number of encoded elements
per pattern is given by ‘VECTOR_CST_NELTS_PER_PATTERN (v)’.
For example, the constant:
{ 0, 1, 2, 6, 3, 8, 4, 10, 5, 12, 6, 14, 7, 16, 8, 18 }
is interpreted as an interleaving of the sequences:
{ 0, 2, 3, 4, 5, 6, 7, 8 }
{ 1, 6, 8, 10, 12, 14, 16, 18 }
where the sequences are represented by the following patterns:
base0 == 0, base1 == 2, step == 1
base0 == 1, base1 == 6, step == 2
In this case:
VECTOR_CST_NPATTERNS (v) == 2
VECTOR_CST_NELTS_PER_PATTERN (v) == 3
The vector is therefore encoded using the first 6 elements (‘{ 0, 1, 2, 6, 3, 8
}’), with the remaining 10 elements being implicit extensions of them.
Sometimes this scheme can create two possible encodings of the same vector.
For example { 0, 1 } could be seen as two patterns with one element each or
one pattern with two elements (base0 and base1). The canonical encoding is
always the one with the fewest patterns or (if both encodings have the same
number of patterns) the one with the fewest encoded elements.
‘vector_cst_encoding_nelts (v)’ gives the total number of encoded elements
in v, which is 6 in the example above. VECTOR_CST_ENCODED_ELTS (v) gives
a pointer to the elements encoded in v and VECTOR_CST_ENCODED_ELT (v, i)
accesses the value of encoded element i.
‘VECTOR_CST_DUPLICATE_P (v)’ is true if v simply contains repeated instances
of ‘VECTOR_CST_NPATTERNS (v)’ values. This is a shorthand for testing
‘VECTOR_CST_NELTS_PER_PATTERN (v) == 1’.
‘VECTOR_CST_STEPPED_P (v)’ is true if at least one pattern in v has a nonzero
step. This is a shorthand for testing ‘VECTOR_CST_NELTS_PER_PATTERN (v) ==
3’.
The utility function vector_cst_elt gives the value of an arbitrary index as a
tree. vector_cst_int_elt gives the same value as a wide_int.
STRING_CST
These nodes represent string-constants. The TREE_STRING_LENGTH returns the
length of the string, as an int. The TREE_STRING_POINTER is a char* contain-
ing the string itself. The string may not be NUL-terminated, and it may contain
embedded NUL characters. Therefore, the TREE_STRING_LENGTH includes the
trailing NUL if it is present.
For wide string constants, the TREE_STRING_LENGTH is the number of bytes in
the string, and the TREE_STRING_POINTER points to an array of the bytes of
the string, as represented on the target system (that is, as integers in the target
endianness). Wide and non-wide string constants are distinguished only by the
TREE_TYPE of the STRING_CST.
FIXME: The formats of string constants are not well-defined when the target
system bytes are not the same width as host system bytes.
192 GNU Compiler Collection (GCC) Internals
POLY_INT_CST
These nodes represent invariants that depend on some target-specific runtime
parameters. They consist of NUM_POLY_INT_COEFFS coefficients, with the first
coefficient being the constant term and the others being multipliers that are
applied to the runtime parameters.
POLY_INT_CST_ELT (x, i) references coefficient number i of POLY_INT_CST
node x. Each coefficient is an INTEGER_CST.
constant offset applied to the pointer being dereferenced with its type specifying
the type to be used for type-based alias analysis. The type of the node specifies
the alignment of the access.
TARGET_MEM_REF
These nodes represent memory accesses whose address directly map to an ad-
dressing mode of the target architecture. The first argument is TMR_BASE and
is a pointer to the object being accessed. The second argument is TMR_OFFSET
which is a pointer constant with dual purpose serving both as constant offset
and holder of the type used for type-based alias analysis. The first two operands
have exactly the same semantics as MEM_REF. The third and fourth operand are
TMR_INDEX and TMR_STEP where the former is an integer and the latter an in-
teger constant. The fifth and last operand is TMR_INDEX2 which is an alternate
non-constant offset. Any of the third to last operands may be NULL if the
corresponding component does not appear in the address, but TMR_INDEX and
TMR_STEP shall be always supplied in pair. The Address of the TARGET_MEM_REF
is determined in the following way.
TMR_BASE + TMR_OFFSET + TMR_INDEX * TMR_STEP + TMR_INDEX2
ABS_EXPR These nodes represent the absolute value of the single operand, for both integer
and floating-point types. This is typically used to implement the abs, labs and
llabs builtins for integer types, and the fabs, fabsf and fabsl builtins for
floating point types. The type of abs operation can be determined by looking
at the type of the expression.
This node is not used for complex types. To represent the modulus or complex
abs of a complex value, use the BUILT_IN_CABS, BUILT_IN_CABSF or BUILT_IN_
CABSL builtins, as used to implement the C99 cabs, cabsf and cabsl built-in
functions.
ABSU_EXPR
These nodes represent the absolute value of the single operand in equivalent
unsigned type such that ABSU_EXPR of TYPE_MIN is well defined.
BIT_NOT_EXPR
These nodes represent bitwise complement, and will always have integral type.
The only operand is the value to be complemented.
194 GNU Compiler Collection (GCC) Internals
TRUTH_NOT_EXPR
These nodes represent logical negation, and will always have integral (or
boolean) type. The operand is the value being negated. The type of the
operand and that of the result are always of BOOLEAN_TYPE or INTEGER_TYPE.
PREDECREMENT_EXPR
PREINCREMENT_EXPR
POSTDECREMENT_EXPR
POSTINCREMENT_EXPR
These nodes represent increment and decrement expressions. The value of the
single operand is computed, and the operand incremented or decremented. In
the case of PREDECREMENT_EXPR and PREINCREMENT_EXPR, the value of the ex-
pression is the value resulting after the increment or decrement; in the case of
POSTDECREMENT_EXPR and POSTINCREMENT_EXPR is the value before the incre-
ment or decrement occurs. The type of the operand, like that of the result, will
be either integral, boolean, or floating-point.
FIX_TRUNC_EXPR
These nodes represent conversion of a floating-point value to an integer. The
single operand will have a floating-point type, while the complete expression
will have an integral (or boolean) type. The operand is rounded towards zero.
FLOAT_EXPR
These nodes represent conversion of an integral (or boolean) value to a floating-
point value. The single operand will have integral type, while the complete
expression will have a floating-point type.
FIXME: How is the operand supposed to be rounded? Is this dependent on
-mieee?
COMPLEX_EXPR
These nodes are used to represent complex numbers constructed from two ex-
pressions of the same (integer or real) type. The first operand is the real part
and the second operand is the imaginary part.
CONJ_EXPR
These nodes represent the conjugate of their operand.
REALPART_EXPR
IMAGPART_EXPR
These nodes represent respectively the real and the imaginary parts of complex
numbers (their sole argument).
NON_LVALUE_EXPR
These nodes indicate that their one and only operand is not an lvalue. A back
end can treat these identically to the single operand.
NOP_EXPR These nodes are used to represent conversions that do not require any code-
generation. For example, conversion of a char* to an int* does not require any
code be generated; such a conversion is represented by a NOP_EXPR. The single
operand is the expression to be converted. The conversion from a pointer to a
reference is also represented with a NOP_EXPR.
Chapter 11: GENERIC 195
CONVERT_EXPR
These nodes are similar to NOP_EXPRs, but are used in those situations where
code may need to be generated. For example, if an int* is converted to an
int code may need to be generated on some platforms. These nodes are never
used for C++-specific conversions, like conversions between pointers to different
classes in an inheritance hierarchy. Any adjustments that need to be made in
such cases are always indicated explicitly. Similarly, a user-defined conversion
is never represented by a CONVERT_EXPR; instead, the function calls are made
explicit.
FIXED_CONVERT_EXPR
These nodes are used to represent conversions that involve fixed-point values.
For example, from a fixed-point value to another fixed-point value, from an
integer to a fixed-point value, from a fixed-point value to an integer, from a
floating-point value to a fixed-point value, or from a fixed-point value to a
floating-point value.
LSHIFT_EXPR
RSHIFT_EXPR
LROTATE_EXPR
RROTATE_EXPR
These nodes represent left and right shifts and rotates, respectively. The first
operand is the value to shift or rotate; it will always be of integral type. The
second operand is an expression for the number of bits by which to shift or
rotate. Right shift should be treated as arithmetic, i.e., the high-order bits
should be zero-filled when the expression has unsigned type and filled with the
sign bit when the expression has signed type. All other operations are logical,
operating on the bit representation. Note that the result is undefined if the
second operand is larger than or equal to the first operand’s type size. Unlike
most nodes, these can have a vector as first operand and a scalar as second
operand.
BIT_IOR_EXPR
BIT_XOR_EXPR
BIT_AND_EXPR
These nodes represent bitwise inclusive or, bitwise exclusive or, and bitwise
and, respectively. Both operands will always have integral type.
TRUTH_ANDIF_EXPR
TRUTH_ORIF_EXPR
These nodes represent logical “and” and logical “or”, respectively. These oper-
ators are not strict; i.e., the second operand is evaluated only if the value of the
expression is not determined by evaluation of the first operand. The type of the
operands and that of the result are always of BOOLEAN_TYPE or INTEGER_TYPE.
TRUTH_AND_EXPR
TRUTH_OR_EXPR
TRUTH_XOR_EXPR
These nodes represent logical and, logical or, and logical exclusive or. They are
strict; both arguments are always evaluated. There are no corresponding oper-
196 GNU Compiler Collection (GCC) Internals
ators in C or C++, but the front end will sometimes generate these expressions
anyhow, if it can tell that strictness does not matter. The type of the operands
and that of the result are always of BOOLEAN_TYPE or INTEGER_TYPE.
POINTER_PLUS_EXPR
This node represents pointer arithmetic. The first operand is always a
pointer/reference type. The second operand is always an unsigned integer
type compatible with sizetype. This and POINTER DIFF EXPR are the only
binary arithmetic operators that can operate on pointer types.
POINTER_DIFF_EXPR
This node represents pointer subtraction. The two operands always have
pointer/reference type. It returns a signed integer of the same precision as the
pointers. The behavior is undefined if the difference of the two pointers, seen
as infinite precision non-negative integers, does not fit in the result type. The
result does not depend on the pointer type, it is not divided by the size of the
pointed-to type.
PLUS_EXPR
MINUS_EXPR
MULT_EXPR
These nodes represent various binary arithmetic operations. Respectively, these
operations are addition, subtraction (of the second operand from the first) and
multiplication. Their operands may have either integral or floating type, but
there will never be case in which one operand is of floating type and the other
is of integral type.
The behavior of these operations on signed arithmetic overflow is controlled by
the flag_wrapv and flag_trapv variables.
WIDEN_MULT_EXPR
This node represents a widening multiplication. The operands have integral
types with same b bits of precision, producing an integral type result with
at least 2b bits of precision. The behaviour is equivalent to extending both
operands, possibly of different signedness, to the result type, then multiplying
them.
MULT_HIGHPART_EXPR
This node represents the “high-part” of a widening multiplication. For an
integral type with b bits of precision, the result is the most significant b bits
of the full 2b product. Both operands must have the same precision and same
signedness.
RDIV_EXPR
This node represents a floating point division operation.
TRUNC_DIV_EXPR
FLOOR_DIV_EXPR
CEIL_DIV_EXPR
ROUND_DIV_EXPR
These nodes represent integer division operations that return an integer result.
TRUNC_DIV_EXPR rounds towards zero, FLOOR_DIV_EXPR rounds towards nega-
Chapter 11: GENERIC 197
As a GNU extension, the C language front-ends allow the second operand of the
?: operator may be omitted in the source. For example, x ? : 3 is equivalent
to x ? x : 3, assuming that x is an expression without side effects. In the
tree representation, however, the second operand is always present, possibly
protected by SAVE_EXPR if the first argument does cause side effects.
CALL_EXPR
These nodes are used to represent calls to functions, including non-static mem-
ber functions. CALL_EXPRs are implemented as expression nodes with a variable
number of operands. Rather than using TREE_OPERAND to extract them, it is
preferable to use the specialized accessor macros and functions that operate
specifically on CALL_EXPR nodes.
CALL_EXPR_FN returns a pointer to the function to call; it is always an expression
whose type is a POINTER_TYPE.
The number of arguments to the call is returned by call_expr_nargs, while
the arguments themselves can be accessed with the CALL_EXPR_ARG macro. The
arguments are zero-indexed and numbered left-to-right. You can iterate over
the arguments using FOR_EACH_CALL_EXPR_ARG, as in:
tree call, arg;
call_expr_arg_iterator iter;
FOR_EACH_CALL_EXPR_ARG (arg, iter, call)
/* arg is bound to successive arguments of call. */
...;
For non-static member functions, there will be an operand corresponding to
the this pointer. There will always be expressions corresponding to all of the
arguments, even if the function is declared with default arguments and some
arguments are not explicitly provided at the call sites.
CALL_EXPRs also have a CALL_EXPR_STATIC_CHAIN operand that is used to im-
plement nested functions. This operand is otherwise null.
CLEANUP_POINT_EXPR
These nodes represent full-expressions. The single operand is an expression
to evaluate. Any destructor calls engendered by the creation of temporaries
during the evaluation of that expression should be performed immediately after
the expression is evaluated.
CONSTRUCTOR
These nodes represent the brace-enclosed initializers for a structure or an ar-
ray. They contain a sequence of component values made out of a vector of
constructor elt, which is a (INDEX, VALUE) pair.
If the TREE_TYPE of the CONSTRUCTOR is a RECORD_TYPE, UNION_TYPE or QUAL_
UNION_TYPE then the INDEX of each node in the sequence will be a FIELD_DECL
and the VALUE will be the expression used to initialize that field.
If the TREE_TYPE of the CONSTRUCTOR is an ARRAY_TYPE, then the INDEX of
each node in the sequence will be an INTEGER_CST or a RANGE_EXPR of two
INTEGER_CSTs. A single INTEGER_CST indicates which element of the array is
being assigned to. A RANGE_EXPR indicates an inclusive range of elements to
initialize. In both cases the VALUE is the corresponding initializer. It is re-
200 GNU Compiler Collection (GCC) Internals
ANNOTATE_EXPR
This node is used to attach markers to an expression. The first operand is the
annotated expression, the second is an INTEGER_CST with a value from enum
annot_expr_kind, the third is an INTEGER_CST.
11.6.4 Vectors
VEC_DUPLICATE_EXPR
This node has a single operand and represents a vector in which every element
is equal to that operand.
VEC_SERIES_EXPR
This node represents a vector formed from a scalar base and step, given as the
first and second operands respectively. Element i of the result is equal to ‘base
+ i*step’.
This node is restricted to integral types, in order to avoid specifying the round-
ing behavior for floating-point types.
VEC_LSHIFT_EXPR
VEC_RSHIFT_EXPR
These nodes represent whole vector left and right shifts, respectively. The first
operand is the vector to shift; it will always be of vector type. The second
operand is an expression for the number of bits by which to shift. Note that
the result is undefined if the second operand is larger than or equal to the first
operand’s type size.
VEC_WIDEN_MULT_HI_EXPR
VEC_WIDEN_MULT_LO_EXPR
These nodes represent widening vector multiplication of the high and low parts
of the two input vectors, respectively. Their operands are vectors that contain
the same number of elements (N) of the same integral type. The result is a
vector that contains half as many elements, of an integral type whose size is
twice as wide. In the case of VEC_WIDEN_MULT_HI_EXPR the high N/2 elements
of the two vector are multiplied to produce the vector of N/2 products. In the
case of VEC_WIDEN_MULT_LO_EXPR the low N/2 elements of the two vector are
multiplied to produce the vector of N/2 products.
IFN_VEC_WIDEN_PLUS
This internal function represents widening vector addition of two input vectors.
Its operands are vectors that contain the same number of elements (N) of the
same integral type. The result is a vector that contains the same amount
(N) of elements, of an integral type whose size is twice as wide, as the input
vectors. If the current target does not implement the corresponding optabs the
vectorizer may choose to split it into either a pair of IFN_VEC_WIDEN_PLUS_
HI and IFN_VEC_WIDEN_PLUS_LO or IFN_VEC_WIDEN_PLUS_EVEN and IFN_VEC_
WIDEN_PLUS_ODD, depending on what optabs the target implements.
IFN_VEC_WIDEN_PLUS_HI
IFN_VEC_WIDEN_PLUS_LO
These internal functions represent widening vector addition of the high and low
parts of the two input vectors, respectively. Their operands are vectors that
202 GNU Compiler Collection (GCC) Internals
contain the same number of elements (N) of the same integral type. The result
is a vector that contains half as many elements, of an integral type whose size
is twice as wide. In the case of IFN_VEC_WIDEN_PLUS_HI the high N/2 elements
of the two vectors are added to produce the vector of N/2 additions. In the case
of IFN_VEC_WIDEN_PLUS_LO the low N/2 elements of the two vectors are added
to produce the vector of N/2 additions.
IFN_VEC_WIDEN_PLUS_EVEN
IFN_VEC_WIDEN_PLUS_ODD
These internal functions represent widening vector addition of the even and odd
elements of the two input vectors, respectively. Their operands are vectors that
contain the same number of elements (N) of the same integral type. The result
is a vector that contains half as many elements, of an integral type whose size is
twice as wide. In the case of IFN_VEC_WIDEN_PLUS_EVEN the even N/2 elements
of the two vectors are added to produce the vector of N/2 additions. In the
case of IFN_VEC_WIDEN_PLUS_ODD the odd N/2 elements of the two vectors are
added to produce the vector of N/2 additions.
IFN_VEC_WIDEN_MINUS
This internal function represents widening vector subtraction of two input vec-
tors. Its operands are vectors that contain the same number of elements (N) of
the same integral type. The result is a vector that contains the same amount
(N) of elements, of an integral type whose size is twice as wide, as the input
vectors. If the current target does not implement the corresponding optabs the
vectorizer may choose to split it into either a pair of IFN_VEC_WIDEN_MINUS_HI
and IFN_VEC_WIDEN_MINUS_LO or IFN_VEC_WIDEN_MINUS_EVEN and IFN_VEC_
WIDEN_MINUS_ODD, depending on what optabs the target implements.
IFN_VEC_WIDEN_MINUS_HI
IFN_VEC_WIDEN_MINUS_LO
These internal functions represent widening vector subtraction of the high and
low parts of the two input vectors, respectively. Their operands are vectors
that contain the same number of elements (N) of the same integral type. The
high/low elements of the second vector are subtracted from the high/low ele-
ments of the first. The result is a vector that contains half as many elements,
of an integral type whose size is twice as wide. In the case of IFN_VEC_WIDEN_
MINUS_HI the high N/2 elements of the second vector are subtracted from the
high N/2 of the first to produce the vector of N/2 subtractions. In the case of
IFN_VEC_WIDEN_MINUS_LO the low N/2 elements of the second vector are sub-
tracted from the low N/2 of the first to produce the vector of N/2 subtractions.
IFN_VEC_WIDEN_MINUS_EVEN
IFN_VEC_WIDEN_MINUS_ODD
These internal functions represent widening vector subtraction of the even and
odd parts of the two input vectors, respectively. Their operands are vectors
that contain the same number of elements (N) of the same integral type. The
even/odd elements of the second vector are subtracted from the even/odd ele-
ments of the first. The result is a vector that contains half as many elements,
of an integral type whose size is twice as wide. In the case of IFN_VEC_WIDEN_
Chapter 11: GENERIC 203
MINUS_EVEN the even N/2 elements of the second vector are subtracted from
the even N/2 of the first to produce the vector of N/2 subtractions. In the
case of IFN_VEC_WIDEN_MINUS_ODD the odd N/2 elements of the second vec-
tor are subtracted from the odd N/2 of the first to produce the vector of N/2
subtractions.
VEC_UNPACK_HI_EXPR
VEC_UNPACK_LO_EXPR
These nodes represent unpacking of the high and low parts of the input vector,
respectively. The single operand is a vector that contains N elements of the
same integral or floating point type. The result is a vector that contains half
as many elements, of an integral or floating point type whose size is twice as
wide. In the case of VEC_UNPACK_HI_EXPR the high N/2 elements of the vector
are extracted and widened (promoted). In the case of VEC_UNPACK_LO_EXPR
the low N/2 elements of the vector are extracted and widened (promoted).
VEC_UNPACK_FLOAT_HI_EXPR
VEC_UNPACK_FLOAT_LO_EXPR
These nodes represent unpacking of the high and low parts of the input vector,
where the values are converted from fixed point to floating point. The single
operand is a vector that contains N elements of the same integral type. The
result is a vector that contains half as many elements of a floating point type
whose size is twice as wide. In the case of VEC_UNPACK_FLOAT_HI_EXPR the high
N/2 elements of the vector are extracted, converted and widened. In the case of
VEC_UNPACK_FLOAT_LO_EXPR the low N/2 elements of the vector are extracted,
converted and widened.
VEC_UNPACK_FIX_TRUNC_HI_EXPR
VEC_UNPACK_FIX_TRUNC_LO_EXPR
These nodes represent unpacking of the high and low parts of the input vector,
where the values are truncated from floating point to fixed point. The single
operand is a vector that contains N elements of the same floating point type.
The result is a vector that contains half as many elements of an integral type
whose size is twice as wide. In the case of VEC_UNPACK_FIX_TRUNC_HI_EXPR the
high N/2 elements of the vector are extracted and converted with truncation.
In the case of VEC_UNPACK_FIX_TRUNC_LO_EXPR the low N/2 elements of the
vector are extracted and converted with truncation.
VEC_PACK_TRUNC_EXPR
This node represents packing of truncated elements of the two input vectors into
the output vector. Input operands are vectors that contain the same number
of elements of the same integral or floating point type. The result is a vector
that contains twice as many elements of an integral or floating point type whose
size is half as wide. The elements of the two vectors are demoted and merged
(concatenated) to form the output vector.
VEC_PACK_SAT_EXPR
This node represents packing of elements of the two input vectors into the
output vector using saturation. Input operands are vectors that contain the
same number of elements of the same integral type. The result is a vector that
204 GNU Compiler Collection (GCC) Internals
contains twice as many elements of an integral type whose size is half as wide.
The elements of the two vectors are demoted and merged (concatenated) to
form the output vector.
VEC_PACK_FIX_TRUNC_EXPR
This node represents packing of elements of the two input vectors into the
output vector, where the values are converted from floating point to fixed point.
Input operands are vectors that contain the same number of elements of a
floating point type. The result is a vector that contains twice as many elements
of an integral type whose size is half as wide. The elements of the two vectors
are merged (concatenated) to form the output vector.
VEC_PACK_FLOAT_EXPR
This node represents packing of elements of the two input vectors into the
output vector, where the values are converted from fixed point to floating point.
Input operands are vectors that contain the same number of elements of an
integral type. The result is a vector that contains twice as many elements of
floating point type whose size is half as wide. The elements of the two vectors
are merged (concatenated) to form the output vector.
VEC_COND_EXPR
These nodes represent ?: expressions. The three operands must be vectors of
the same size and number of elements. The second and third operands must
have the same type as the entire expression. The first operand is of signed
integral vector type. If an element of the first operand evaluates to a zero
value, the corresponding element of the result is taken from the third operand.
If it evaluates to a minus one value, it is taken from the second operand. It
should never evaluate to any other value currently, but optimizations should not
rely on that property. In contrast with a COND_EXPR, all operands are always
evaluated.
SAD_EXPR This node represents the Sum of Absolute Differences operation. The three
operands must be vectors of integral types. The first and second operand must
have the same type. The size of the vector element of the third operand must
be at lease twice of the size of the vector element of the first and second one.
The SAD is calculated between the first and second operands, added to the
third operand, and returned.
11.7 Statements
Most statements in GIMPLE are assignment statements, represented by GIMPLE_ASSIGN.
No other C expressions can appear at statement level; a reference to a volatile object is
converted into a GIMPLE_ASSIGN.
There are also several varieties of complex statements.
DECL_EXPR
Used to represent a local declaration. The DECL_EXPR_DECL macro can be
used to obtain the entity declared. This declaration may be a LABEL_DECL,
indicating that the label declared is a local label. (As an extension, GCC
allows the declaration of labels with scope.) In C, this declaration may be a
FUNCTION_DECL, indicating the use of the GCC nested function extension. For
more information, see Section 11.8 [Functions], page 212.
LABEL_EXPR
Used to represent a label. The LABEL_DECL declared by this statement can be
obtained with the LABEL_EXPR_LABEL macro. The IDENTIFIER_NODE giving the
name of the label can be obtained from the LABEL_DECL with DECL_NAME.
GOTO_EXPR
Used to represent a goto statement. The GOTO_DESTINATION will usually be
a LABEL_DECL. However, if the “computed goto” extension has been used, the
GOTO_DESTINATION will be an arbitrary expression indicating the destination.
This expression will always have pointer type.
RETURN_EXPR
Used to represent a return statement. Operand 0 represents the value to
return. It should either be the RESULT_DECL for the containing function, or
a MODIFY_EXPR or INIT_EXPR setting the function’s RESULT_DECL. It will be
NULL_TREE if the statement was just
return;
LOOP_EXPR
These nodes represent “infinite” loops. The LOOP_EXPR_BODY represents the
body of the loop. It should be executed forever, unless an EXIT_EXPR is en-
countered.
206 GNU Compiler Collection (GCC) Internals
EXIT_EXPR
These nodes represent conditional exits from the nearest enclosing LOOP_EXPR.
The single operand is the condition; if it is nonzero, then the loop should be
exited. An EXIT_EXPR will only appear within a LOOP_EXPR.
SWITCH_EXPR
Used to represent a switch statement. The SWITCH_COND is the expression on
which the switch is occurring. The SWITCH_BODY is the body of the switch
statement. SWITCH_ALL_CASES_P is true if the switch includes a default label
or the case label ranges cover all possible values of the condition expression.
Note that TREE_TYPE for a SWITCH_EXPR represents the original type of switch
expression as given in the source, before any compiler conversions, instead of
the type of the switch expression itself (which is not meaningful).
CASE_LABEL_EXPR
Use to represent a case label, range of case labels, or a default label. If
CASE_LOW is NULL_TREE, then this is a default label. Otherwise, if CASE_HIGH
is NULL_TREE, then this is an ordinary case label. In this case, CASE_LOW is
an expression giving the value of the label. Both CASE_LOW and CASE_HIGH
are INTEGER_CST nodes. These values will have the same type as the condition
expression in the switch statement.
Otherwise, if both CASE_LOW and CASE_HIGH are defined, the statement is a
range of case labels. Such statements originate with the extension that allows
users to write things of the form:
case 2 ... 5:
The first value will be CASE_LOW, while the second will be CASE_HIGH.
DEBUG_BEGIN_STMT
Marks the beginning of a source statement, for purposes of debug information
generation.
11.7.2 Blocks
Block scopes and the variables they declare in GENERIC are expressed using the BIND_EXPR
code, which in previous versions of GCC was primarily used for the C statement-expression
extension.
Variables in a block are collected into BIND_EXPR_VARS in declaration order through their
TREE_CHAIN field. Any runtime initialization is moved out of DECL_INITIAL and into a
statement in the controlled block. When gimplifying from C or C++, this initialization
replaces the DECL_STMT. These variables will never require cleanups. The scope of these
variables is just the body
Variable-length arrays (VLAs) complicate this process, as their size often refers to vari-
ables initialized earlier in the block and their initialization involves an explicit stack allo-
cation. To handle this, we add an indirection and replace them with a pointer to stack
space allocated by means of alloca. In most cases, we also arrange for this space to be
reclaimed when the enclosing BIND_EXPR is exited, the exception to this being when there
is an explicit call to alloca in the source code, in which case the stack is left depressed on
exit of the BIND_EXPR.
Chapter 11: GENERIC 207
A C++ program will usually contain more BIND_EXPRs than there are syntactic blocks in
the source code, since several C++ constructs have implicit scopes associated with them.
On the other hand, although the C++ front end uses pseudo-scopes to handle cleanups for
objects with destructors, these don’t translate into the GIMPLE form; multiple declarations
at the same level use the same BIND_EXPR.
11.7.5 Jumps
Other jumps are expressed by either GOTO_EXPR or RETURN_EXPR.
The operand of a GOTO_EXPR must be either a label or a variable containing the address
to jump to.
The operand of a RETURN_EXPR is either NULL_TREE, RESULT_DECL, or a MODIFY_EXPR
which sets the return value. It would be nice to move the MODIFY_EXPR into a separate
statement, but the special return semantics in expand_return make that difficult. It may
still happen in the future, perhaps by moving most of that logic into expand_assignment.
11.7.6 Cleanups
Destructors for local C++ objects and similar dynamic cleanups are represented in GIM-
PLE by a TRY_FINALLY_EXPR. TRY_FINALLY_EXPR has two operands, both of which are a
sequence of statements to execute. The first sequence is executed. When it completes the
second sequence is executed.
The first sequence may complete in the following ways:
1. Execute the last statement in the sequence and fall off the end.
2. Execute a goto statement (GOTO_EXPR) to an ordinary label outside the sequence.
3. Execute a return statement (RETURN_EXPR).
4. Throw an exception. This is currently not explicitly represented in GIMPLE.
The second sequence is not executed if the first sequence completes by calling setjmp or
exit or any other function that does not return. The second sequence is also not executed
if the first sequence completes via a non-local goto or a computed goto (in general the
compiler does not know whether such a goto statement exits the first sequence or not, so
we assume that it doesn’t).
After the second sequence is executed, if it completes normally by falling off the end,
execution continues wherever the first sequence would have continued, by falling off the
end, or doing a goto, etc.
208 GNU Compiler Collection (GCC) Internals
If the second sequence is an EH_ELSE_EXPR selector, then the sequence in its first operand
is used when the first sequence completes normally, and that in its second operand is used
for exceptional cleanups, i.e., when an exception propagates out of the first sequence.
TRY_FINALLY_EXPR complicates the flow graph, since the cleanup needs to appear on
every edge out of the controlled block; this reduces the freedom to move code across these
edges. Therefore, the EH lowering pass which runs before most of the optimization passes
eliminates these expressions by explicitly adding the cleanup to each edge. Rethrowing the
exception is represented using RESX_EXPR.
11.7.7 OpenMP
All the statements starting with OMP_ represent directives and clauses used by the OpenMP
API https://www.openmp.org.
OMP_PARALLEL
Represents #pragma omp parallel [clause1 ... clauseN]. It has four
operands:
Operand OMP_PARALLEL_BODY is valid while in GENERIC and High GIMPLE
forms. It contains the body of code to be executed by all the threads. During
GIMPLE lowering, this operand becomes NULL and the body is emitted linearly
after OMP_PARALLEL.
Operand OMP_PARALLEL_CLAUSES is the list of clauses associated with the di-
rective.
Operand OMP_PARALLEL_FN is created by pass_lower_omp, it contains the
FUNCTION_DECL for the function that will contain the body of the parallel
region.
Operand OMP_PARALLEL_DATA_ARG is also created by pass_lower_omp. If there
are shared variables to be communicated to the children threads, this operand
will contain the VAR_DECL that contains all the shared values and variables.
OMP_FOR
OMP_SIMD
OMP_DISTRIBUTE
OMP_TASKLOOP
OMP_LOOP
Represents #pragma omp for [clause1 ... clauseN] and related loop
constructs (respectively).
A single OMP_FOR node represents an entire nest of collapsed loops; as noted
below, some of its arguments are vectors of length equal to the collapse depth,
and the corresponding elements holding data specific to a particular loop in the
nest. These vectors are numbered from the outside in so that the outermost
loop is element 0.
These constructs have seven operands:
Operand OMP_FOR_BODY contains the loop body.
Operand OMP_FOR_CLAUSES is the list of clauses associated with the directive.
Operand OMP_FOR_INIT is a vector containing iteration variable initializations
of the form VAR = N1.
Chapter 11: GENERIC 209
OMP_MASTER
Represents #pragma omp master.
Operand OMP_MASTER_BODY contains the body of code to be executed by the
master thread.
OMP_ORDERED
Represents #pragma omp ordered.
Operand OMP_ORDERED_BODY contains the body of code to be executed in the
sequential order dictated by the loop index variable.
OMP_CRITICAL
Represents #pragma omp critical [name].
Operand OMP_CRITICAL_BODY is the critical section.
Operand OMP_CRITICAL_NAME is an optional identifier to label the critical sec-
tion.
OMP_RETURN
This does not represent any OpenMP directive, it is an artificial marker to
indicate the end of the body of an OpenMP. It is used by the flow graph
(tree-cfg.cc) and OpenMP region building code (omp-low.cc).
OMP_CONTINUE
Similarly, this instruction does not represent an OpenMP directive, it is used by
OMP_FOR (and similar codes) as well as OMP_SECTIONS to mark the place where
the code needs to loop to the next iteration, or the next section, respectively.
In some cases, OMP_CONTINUE is placed right before OMP_RETURN. But if there
are cleanups that need to occur right after the looping body, it will be emitted
between OMP_CONTINUE and OMP_RETURN.
OMP_STRUCTURED_BLOCK
This is another statement that doesn’t correspond to an OpenMP directive. It is
used to mark sections of code in another directive that must be structured block
sequences, in particular for sequences of intervening code in the body of an OMP_
FOR. It is not necessary to use this when the entire body of a directive is required
to be a structured block sequence, since that is implicit in the representation
of the corresponding node.
This tree node is used only to allow error checking transfers of control in/out
of the structured block sequence after gimplification. It has a single operand
(OMP_STRUCTURED_BLOCK_BODY) that is the code within the structured block
sequence.
OMP_ATOMIC
Represents #pragma omp atomic.
Operand 0 is the address at which the atomic operation is to be performed.
Operand 1 is the expression to evaluate. The gimplifier tries three alternative
code generation strategies. Whenever possible, an atomic update built-in is
used. If that fails, a compare-and-swap loop is attempted. If that also fails, a
regular critical section around the expression is used.
Chapter 11: GENERIC 211
OMP_CLAUSE
Represents clauses associated with one of the OMP_ directives. Clauses are
represented by separate subcodes defined in tree.h. Clauses codes can be one
of: OMP_CLAUSE_PRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE,
OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE,
OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE,
OMP_CLAUSE_NOWAIT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT,
OMP_CLAUSE_REDUCTION, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED,
OMP_CLAUSE_FINAL, and OMP_CLAUSE_MERGEABLE. Each code represents the
corresponding OpenMP clause.
Clauses associated with the same directive are chained together via
OMP_CLAUSE_CHAIN. Those clauses that accept a list of variables are restricted
to exactly one, accessed with OMP_CLAUSE_VAR. Therefore, multiple variables
under the same clause C need to be represented as multiple C clauses chained
together. This facilitates adding new clauses during compilation.
11.7.8 OpenACC
All the statements starting with OACC_ represent directives and clauses used by the Ope-
nACC API https://www.openacc.org.
OACC_CACHE
Represents #pragma acc cache (var ...).
OACC_DATA
Represents #pragma acc data [clause1 ... clauseN].
OACC_DECLARE
Represents #pragma acc declare [clause1 ... clauseN].
OACC_ENTER_DATA
Represents #pragma acc enter data [clause1 ... clauseN].
OACC_EXIT_DATA
Represents #pragma acc exit data [clause1 ... clauseN].
OACC_HOST_DATA
Represents #pragma acc host_data [clause1 ... clauseN].
OACC_KERNELS
Represents #pragma acc kernels [clause1 ... clauseN].
OACC_LOOP
Represents #pragma acc loop [clause1 ... clauseN].
See the description of the OMP_FOR code.
OACC_PARALLEL
Represents #pragma acc parallel [clause1 ... clauseN].
OACC_SERIAL
Represents #pragma acc serial [clause1 ... clauseN].
OACC_UPDATE
Represents #pragma acc update [clause1 ... clauseN].
212 GNU Compiler Collection (GCC) Internals
11.8 Functions
A function is represented by a FUNCTION_DECL node. It stores the basic pieces of the function
such as body, parameters, and return type as well as information on the surrounding context,
visibility, and linkage.
It should contain a tree of BLOCK nodes that mirrors the scopes that variables
are bound in the function. Each block contains a list of decls declared in a
basic block, a pointer to a chain of blocks at the next lower scope level, then
a pointer to the next block at the same level and a backpointer to the parent
BLOCK or FUNCTION_DECL. So given a function as follows:
void foo()
{
int a;
{
int b;
}
int c;
}
you would get the following:
tree foo = FUNCTION_DECL;
tree decl_a = VAR_DECL;
tree decl_b = VAR_DECL;
tree decl_c = VAR_DECL;
tree block_a = BLOCK;
tree block_b = BLOCK;
tree block_c = BLOCK;
BLOCK_VARS(block_a) = decl_a;
BLOCK_SUBBLOCKS(block_a) = block_b;
BLOCK_CHAIN(block_a) = block_c;
BLOCK_SUPERCONTEXT(block_a) = foo;
BLOCK_VARS(block_b) = decl_b;
BLOCK_SUPERCONTEXT(block_b) = block_a;
BLOCK_VARS(block_c) = decl_c;
BLOCK_SUPERCONTEXT(block_c) = foo;
DECL_INITIAL(foo) = block_a;
DECL_EXTERNAL
This predicate holds if the function is undefined.
TREE_PUBLIC
This predicate holds if the function has external linkage.
214 GNU Compiler Collection (GCC) Internals
TREE_STATIC
This predicate holds if the function has been defined.
TREE_THIS_VOLATILE
This predicate holds if the function does not return normally.
TREE_READONLY
This predicate holds if the function can only read its arguments.
DECL_PURE_P
This predicate holds if the function can only read its arguments, but may also
read global memory.
DECL_VIRTUAL_P
This predicate holds if the function is virtual.
DECL_ARTIFICIAL
This macro holds if the function was implicitly generated by the compiler,
rather than explicitly declared. In addition to implicitly generated class member
functions, this macro holds for the special functions created to implement static
initialization and destruction, to compute run-time type information, and so
forth.
DECL_FUNCTION_SPECIFIC_TARGET
This macro returns a tree node that holds the target options that are to be
used to compile this particular function or NULL_TREE if the function is to be
compiled with the target options specified on the command line.
DECL_FUNCTION_SPECIFIC_OPTIMIZATION
This macro returns a tree node that holds the optimization options that are to
be used to compile this particular function or NULL_TREE if the function is to
be compiled with the optimization options specified on the command line.
representation for the entire translation unit provided as input to the front end. This
representation is then typically processed by a code-generator in order to produce machine
code, but could also be used in the creation of source browsers, intelligent editors, automatic
documentation generators, interpreters, and any other programs needing the ability to
process C or C++ code.
This section explains the internal representation. In particular, it documents the internal
representation for C and C++ source constructs, and the macros, functions, and variables
that can be used to access these constructs. The C++ representation is largely a superset
of the representation used in the C front end. There is only one construct used in C that
does not appear in the C++ front end and that is the GNU “nested function” extension.
Many of the macros documented here do not apply in C because the corresponding language
constructs do not appear in C.
The C and C++ front ends generate a mix of GENERIC trees and ones specific to C and
C++. These language-specific trees are higher-level constructs than the ones in GENERIC to
make the parser’s job easier. This section describes those trees that aren’t part of GENERIC
as well as aspects of GENERIC trees that are treated in a language-specific manner.
If you are developing a “back end”, be it is a code-generator or some other tool, that uses
this representation, you may occasionally find that you need to ask questions not easily
answered by the functions and macros available here. If that situation occurs, it is quite
likely that GCC already supports the functionality you desire, but that the interface is
simply not documented here. In that case, you should ask the GCC maintainers (via mail
to gcc@gcc.gnu.org) about documenting the functionality you require. Similarly, if you
find yourself writing functions that do not deal directly with your back end, but instead
might be useful to other people using the GCC front end, you should submit your patches
for inclusion in GCC.
CP_TYPE_RESTRICT_P
This macro holds if the type is restrict-qualified.
CP_TYPE_CONST_NON_VOLATILE_P
This predicate holds for a type that is const-qualified, but not volatile-
qualified; other cv-qualifiers are ignored as well: only the const-ness is tested.
A few other macros and functions are usable with all types:
TYPE_SIZE
The number of bits required to represent the type, represented as an INTEGER_
CST. For an incomplete type, TYPE_SIZE will be NULL_TREE.
TYPE_ALIGN
The alignment of the type, in bits, represented as an int.
TYPE_NAME
This macro returns a declaration (in the form of a TYPE_DECL) for the type.
(Note this macro does not return an IDENTIFIER_NODE, as you might expect,
given its name!) You can look at the DECL_NAME of the TYPE_DECL to obtain
the actual name of the type. The TYPE_NAME will be NULL_TREE for a type that
is not a built-in type, the result of a typedef, or a named class type.
CP_INTEGRAL_TYPE
This predicate holds if the type is an integral type. Notice that in C++, enu-
merations are not integral types.
ARITHMETIC_TYPE_P
This predicate holds if the type is an integral type (in the C++ sense) or a
floating point type.
CLASS_TYPE_P
This predicate holds for a class-type.
TYPE_BUILT_IN
This predicate holds for a built-in type.
TYPE_PTRDATAMEM_P
This predicate holds if the type is a pointer to data member.
TYPE_PTR_P
This predicate holds if the type is a pointer type, and the pointee is not a data
member.
TYPE_PTRFN_P
This predicate holds for a pointer to function type.
TYPE_PTROB_P
This predicate holds for a pointer to object type. Note however that it does not
hold for the generic pointer to object type void *. You may use TYPE_PTROBV_P
to test for a pointer to object type as well as void *.
The table below describes types specific to C and C++ as well as language-dependent info
about GENERIC types.
Chapter 11: GENERIC 217
POINTER_TYPE
Used to represent pointer types, and pointer to data member types. If TREE_
TYPE is a pointer to data member type, then TYPE_PTRDATAMEM_P will hold. For
a pointer to data member type of the form ‘T X::*’, TYPE_PTRMEM_CLASS_TYPE
will be the type X, while TYPE_PTRMEM_POINTED_TO_TYPE will be the type T.
RECORD_TYPE
Used to represent struct and class types in C and C++. If TYPE_PTRMEMFUNC_
P holds, then this type is a pointer-to-member type. In that case, the TYPE_
PTRMEMFUNC_FN_TYPE is a POINTER_TYPE pointing to a METHOD_TYPE. The
METHOD_TYPE is the type of a function pointed to by the pointer-to-member
function. If TYPE_PTRMEMFUNC_P does not hold, this type is a class type. For
more information, see Section 11.10.3 [Classes], page 218.
UNKNOWN_TYPE
This node is used to represent a type the knowledge of which is insufficient for
a sound processing.
TYPENAME_TYPE
Used to represent a construct of the form typename T::A. The TYPE_CONTEXT
is T; the TYPE_NAME is an IDENTIFIER_NODE for A. If the type is specified via a
template-id, then TYPENAME_TYPE_FULLNAME yields a TEMPLATE_ID_EXPR. The
TREE_TYPE is non-NULL if the node is implicitly generated in support for the
implicit typename extension; in which case the TREE_TYPE is a type node for
the base-class.
TYPEOF_TYPE
Used to represent the __typeof__ extension. The TYPE_FIELDS is the expres-
sion the type of which is being represented.
11.10.2 Namespaces
The root of the entire intermediate representation is the variable global_namespace. This is
the namespace specified with :: in C++ source code. All other namespaces, types, variables,
functions, and so forth can be found starting with this namespace.
However, except for the fact that it is distinguished as the root of the representation,
the global namespace is no different from any other namespace. Thus, in what follows, we
describe namespaces generally, rather than the global namespace in particular.
A namespace is represented by a NAMESPACE_DECL node.
The following macros and functions can be used on a NAMESPACE_DECL:
DECL_NAME
This macro is used to obtain the IDENTIFIER_NODE corresponding to the un-
qualified name of the name of the namespace (see Section 11.2.2 [Identifiers],
page 179). The name of the global namespace is ‘::’, even though in C++
the global namespace is unnamed. However, you should use comparison with
global_namespace, rather than DECL_NAME to determine whether or not a
namespace is the global one. An unnamed namespace will have a DECL_NAME
equal to anonymous_namespace_name. Within a single translation unit, all un-
named namespaces will have the same name.
218 GNU Compiler Collection (GCC) Internals
DECL_CONTEXT
This macro returns the enclosing namespace. The DECL_CONTEXT for the
global_namespace is NULL_TREE.
DECL_NAMESPACE_ALIAS
If this declaration is for a namespace alias, then DECL_NAMESPACE_ALIAS is the
namespace for which this one is an alias.
Do not attempt to use cp_namespace_decls for a namespace which is an alias.
Instead, follow DECL_NAMESPACE_ALIAS links until you reach an ordinary, non-
alias, namespace, and call cp_namespace_decls there.
DECL_NAMESPACE_STD_P
This predicate holds if the namespace is the special ::std namespace.
cp_namespace_decls
This function will return the declarations contained in the namespace, including
types, overloaded functions, other namespaces, and so forth. If there are no dec-
larations, this function will return NULL_TREE. The declarations are connected
through their TREE_CHAIN fields.
Although most entries on this list will be declarations, TREE_LIST nodes may
also appear. In this case, the TREE_VALUE will be an OVERLOAD. The value of the
TREE_PURPOSE is unspecified; back ends should ignore this value. As with the
other kinds of declarations returned by cp_namespace_decls, the TREE_CHAIN
will point to the next declaration in this list.
For more information on the kinds of declarations that can occur on this list,
See Section 11.4 [Declarations], page 184. Some declarations will not appear on
this list. In particular, no FIELD_DECL, LABEL_DECL, or PARM_DECL nodes will
appear here.
This function cannot be used with namespaces that have DECL_NAMESPACE_
ALIAS set.
11.10.3 Classes
Besides namespaces, the other high-level scoping construct in C++ is the class. (Through-
out this manual the term class is used to mean the types referred to in the ANSI/ISO
C++ Standard as classes; these include types defined with the class, struct, and union
keywords.)
A class type is represented by either a RECORD_TYPE or a UNION_TYPE. A class declared
with the union tag is represented by a UNION_TYPE, while classes declared with either the
struct or the class tag are represented by RECORD_TYPEs. You can use the CLASSTYPE_
DECLARED_CLASS macro to discern whether or not a particular type is a class as opposed
to a struct. This macro will be true only for classes declared with the class tag.
Almost all members are available on the TYPE_FIELDS list. Given one member, the next
can be found by following the TREE_CHAIN. You should not depend in any way on the
order in which fields appear on this list. All nodes on this list will be ‘DECL’ nodes. A
FIELD_DECL is used to represent a non-static data member, a VAR_DECL is used to represent
a static data member, and a TYPE_DECL is used to represent a type. Note that the CONST_
DECL for an enumeration constant will appear on this list, if the enumeration type was
Chapter 11: GENERIC 219
declared in the class. (Of course, the TYPE_DECL for the enumeration type will appear here
as well.) There are no entries for base classes on this list. In particular, there is no FIELD_
DECL for the “base-class portion” of an object. If a function member is overloaded, each
of the overloaded functions appears; no OVERLOAD nodes appear on the TYPE_FIELDS list.
Implicitly declared functions (including default constructors, copy constructors, assignment
operators, and destructors) will appear on this list as well.
The TYPE_VFIELD is a compiler-generated field used to point to virtual function tables.
It may or may not appear on the TYPE_FIELDS list. However, back ends should handle the
TYPE_VFIELD just like all the entries on the TYPE_FIELDS list.
Every class has an associated binfo, which can be obtained with TYPE_BINFO. Binfos
are used to represent base-classes. The binfo given by TYPE_BINFO is the degenerate case,
whereby every class is considered to be its own base-class. The base binfos for a particular
binfo are held in a vector, whose length is obtained with BINFO_N_BASE_BINFOS. The base
binfos themselves are obtained with BINFO_BASE_BINFO and BINFO_BASE_ITERATE. To add
a new binfo, use BINFO_BASE_APPEND. The vector of base binfos can be obtained with
BINFO_BASE_BINFOS, but normally you do not need to use that. The class type associated
with a binfo is given by BINFO_TYPE. It is not always the case that BINFO_TYPE (TYPE_
BINFO (x)), because of typedefs and qualified types. Neither is it the case that TYPE_BINFO
(BINFO_TYPE (y)) is the same binfo as y. The reason is that if y is a binfo representing a
base-class B of a derived class D, then BINFO_TYPE (y) will be B, and TYPE_BINFO (BINFO_
TYPE (y)) will be B as its own base-class, rather than as a base-class of D.
The access to a base type can be found with BINFO_BASE_ACCESS. This will produce
access_public_node, access_private_node or access_protected_node. If bases are
always public, BINFO_BASE_ACCESSES may be NULL.
BINFO_VIRTUAL_P is used to specify whether the binfo is inherited virtually or not. The
other flags, BINFO_FLAG_0 to BINFO_FLAG_6, can be used for language specific use.
The following macros can be used on a tree node representing a class-type.
LOCAL_CLASS_P
This predicate holds if the class is local class i.e. declared inside a function
body.
TYPE_POLYMORPHIC_P
This predicate holds if the class has at least one virtual function (declared or
inherited).
TYPE_HAS_DEFAULT_CONSTRUCTOR
This predicate holds whenever its argument represents a class-type with default
constructor.
CLASSTYPE_HAS_MUTABLE
TYPE_HAS_MUTABLE_P
These predicates hold for a class-type having a mutable data member.
CLASSTYPE_NON_POD_P
This predicate holds only for class-types that are not PODs.
TYPE_HAS_NEW_OPERATOR
This predicate holds for a class-type that defines operator new.
220 GNU Compiler Collection (GCC) Internals
TYPE_HAS_ARRAY_NEW_OPERATOR
This predicate holds for a class-type for which operator new[] is defined.
TYPE_OVERLOADS_CALL_EXPR
This predicate holds for class-type for which the function call operator() is
overloaded.
TYPE_OVERLOADS_ARRAY_REF
This predicate holds for a class-type that overloads operator[]
TYPE_OVERLOADS_ARROW
This predicate holds for a class-type for which operator-> is overloaded.
DECL_LINKONCE_P
This macro holds if multiple copies of this function may be emitted in various
translation units. It is the responsibility of the linker to merge the various
copies. Template instantiations are the most common example of functions
for which DECL_LINKONCE_P holds; G++ instantiates needed templates in all
translation units which require them, and then relies on the linker to remove
duplicate instantiations.
FIXME: This macro is not yet implemented.
DECL_FUNCTION_MEMBER_P
This macro holds if the function is a member of a class, rather than a member
of a namespace.
DECL_STATIC_FUNCTION_P
This predicate holds if the function a static member function.
DECL_NONSTATIC_MEMBER_FUNCTION_P
This macro holds for a non-static member function.
DECL_CONST_MEMFUNC_P
This predicate holds for a const-member function.
DECL_VOLATILE_MEMFUNC_P
This predicate holds for a volatile-member function.
DECL_CONSTRUCTOR_P
This macro holds if the function is a constructor.
DECL_NONCONVERTING_P
This predicate holds if the constructor is a non-converting constructor.
DECL_COMPLETE_CONSTRUCTOR_P
This predicate holds for a function which is a constructor for an object of a
complete type.
DECL_BASE_CONSTRUCTOR_P
This predicate holds for a function which is a constructor for a base class sub-
object.
DECL_COPY_CONSTRUCTOR_P
This predicate holds for a function which is a copy-constructor.
DECL_DESTRUCTOR_P
This macro holds if the function is a destructor.
DECL_COMPLETE_DESTRUCTOR_P
This predicate holds if the function is the destructor for an object a complete
type.
DECL_OVERLOADED_OPERATOR_P
This macro holds if the function is an overloaded operator.
DECL_CONV_FN_P
This macro holds if the function is a type-conversion operator.
222 GNU Compiler Collection (GCC) Internals
DECL_GLOBAL_CTOR_P
This predicate holds if the function is a file-scope initialization function.
DECL_GLOBAL_DTOR_P
This predicate holds if the function is a file-scope finalization function.
DECL_THUNK_P
This predicate holds if the function is a thunk.
These functions represent stub code that adjusts the this pointer and then
jumps to another function. When the jumped-to function returns, control is
transferred directly to the caller, without returning to the thunk. The first
parameter to the thunk is always the this pointer; the thunk should add THUNK_
DELTA to this value. (The THUNK_DELTA is an int, not an INTEGER_CST.)
Then, if THUNK_VCALL_OFFSET (an INTEGER_CST) is nonzero the adjusted this
pointer must be adjusted again. The complete calculation is given by the fol-
lowing pseudo-code:
this += THUNK_DELTA
if (THUNK_VCALL_OFFSET)
this += (*((ptrdiff_t **) this))[THUNK_VCALL_OFFSET]
Finally, the thunk should jump to the location given by DECL_INITIAL; this
will always be an expression for the address of a function.
DECL_NON_THUNK_FUNCTION_P
This predicate holds if the function is not a thunk function.
GLOBAL_INIT_PRIORITY
If either DECL_GLOBAL_CTOR_P or DECL_GLOBAL_DTOR_P holds, then this gives
the initialization priority for the function. The linker will arrange that all
functions for which DECL_GLOBAL_CTOR_P holds are run in increasing order of
priority before main is called. When the program exits, all functions for which
DECL_GLOBAL_DTOR_P holds are run in the reverse order.
TYPE_RAISES_EXCEPTIONS
This macro returns the list of exceptions that a (member-)function can raise.
The returned list, if non NULL, is comprised of nodes whose TREE_VALUE repre-
sents a type.
TYPE_NOTHROW_P
This predicate holds when the exception-specification of its arguments is of the
form ‘()’.
DECL_ARRAY_DELETE_OPERATOR_P
This predicate holds if the function an overloaded operator delete[].
various macros that can be used to obtain information about them. There are a few macros
that can be used with all statements:
STMT_IS_FULL_EXPR_P
In C++, statements normally constitute “full expressions”; temporaries created
during a statement are destroyed when the statement is complete. However,
G++ sometimes represents expressions by statements; these statements will not
have STMT_IS_FULL_EXPR_P set. Temporaries created during such statements
should be destroyed when the innermost enclosing statement with STMT_IS_
FULL_EXPR_P set is exited.
Here is the list of the various statement nodes, and the macros used to access them.
This documentation describes the use of these nodes in non-template functions (including
instantiations of template functions). In template functions, the same nodes are used, but
sometimes in slightly different ways.
Many of the statements have substatements. For example, a while loop has a body,
which is itself a statement. If the substatement is NULL_TREE, it is considered equivalent to
a statement consisting of a single ;, i.e., an expression statement in which the expression has
been omitted. A substatement may in fact be a list of statements, connected via their TREE_
CHAINs. So, you should always process the statement tree by looping over substatements,
like this:
void process_stmt (stmt)
tree stmt;
{
while (stmt)
{
switch (TREE_CODE (stmt))
{
case IF_STMT:
process_stmt (THEN_CLAUSE (stmt));
/* More processing here. */
break;
...
}
In other words, while the then clause of an if statement in C++ can be only one statement
(although that one statement may be a compound statement), the intermediate represen-
tation sometimes uses several statements chained together.
BREAK_STMT
Used to represent a break statement. There are no additional fields.
CLEANUP_STMT
Used to represent an action that should take place upon exit from the enclos-
ing scope. Typically, these actions are calls to destructors for local objects,
but back ends cannot rely on this fact. If these nodes are in fact representing
such destructors, CLEANUP_DECL will be the VAR_DECL destroyed. Otherwise,
224 GNU Compiler Collection (GCC) Internals
The THEN_CLAUSE represents the statement given by the then condition, while
the ELSE_CLAUSE represents the statement given by the else condition.
C++ distinguishes between this and COND_EXPR for handling templates.
SUBOBJECT
In a constructor, these nodes are used to mark the point at which a subobject
of this is fully constructed. If, after this point, an exception is thrown before a
CTOR_STMT with CTOR_END_P set is encountered, the SUBOBJECT_CLEANUP must
be executed. The cleanups must be executed in the reverse order in which they
appear.
SWITCH_STMT
Used to represent a switch statement. The SWITCH_STMT_COND is the expres-
sion on which the switch is occurring. See the documentation for an IF_STMT
for more information on the representation used for the condition. The SWITCH_
STMT_BODY is the body of the switch statement. The SWITCH_STMT_TYPE is the
original type of switch expression as given in the source, before any compiler
conversions. The SWITCH_STMT_SCOPE is the statement scope (used in the C++
front end only).
There are also two boolean flags used with SWITCH_STMT. SWITCH_STMT_ALL_
CASES_P is true if the switch includes a default label or the case label ranges
cover all possible values of the condition expression. SWITCH_STMT_NO_BREAK_P
is true if there are no break statements in the switch.
TRY_BLOCK
Used to represent a try block. The body of the try block is given by TRY_
STMTS. Each of the catch blocks is a HANDLER node. The first handler is given
by TRY_HANDLERS. Subsequent handlers are obtained by following the TREE_
CHAIN link from one handler to the next. The body of the handler is given by
HANDLER_BODY.
If CLEANUP_P holds of the TRY_BLOCK, then the TRY_HANDLERS will not be a
HANDLER node. Instead, it will be an expression that should be executed if
an exception is thrown in the try block. It must rethrow the exception after
executing that code. And, if an exception is thrown while the expression is
executing, terminate must be called.
USING_STMT
Used to represent a using directive. The namespace is given by USING_STMT_
NAMESPACE, which will be a NAMESPACE DECL. This node is needed inside
template functions, to implement using directives during instantiation.
WHILE_STMT
Used to represent a while loop. The WHILE_COND is the termination condition
for the loop. See the documentation for an IF_STMT for more information on
the representation used for the condition.
The WHILE_BODY is the body of the loop.
TYPEID_EXPR
Used to represent a typeid expression.
NEW_EXPR
VEC_NEW_EXPR
Used to represent a call to new and new[] respectively.
DELETE_EXPR
VEC_DELETE_EXPR
Used to represent a call to delete and delete[] respectively.
MEMBER_REF
Represents a reference to a member of a class.
THROW_EXPR
Represents an instance of throw in the program. Operand 0, which is the
expression to throw, may be NULL_TREE.
AGGR_INIT_EXPR
An AGGR_INIT_EXPR represents the initialization as the return value of a func-
tion call, or as the result of a constructor. An AGGR_INIT_EXPR will only appear
as a full-expression, or as the second operand of a TARGET_EXPR. AGGR_INIT_
EXPRs have a representation similar to that of CALL_EXPRs. You can use the
AGGR_INIT_EXPR_FN and AGGR_INIT_EXPR_ARG macros to access the function
to call and the arguments to pass.
If AGGR_INIT_VIA_CTOR_P holds of the AGGR_INIT_EXPR, then the initialization
is via a constructor call. The address of the AGGR_INIT_EXPR_SLOT operand,
which is always a VAR_DECL, is taken, and this value replaces the first argument
in the argument list.
In either case, the expression is void.
227
12 GIMPLE
12.1.2 gimple_statement_with_ops
This tuple is actually split in two: gimple_statement_with_ops_base and gimple_
statement_with_ops. This is needed to accommodate the way the operand vector is
allocated. The operand vector is defined to be an array of 1 element. So, to allocate a
dynamic number of operands, the memory allocator (gimple_alloc) simply allocates
enough memory to hold the structure itself plus N - 1 operands which run “off the end” of
the structure. For example, to allocate space for a tuple with 3 operands, gimple_alloc
reserves sizeof (struct gimple_statement_with_ops) + 2 * sizeof (tree) bytes.
On the other hand, several fields in this tuple need to be shared with the
gimple_statement_with_memory_ops tuple. So, these common fields are placed in
gimple_statement_with_ops_base which is then inherited from the other two tuples.
gsbase 256
def_ops 64
use_ops 64
op num_ops * 64
Total 48 + 8 * num_ops bytes
size
• gsbase Inherited from struct gimple.
• def_ops Array of pointers into the operand array indicating all the slots that contain
a variable written-to by the statement. This array is also used for immediate use
chaining. Note that it would be possible to not rely on this array, but the changes
required to implement this are pretty invasive.
• use_ops Similar to def_ops but for variables read by the statement.
• op Array of trees with num_ops slots.
12.1.3 gimple_statement_with_memory_ops
This tuple is essentially identical to gimple_statement_with_ops, except that it contains
4 additional fields to hold vectors related memory stores and loads. Similar to the pre-
230 GNU Compiler Collection (GCC) Internals
vious case, the structure is split in two to accommodate for the operand vector (gimple_
statement_with_memory_ops_base and gimple_statement_with_memory_ops).
Field Size (bits)
gsbase 256
def_ops 64
use_ops 64
vdef_ops 64
vuse_ops 64
stores 64
loads 64
op num_ops * 64
Total size 80 + 8 * num_ops bytes
• vdef_ops Similar to def_ops but for VDEF operators. There is one entry per memory
symbol written by this statement. This is used to maintain the memory SSA use-def
and def-def chains.
• vuse_ops Similar to use_ops but for VUSE operators. There is one entry per memory
symbol loaded by this statement. This is used to maintain the memory SSA use-def
chains.
• stores Bitset with all the UIDs for the symbols written-to by the statement. This is
different than vdef_ops in that all the affected symbols are mentioned in this set. If
memory partitioning is enabled, the vdef_ops vector will refer to memory partitions.
Furthermore, no SSA information is stored in this set.
• loads Similar to stores, but for memory loads. (Note that there is some amount
of redundancy here, it should be possible to reduce memory utilization further by
removing these sets).
All the other tuples are defined in terms of these three basic ones. Each tuple will add
some fields.
| | | code: GIMPLE_DEBUG
| | |
| | + ggoto
| | | code: GIMPLE_GOTO
| | |
| | + glabel
| | | code: GIMPLE_LABEL
| | |
| | + gswitch
| | code: GIMPLE_SWITCH
| |
| + gimple_statement_with_memory_ops_base
| | layout: GSS_WITH_MEM_OPS_BASE
| |
| + gimple_statement_with_memory_ops
| | | layout: GSS_WITH_MEM_OPS
| | |
| | + gassign
| | | code GIMPLE_ASSIGN
| | |
| | + greturn
| | code GIMPLE_RETURN
| |
| + gcall
| | layout: GSS_CALL, code: GIMPLE_CALL
| |
| + gasm
| | layout: GSS_ASM, code: GIMPLE_ASM
| |
| + gtransaction
| layout: GSS_TRANSACTION, code: GIMPLE_TRANSACTION
|
+ gimple_statement_omp
| | layout: GSS_OMP. Used for code GIMPLE_OMP_SECTION
| |
| + gomp_critical
| | layout: GSS_OMP_CRITICAL, code: GIMPLE_OMP_CRITICAL
| |
| + gomp_for
| | layout: GSS_OMP_FOR, code: GIMPLE_OMP_FOR
| |
| + gomp_parallel_layout
| | | layout: GSS_OMP_PARALLEL_LAYOUT
| | |
| | + gimple_statement_omp_taskreg
| | | |
| | | + gomp_parallel
| | | | code: GIMPLE_OMP_PARALLEL
| | | |
| | | + gomp_task
| | | code: GIMPLE_OMP_TASK
| | |
| | + gimple_statement_omp_target
| | code: GIMPLE_OMP_TARGET
| |
| + gomp_sections
| | layout: GSS_OMP_SECTIONS, code: GIMPLE_OMP_SECTIONS
| |
232 GNU Compiler Collection (GCC) Internals
| + gimple_statement_omp_single_layout
| | layout: GSS_OMP_SINGLE_LAYOUT
| |
| + gomp_single
| | code: GIMPLE_OMP_SINGLE
| |
| + gomp_teams
| code: GIMPLE_OMP_TEAMS
|
+ gbind
| layout: GSS_BIND, code: GIMPLE_BIND
|
+ gcatch
| layout: GSS_CATCH, code: GIMPLE_CATCH
|
+ geh_filter
| layout: GSS_EH_FILTER, code: GIMPLE_EH_FILTER
|
+ geh_else
| layout: GSS_EH_ELSE, code: GIMPLE_EH_ELSE
|
+ geh_mnt
| layout: GSS_EH_MNT, code: GIMPLE_EH_MUST_NOT_THROW
|
+ gphi
| layout: GSS_PHI, code: GIMPLE_PHI
|
+ gimple_statement_eh_ctrl
| | layout: GSS_EH_CTRL
| |
| + gresx
| | code: GIMPLE_RESX
| |
| + geh_dispatch
| code: GIMPLE_EH_DISPATCH
|
+ gtry
| layout: GSS_TRY, code: GIMPLE_TRY
|
+ gimple_statement_wce
| layout: GSS_WCE, code: GIMPLE_WITH_CLEANUP_EXPR
|
+ gomp_continue
| layout: GSS_OMP_CONTINUE, code: GIMPLE_OMP_CONTINUE
|
+ gomp_atomic_load
| layout: GSS_OMP_ATOMIC_LOAD, code: GIMPLE_OMP_ATOMIC_LOAD
|
+ gimple_statement_omp_atomic_store_layout
| layout: GSS_OMP_ATOMIC_STORE_LAYOUT,
| code: GIMPLE_OMP_ATOMIC_STORE
|
+ gomp_atomic_store
| code: GIMPLE_OMP_ATOMIC_STORE
|
+ gomp_return
code: GIMPLE_OMP_RETURN
Chapter 12: GIMPLE 233
types, the associated handler code is executed. If the handler code falls off the bottom,
execution continues after the original GIMPLE_TRY_CATCH.
3. A GIMPLE_EH_FILTER statement. This has a list of permitted exception types, and
code to handle a match failure. If the thrown exception does not match one of the
allowed types, the associated match failure code is executed. If the thrown exception
does match, it continues unwinding the stack looking for the next handler.
Currently throwing an exception is not directly represented in GIMPLE, since it is im-
plemented by calling a function. At some point in the future we will want to add some way
to express that the call will throw an exception of a known type.
Just before running the optimizers, the compiler lowers the high-level EH constructs
above into a set of ‘goto’s, magic labels, and EH regions. Continuing to unwind at the end
of a cleanup is represented with a GIMPLE_RESX.
12.5 Temporaries
When gimplification encounters a subexpression that is too complex, it creates a new tem-
porary variable to hold the value of the subexpression, and adds a new statement to initial-
ize it before the current statement. These special temporaries are known as ‘expression
temporaries’, and are allocated using get_formal_tmp_var. The compiler tries to always
evaluate identical expressions into the same temporary, to simplify elimination of redundant
calculations.
We can only use expression temporaries when we know that it will not be reevaluated
before its value is used, and that it will not be otherwise modified1 . Other temporaries can
be allocated using get_initialized_tmp_var or create_tmp_var.
Currently, an expression like a = b + 5 is not reduced any further. We tried converting it
to something like
T1 = b + 5;
a = T1;
but this bloated the representation for minimal benefit. However, a variable which must
live in memory cannot appear in an expression; its value is explicitly loaded into a temporary
first. Similarly, storing the value of an expression to a memory variable goes through a
temporary.
12.6 Operands
In general, expressions in GIMPLE consist of an operation and the appropriate number of
simple operands; these operands must either be a GIMPLE rvalue (is_gimple_val), i.e. a
constant or a register variable. More complex operands are factored out into temporaries,
so that
a = b + c + d
becomes
T1 = b + c;
a = T1 + d;
The same rule holds for arguments to a GIMPLE_CALL.
1
These restrictions are derived from those in Morgan 4.8.
Chapter 12: GIMPLE 235
The target of an assignment is usually a variable, but can also be a MEM_REF or a compound
lvalue as described below.
12.8.2 GIMPLE_ASSIGN
gassign *gimple_build_assign (tree lhs, tree rhs) [GIMPLE function]
Build a GIMPLE_ASSIGN statement. The left-hand side is an lvalue passed in lhs. The
right-hand side can be either a unary or binary tree expression. The expression tree
rhs will be flattened and its operands assigned to the corresponding operand slots in
the new statement. This function is useful when you already have a tree expression
that you want to convert into a tuple. However, try to avoid building expression
trees for the sole purpose of calling this function. If you already have the operands
in separate trees, it is better to use gimple_build_assign with enum tree_code
argument and separate arguments for each operand.
DST/SRC are the destination and source respectively. You can pass ungimplified trees in
DST or SRC, in which case they will be converted to a gimple operand if necessary.
This function returns the newly created GIMPLE_ASSIGN tuple.
12.8.3 GIMPLE_BIND
gbind *gimple_build_bind (tree vars, gimple_seq [GIMPLE function]
body)
Build a GIMPLE_BIND statement with a list of variables in VARS and a body of state-
ments in sequence BODY.
12.8.4 GIMPLE_CALL
gcall *gimple_build_call (tree fn, unsigned nargs, [GIMPLE function]
...)
Build a GIMPLE_CALL statement to function FN. The argument FN must be either
a FUNCTION_DECL or a gimple call address as determined by is_gimple_call_addr.
NARGS are the number of arguments. The rest of the arguments follow the argument
NARGS, and must be trees that are valid as rvalues in gimple (i.e., each operand is
validated with is_gimple_operand).
12.8.5 GIMPLE_CATCH
gcatch *gimple_build_catch (tree types, gimple_seq [GIMPLE function]
handler)
Build a GIMPLE_CATCH statement. TYPES are the tree types this catch handles.
HANDLER is a sequence of statements with the code for the handler.
12.8.6 GIMPLE_COND
gcond *gimple_build_cond ( enum tree_code [GIMPLE function]
pred_code, tree lhs, tree rhs, tree t_label, tree f_label)
Build a GIMPLE_COND statement. A GIMPLE_COND statement compares LHS and RHS
and if the condition in PRED_CODE is true, jump to the label in t_label, otherwise
jump to the label in f_label. PRED_CODE are relational operator tree codes like
EQ_EXPR, LT_EXPR, LE_EXPR, NE_EXPR, etc.
12.8.7 GIMPLE_DEBUG
gdebug *gimple_build_debug_bind (tree var, tree [GIMPLE function]
value, gimple stmt)
Build a GIMPLE_DEBUG statement with GIMPLE_DEBUG_BIND subcode. The effect of
this statement is to tell debug information generation machinery that the value of
user variable var is given by value at that point, and to remain with that value until
var runs out of scope, a dynamically-subsequent debug bind statement overrides the
binding, or conflicting values reach a control flow merge point. Even if components of
the value expression change afterwards, the variable is supposed to retain the same
value, though not necessarily the same location.
It is expected that var be most often a tree for automatic user variables (VAR_DECL
or PARM_DECL) that satisfy the requirements for gimple registers, but it may also be
a tree for a scalarized component of a user variable (ARRAY_REF, COMPONENT_REF), or
a debug temporary (DEBUG_EXPR_DECL).
As for value, it can be an arbitrary tree expression, but it is recommended that it be
in a suitable form for a gimple assignment RHS. It is not expected that user variables
that could appear as var ever appear in value, because in the latter we’d have their
SSA_NAMEs instead, but even if they were not in SSA form, user variables appearing
in value are to be regarded as part of the executable code space, whereas those in
var are to be regarded as part of the source code space. There is no way to refer to
the value bound to a user variable within a value expression.
248 GNU Compiler Collection (GCC) Internals
12.8.8 GIMPLE_EH_FILTER
geh_filter *gimple_build_eh_filter (tree types, [GIMPLE function]
gimple_seq failure)
Build a GIMPLE_EH_FILTER statement. TYPES are the filter’s types. FAILURE is a
sequence with the filter’s failure action.
tree gimple_eh_filter_types (gimple g) [GIMPLE function]
Return the types handled by GIMPLE_EH_FILTER statement G.
tree * gimple_eh_filter_types_ptr (gimple g) [GIMPLE function]
Return a pointer to the types handled by GIMPLE_EH_FILTER statement G.
gimple_seq gimple_eh_filter_failure (gimple g) [GIMPLE function]
Return the sequence of statement to execute when GIMPLE_EH_FILTER statement fails.
void gimple_eh_filter_set_types (geh_filter *g, [GIMPLE function]
tree types)
Set TYPES to be the set of types handled by GIMPLE_EH_FILTER G.
void gimple_eh_filter_set_failure (geh_filter *g, [GIMPLE function]
gimple_seq failure)
Set FAILURE to be the sequence of statements to execute on failure for GIMPLE_EH_
FILTER G.
tree gimple_eh_must_not_throw_fndecl ( geh_mnt [GIMPLE function]
*eh_mnt_stmt)
Get the function decl to be called by the MUST NOT THROW region.
void gimple_eh_must_not_throw_set_fndecl ( geh_mnt [GIMPLE function]
*eh_mnt_stmt, tree decl)
Set the function decl to be called by GS to DECL.
12.8.9 GIMPLE_LABEL
glabel *gimple_build_label (tree label) [GIMPLE function]
Build a GIMPLE_LABEL statement with corresponding to the tree label, LABEL.
tree gimple_label_label (const glabel *g) [GIMPLE function]
Return the LABEL_DECL node used by GIMPLE_LABEL statement G.
void gimple_label_set_label (glabel *g, tree label) [GIMPLE function]
Set LABEL to be the LABEL_DECL node used by GIMPLE_LABEL statement G.
12.8.10 GIMPLE_GOTO
ggoto *gimple_build_goto (tree dest) [GIMPLE function]
Build a GIMPLE_GOTO statement to label DEST.
tree gimple_goto_dest (gimple g) [GIMPLE function]
Return the destination of the unconditional jump G.
void gimple_goto_set_dest (ggoto *g, tree dest) [GIMPLE function]
Set DEST to be the destination of the unconditional jump G.
250 GNU Compiler Collection (GCC) Internals
12.8.11 GIMPLE_NOP
gimple gimple_build_nop (void) [GIMPLE function]
Build a GIMPLE_NOP statement.
bool gimple_nop_p (gimple g) [GIMPLE function]
Returns TRUE if statement G is a GIMPLE_NOP.
12.8.12 GIMPLE_OMP_ATOMIC_LOAD
gomp_atomic_load *gimple_build_omp_atomic_load ( [GIMPLE function]
tree lhs, tree rhs)
Build a GIMPLE_OMP_ATOMIC_LOAD statement. LHS is the left-hand side of the assign-
ment. RHS is the right-hand side of the assignment.
void gimple_omp_atomic_load_set_lhs ( [GIMPLE function]
gomp_atomic_load *g, tree lhs)
Set the LHS of an atomic load.
tree gimple_omp_atomic_load_lhs ( const [GIMPLE function]
gomp_atomic_load *g)
Get the LHS of an atomic load.
void gimple_omp_atomic_load_set_rhs ( [GIMPLE function]
gomp_atomic_load *g, tree rhs)
Set the RHS of an atomic set.
tree gimple_omp_atomic_load_rhs ( const [GIMPLE function]
gomp_atomic_load *g)
Get the RHS of an atomic set.
12.8.13 GIMPLE_OMP_ATOMIC_STORE
gomp_atomic_store *gimple_build_omp_atomic_store ( [GIMPLE function]
tree val)
Build a GIMPLE_OMP_ATOMIC_STORE statement. VAL is the value to be stored.
void gimple_omp_atomic_store_set_val ( [GIMPLE function]
gomp_atomic_store *g, tree val)
Set the value being stored in an atomic store.
tree gimple_omp_atomic_store_val ( const [GIMPLE function]
gomp_atomic_store *g)
Return the value being stored in an atomic store.
12.8.14 GIMPLE_OMP_CONTINUE
gomp_continue *gimple_build_omp_continue ( tree [GIMPLE function]
control_def, tree control_use)
Build a GIMPLE_OMP_CONTINUE statement. CONTROL_DEF is the definition of the con-
trol variable. CONTROL_USE is the use of the control variable.
Chapter 12: GIMPLE 251
12.8.15 GIMPLE_OMP_CRITICAL
gomp_critical *gimple_build_omp_critical ( [GIMPLE function]
gimple_seq body, tree name)
Build a GIMPLE_OMP_CRITICAL statement. BODY is the sequence of statements for
which only one thread can execute. NAME is an optional identifier for this critical
block.
tree gimple_omp_critical_name ( const gomp_critical [GIMPLE function]
*g)
Return the name associated with OMP_CRITICAL statement G.
tree * gimple_omp_critical_name_ptr ( gomp_critical [GIMPLE function]
*g)
Return a pointer to the name associated with OMP critical statement G.
void gimple_omp_critical_set_name ( gomp_critical [GIMPLE function]
*g, tree name)
Set NAME to be the name associated with OMP critical statement G.
12.8.16 GIMPLE_OMP_FOR
gomp_for *gimple_build_omp_for (gimple_seq body, [GIMPLE function]
tree clauses, tree index, tree initial, tree final, tree
incr, gimple_seq pre_body, enum tree_code omp_for_cond)
Build a GIMPLE_OMP_FOR statement. BODY is sequence of statements inside the for
loop. CLAUSES, are any of the loop construct’s clauses. PRE_BODY is the sequence of
252 GNU Compiler Collection (GCC) Internals
statements that are loop invariant. INDEX is the index variable. INITIAL is the initial
value of INDEX. FINAL is final value of INDEX. OMP FOR COND is the predicate
used to compare INDEX and FINAL. INCR is the increment expression.
12.8.17 GIMPLE_OMP_MASTER
gimple gimple_build_omp_master (gimple_seq body) [GIMPLE function]
Build a GIMPLE_OMP_MASTER statement. BODY is the sequence of statements to be
executed by just the master.
12.8.18 GIMPLE_OMP_ORDERED
gimple gimple_build_omp_ordered (gimple_seq body) [GIMPLE function]
Build a GIMPLE_OMP_ORDERED statement.
BODY is the sequence of statements inside a loop that will executed in sequence.
12.8.19 GIMPLE_OMP_PARALLEL
gomp_parallel *gimple_build_omp_parallel ( [GIMPLE function]
gimple_seq body, tree clauses, tree child_fn, tree data_arg)
Build a GIMPLE_OMP_PARALLEL statement.
BODY is sequence of statements which are executed in parallel. CLAUSES, are the OMP
parallel construct’s clauses. CHILD_FN is the function created for the parallel threads
to execute. DATA_ARG are the shared data argument(s).
bool gimple_omp_parallel_combined_p (gimple g) [GIMPLE function]
Return true if OMP parallel statement G has the GF_OMP_PARALLEL_COMBINED flag set.
void gimple_omp_parallel_set_combined_p (gimple g) [GIMPLE function]
Set the GF_OMP_PARALLEL_COMBINED field in OMP parallel statement G.
gimple_seq gimple_omp_body (gimple g) [GIMPLE function]
Return the body for the OMP statement G.
void gimple_omp_set_body (gimple g, gimple_seq [GIMPLE function]
body)
Set BODY to be the body for the OMP statement G.
tree gimple_omp_parallel_clauses (gimple g) [GIMPLE function]
Return the clauses associated with OMP_PARALLEL G.
254 GNU Compiler Collection (GCC) Internals
12.8.20 GIMPLE_OMP_RETURN
gimple gimple_build_omp_return (bool wait_p) [GIMPLE function]
Build a GIMPLE_OMP_RETURN statement. WAIT_P is true if this is a non-waiting return.
12.8.21 GIMPLE_OMP_SECTION
gimple gimple_build_omp_section (gimple_seq body) [GIMPLE function]
Build a GIMPLE_OMP_SECTION statement for a sections statement.
BODY is the sequence of statements in the section.
Chapter 12: GIMPLE 255
12.8.22 GIMPLE_OMP_SECTIONS
gomp_sections *gimple_build_omp_sections ( [GIMPLE function]
gimple_seq body, tree clauses)
Build a GIMPLE_OMP_SECTIONS statement. BODY is a sequence of section statements.
CLAUSES are any of the OMP sections construct’s clauses: private, firstprivate, lastpri-
vate, reduction, and nowait.
gimple gimple_build_omp_sections_switch (void) [GIMPLE function]
Build a GIMPLE_OMP_SECTIONS_SWITCH statement.
tree gimple_omp_sections_control (gimple g) [GIMPLE function]
Return the control variable associated with the GIMPLE_OMP_SECTIONS in G.
tree * gimple_omp_sections_control_ptr (gimple g) [GIMPLE function]
Return a pointer to the clauses associated with the GIMPLE_OMP_SECTIONS in G.
void gimple_omp_sections_set_control (gimple g, [GIMPLE function]
tree control)
Set CONTROL to be the set of clauses associated with the GIMPLE_OMP_SECTIONS in G.
tree gimple_omp_sections_clauses (gimple g) [GIMPLE function]
Return the clauses associated with OMP_SECTIONS G.
tree * gimple_omp_sections_clauses_ptr (gimple g) [GIMPLE function]
Return a pointer to the clauses associated with OMP_SECTIONS G.
void gimple_omp_sections_set_clauses (gimple g, [GIMPLE function]
tree clauses)
Set CLAUSES to be the set of clauses associated with OMP_SECTIONS G.
12.8.23 GIMPLE_OMP_SINGLE
gomp_single *gimple_build_omp_single ( gimple_seq [GIMPLE function]
body, tree clauses)
Build a GIMPLE_OMP_SINGLE statement. BODY is the sequence of statements that will
be executed once. CLAUSES are any of the OMP single construct’s clauses: private,
firstprivate, copyprivate, nowait.
tree gimple_omp_single_clauses (gimple g) [GIMPLE function]
Return the clauses associated with OMP_SINGLE G.
tree * gimple_omp_single_clauses_ptr (gimple g) [GIMPLE function]
Return a pointer to the clauses associated with OMP_SINGLE G.
void gimple_omp_single_set_clauses ( gomp_single [GIMPLE function]
*g, tree clauses)
Set CLAUSES to be the clauses associated with OMP_SINGLE G.
256 GNU Compiler Collection (GCC) Internals
12.8.24 GIMPLE_OMP_STRUCTURED_BLOCK
Like the GENERIC equivalent OMP_STRUCTURED_BLOCK, this GIMPLE statement does not
correspond directly to an OpenMP directive, and exists only to permit error checking of
transfers of control in/out of structured block sequences (the diagnose_omp_blocks pass in
omp-low.cc). All GIMPLE_OMP_STRUCTURED_BLOCK nodes are eliminated during OpenMP
lowering.
12.8.25 GIMPLE_PHI
unsigned gimple_phi_capacity (gimple g) [GIMPLE function]
Return the maximum number of arguments supported by GIMPLE_PHI G.
12.8.26 GIMPLE_RESX
gresx *gimple_build_resx (int region) [GIMPLE function]
Build a GIMPLE_RESX statement which is a statement. This statement is a placeholder
for Unwind Resume before we know if a function call or a branch is needed. REGION
is the exception region from which control is flowing.
12.8.27 GIMPLE_RETURN
greturn *gimple_build_return (tree retval) [GIMPLE function]
Build a GIMPLE_RETURN statement whose return value is retval.
tree gimple_return_retval (const greturn *g) [GIMPLE function]
Return the return value for GIMPLE_RETURN G.
void gimple_return_set_retval (greturn *g, tree [GIMPLE function]
retval)
Set RETVAL to be the return value for GIMPLE_RETURN G.
12.8.28 GIMPLE_SWITCH
gswitch *gimple_build_switch (tree index, tree [GIMPLE function]
default_label, vec<tree> *args)
Build a GIMPLE_SWITCH statement. INDEX is the index variable to switch on, and
DEFAULT_LABEL represents the default label. ARGS is a vector of CASE_LABEL_EXPR
trees that contain the non-default case labels. Each label is a tree of code CASE_
LABEL_EXPR.
unsigned gimple_switch_num_labels ( const gswitch [GIMPLE function]
*g)
Return the number of labels associated with the switch statement G.
void gimple_switch_set_num_labels (gswitch *g, [GIMPLE function]
unsigned nlabels)
Set NLABELS to be the number of labels for the switch statement G.
tree gimple_switch_index (const gswitch *g) [GIMPLE function]
Return the index variable used by the switch statement G.
void gimple_switch_set_index (gswitch *g, tree [GIMPLE function]
index)
Set INDEX to be the index variable for switch statement G.
tree gimple_switch_label (const gswitch *g, [GIMPLE function]
unsigned index)
Return the label numbered INDEX. The default label is 0, followed by any labels in a
switch statement.
void gimple_switch_set_label (gswitch *g, unsigned [GIMPLE function]
index, tree label)
Set the label number INDEX to LABEL. 0 is always the default label.
tree gimple_switch_default_label ( const gswitch [GIMPLE function]
*g)
Return the default label for a switch statement.
void gimple_switch_set_default_label (gswitch *g, [GIMPLE function]
tree label)
Set the default label for a switch statement.
258 GNU Compiler Collection (GCC) Internals
12.8.29 GIMPLE_TRY
gtry *gimple_build_try (gimple_seq eval, gimple_seq [GIMPLE function]
cleanup, unsigned int kind)
Build a GIMPLE_TRY statement. EVAL is a sequence with the expression to evaluate.
CLEANUP is a sequence of statements to run at clean-up time. KIND is the enumeration
value GIMPLE_TRY_CATCH if this statement denotes a try/catch construct or GIMPLE_
TRY_FINALLY if this statement denotes a try/finally construct.
enum gimple_try_flags gimple_try_kind (gimple g) [GIMPLE function]
Return the kind of try block represented by GIMPLE_TRY G. This is either GIMPLE_
TRY_CATCH or GIMPLE_TRY_FINALLY.
bool gimple_try_catch_is_cleanup (gimple g) [GIMPLE function]
Return the GIMPLE_TRY_CATCH_IS_CLEANUP flag.
gimple_seq gimple_try_eval (gimple g) [GIMPLE function]
Return the sequence of statements used as the body for GIMPLE_TRY G.
gimple_seq gimple_try_cleanup (gimple g) [GIMPLE function]
Return the sequence of statements used as the cleanup body for GIMPLE_TRY G.
void gimple_try_set_catch_is_cleanup (gimple g, [GIMPLE function]
bool catch_is_cleanup)
Set the GIMPLE_TRY_CATCH_IS_CLEANUP flag.
void gimple_try_set_eval (gtry *g, gimple_seq eval) [GIMPLE function]
Set EVAL to be the sequence of statements to use as the body for GIMPLE_TRY G.
void gimple_try_set_cleanup (gtry *g, gimple_seq [GIMPLE function]
cleanup)
Set CLEANUP to be the sequence of statements to use as the cleanup body for GIMPLE_
TRY G.
12.8.30 GIMPLE_WITH_CLEANUP_EXPR
gimple gimple_build_wce (gimple_seq cleanup) [GIMPLE function]
Build a GIMPLE_WITH_CLEANUP_EXPR statement. CLEANUP is the clean-up expression.
gimple_seq gimple_wce_cleanup (gimple g) [GIMPLE function]
Return the cleanup sequence for cleanup statement G.
void gimple_wce_set_cleanup (gimple g, gimple_seq [GIMPLE function]
cleanup)
Set CLEANUP to be the cleanup sequence for G.
bool gimple_wce_cleanup_eh_only (gimple g) [GIMPLE function]
Return the CLEANUP_EH_ONLY flag for a WCE tuple.
void gimple_wce_set_cleanup_eh_only (gimple g, bool [GIMPLE function]
eh_only_p)
Set the CLEANUP_EH_ONLY flag for a WCE tuple.
Chapter 12: GIMPLE 259
If your new statement requires accessors for any members or operands it may have, put
simple inline accessors in gimple.h and any non-trivial accessors in gimple.cc with a
corresponding prototype in gimple.h.
You should add the new statement subclass to the class hierarchy diagram in
gimple.texi.
13.1 Annotations
The optimizers need to associate attributes with variables during the optimization process.
For instance, we need to know whether a variable has aliases. All these attributes are stored
in data structures called annotations which are then linked to the field ann in struct tree_
common.
new value to the operand, the operand is considered a definition (e.g., the operand at the
LHS of an assignment).
Virtual and real operands also have very different data flow properties. Real operands
are unambiguous references to the full object that they represent. For instance, given
{
int a, b;
a = b
}
Since a and b are non-aliased locals, the statement a = b will have one real definition and
one real use because variable a is completely modified with the contents of variable b. Real
definition are also known as killing definitions. Similarly, the use of b reads all its bits.
In contrast, virtual operands are used with variables that can have a partial or ambiguous
reference. This includes structures, arrays, globals, and aliased variables. In these cases, we
have two types of definitions. For globals, structures, and arrays, we can determine from
a statement whether a variable of these types has a killing definition. If the variable does,
then the statement is marked as having a must definition of that variable. However, if a
statement is only defining a part of the variable (i.e. a field in a structure), or if we know
that a statement might define the variable but we cannot say for sure, then we mark that
statement as having a may definition. For instance, given
{
int a, b, *p;
if (...)
p = &a;
else
p = &b;
*p = 5;
return *p;
}
if (...)
p = &a;
else
p = &b;
# a = VDEF <a>
# b = VDEF <b>
*p = 5;
# VUSE <a>
# VUSE <b>
return *p;
}
Chapter 13: Analysis and Optimization of GIMPLE tuples 267
Notice that VDEF operands have two copies of the referenced variable. This indicates that
this is not a killing definition of that variable. In this case we refer to it as a may definition
or aliased store. The presence of the second copy of the variable in the VDEF operand will
become important when the function is converted into SSA form. This will be used to link
all the non-killing definitions to prevent optimizations from making incorrect assumptions
about them.
Operands are updated as soon as the statement is finished via a call to update_stmt.
If statement elements are changed via SET_USE or SET_DEF, then no further action is re-
quired (i.e., those macros take care of updating the statement). If changes are made by
manipulating the statement’s tree directly, then a call must be made to update_stmt when
complete. Calling one of the bsi_insert routines or bsi_replace performs an implicit call
to update_stmt.
If you wish to iterate over some or all operands, use the FOR_EACH_SSA_{USE,DEF,TREE}_
OPERAND iterator. For example, to print all the operands for a statement:
void
print_ops (tree stmt)
{
ssa_op_iter;
tree var;
def_operand_p FOR_EACH_SSA_DEF_OPERAND
tree FOR_EACH_SSA_TREE_OPERAND
2. You need to declare a variable of the type you are interested in, and an ssa op iter
structure which serves as the loop controlling variable.
3. Determine which operands you wish to use, and specify the flags of those you are
interested in. They are documented in tree-ssa-operands.h:
#define SSA_OP_USE 0x01 /* Real USE operands. */
#define SSA_OP_DEF 0x02 /* Real DEF operands. */
#define SSA_OP_VUSE 0x04 /* VUSE operands. */
#define SSA_OP_VDEF 0x08 /* VDEF operands. */
So if you want to look at the use pointers for all the USE and VUSE operands, you would
do something like:
use_operand_p use_p;
ssa_op_iter iter;
version number and the statement that created the SSA_NAME. Only definitions and virtual
definitions may create new SSA_NAME nodes.
Sometimes, flow of control makes it impossible to determine the most recent version of a
variable. In these cases, the compiler inserts an artificial definition for that variable called
PHI function or PHI node. This new definition merges all the incoming versions of the
variable to create a new name for it. For instance,
if (...)
a_1 = 5;
else if (...)
a_2 = 2;
else
a_3 = 13;
Suppose that we insert new names x_10 and x_11 (lines 4 and 8).
1 L0:
2 x_1 = PHI (0, x_5)
3 if (x_1 < 10)
4 x_10 = ...
5 if (x_1 > 7)
6 y_2 = 0
7 else
8 x_11 = ...
9 y_3 = x_1 + x_7
10 endif
11 x_5 = x_1 + 1
12 goto L0;
13 endif
We want to replace all the uses of x_1 with the new definitions of x_10 and x_11. Note
that the only uses that should be replaced are those at lines 5, 9 and 11. Also, the use of x_7
at line 9 should not be replaced (this is why we cannot just mark symbol x for renaming).
Additionally, we may need to insert a PHI node at line 11 because that is a merge point
for x_10 and x_11. So the use of x_1 at line 11 will be replaced with the new PHI node.
The insertion of PHI nodes is optional. They are not strictly necessary to preserve the
SSA form, and depending on what the caller inserted, they may not even be useful for the
optimizers.
Updating the SSA form is a two step process. First, the pass has to identify which
names need to be updated and/or which symbols need to be renamed into SSA form for
the first time. When new names are introduced to replace existing names in the program,
the mapping between the old and the new names are registered by calling register_new_
name_mapping (note that if your pass creates new code by duplicating basic blocks, the call
to tree_duplicate_bb will set up the necessary mappings automatically).
After the replacement mappings have been registered and new symbols marked for re-
naming, a call to update_ssa makes the registered changes. This can be done with an
explicit call or by creating TODO flags in the tree_opt_pass structure for your pass. There
are several TODO flags that control the behavior of update_ssa:
• TODO_update_ssa. Update the SSA form inserting PHI nodes for newly exposed sym-
bols and virtual names marked for updating. When updating real names, only insert
PHI nodes for a real name O_j in blocks reached by all the new and old definitions for
O_j. If the iterated dominance frontier for O_j is not pruned, we may end up inserting
PHI nodes in blocks that have one or more edges with no incoming definition for O_j.
This would lead to uninitialized warnings for O_j’s symbol.
Chapter 13: Analysis and Optimization of GIMPLE tuples 273
• TODO_update_ssa_no_phi. Update the SSA form without inserting any new PHI nodes
at all. This is used by passes that have either inserted all the PHI nodes themselves or
passes that need only to patch use-def and def-def chains for virtuals (e.g., DCE).
• TODO_update_ssa_full_phi. Insert PHI nodes everywhere they are needed. No prun-
ing of the IDF is done. This is used by passes that need the PHI nodes for O_j even
if it means that some arguments will come from the default definition of O_j’s symbol
(e.g., pass_linear_transform).
WARNING: If you need to use this flag, chances are that your pass may be doing
something wrong. Inserting PHI nodes for an old name where not all edges carry a
new replacement may lead to silent codegen errors or spurious uninitialized warnings.
• TODO_update_ssa_only_virtuals. Passes that update the SSA form on their own
may want to delegate the updating of virtual names to the generic updater. Since
FUD chains are easier to maintain, this simplifies the work they need to do. NOTE:
If this flag is used, any OLD->NEW mappings for real names are explicitly destroyed
and only the symbols marked for renaming are processed.
alias sets are not allowed to alias. For an example, see the C front-end function c_get_
alias_set.
4. Tree alias-oracle
The tree alias-oracle provides means to disambiguate two memory references and mem-
ory references against statements. The following queries are available:
• refs_may_alias_p
• ref_maybe_used_by_stmt_p
• stmt_may_clobber_ref_p
In addition to those two kind of statement walkers are available walking statements
related to a reference ref. walk_non_aliased_vuses walks over dominating memory
defining statements and calls back if the statement does not clobber ref providing the
non-aliased VUSE. The walk stops at the first clobbering statement or if asked to.
walk_aliased_vdefs walks over dominating memory defining statements and calls
back on each statement clobbering ref providing its aliasing VDEF. The walk stops if
asked to.
14 RTL Representation
The last part of the compiler work is done on a low-level intermediate representation called
Register Transfer Language. In this language, the instructions to be output are described,
pretty much one by one, in an algebraic form that describes what the instruction does.
RTL is inspired by Lisp lists. It has both an internal form, made up of structures that
point at other structures, and a textual form that is used in the machine description and
in printed debugging dumps. The textual form uses nested parentheses to indicate the
pointers in the internal form.
The expression code determines how many operands the expression contains, and what
kinds of objects they are. In RTL, unlike Lisp, you cannot tell by looking at an operand
what kind of object it is. Instead, you must know from its context—from the expression
code of the containing expression. For example, in an expression of code subreg, the first
operand is to be regarded as an expression and the second operand as a polynomial integer.
In an expression of code plus, there are two operands, both of which are to be regarded as
expressions. In a symbol_ref expression, there is one operand, which is to be regarded as
a string.
Expressions are written as parentheses containing the name of the expression type, its
flags and machine mode if any, and then the operands of the expression (separated by
spaces).
Expression code names in the ‘md’ file are written in lowercase, but when they appear in C
code they are written in uppercase. In this manual, they are shown as follows: const_int.
In a few contexts a null pointer is valid where an expression is normally wanted. The
written form of this is (nil).
RTX_BITFIELD_OPS
An RTX code for a bit-field operation. Currently only ZERO_EXTRACT and
SIGN_EXTRACT. These have three inputs and are lvalues (so they can be used
for insertion as well). See Section 14.11 [Bit-Fields], page 311.
RTX_TERNARY
An RTX code for other three input operations. Currently only IF_THEN_ELSE,
VEC_MERGE, SIGN_EXTRACT, ZERO_EXTRACT, and FMA.
RTX_INSN An RTX code for an entire instruction: INSN, JUMP_INSN, and CALL_INSN. See
Section 14.19 [Insns], page 322.
RTX_MATCH
An RTX code for something that matches in insns, such as MATCH_DUP. These
only occur in machine descriptions.
RTX_AUTOINC
An RTX code for an auto-increment addressing mode, such as POST_INC. ‘XEXP
(x, 0)’ gives the auto-modified register.
RTX_EXTRA
All other RTX codes. This category includes the remaining codes used only in
machine descriptions (DEFINE_*, etc.). It also includes all the codes describing
side effects (SET, USE, CLOBBER, etc.) and the non-insns that may appear on
an insn chain, such as NOTE, BARRIER, and CODE_LABEL. SUBREG is also part of
this class.
For each expression code, rtl.def specifies the number of contained objects and their
kinds using a sequence of characters called the format of the expression code. For example,
the format of subreg is ‘ep’.
These are the most commonly used format characters:
e An expression (actually a pointer to an expression).
i An integer.
w A wide integer.
s A string.
E A vector of expressions.
A few other format characters are used occasionally:
u ‘u’ is equivalent to ‘e’ except that it is printed differently in debugging dumps.
It is used for pointers to insns.
n ‘n’ is equivalent to ‘i’ except that it is printed differently in debugging dumps.
It is used for the line number or code number of a note insn.
S ‘S’ indicates a string which is optional. In the RTL objects in core, ‘S’ is
equivalent to ‘s’, but when the object is read, from an ‘md’ file, the string value
of this operand may be omitted. An omitted string is taken to be the null
string.
280 GNU Compiler Collection (GCC) Internals
V ‘V’ indicates a vector which is optional. In the RTL objects in core, ‘V’ is
equivalent to ‘E’, but when the object is read from an ‘md’ file, the vector value
of this operand may be omitted. An omitted vector is effectively the same as a
vector of no elements.
B ‘B’ indicates a pointer to basic block structure.
p A polynomial integer. At present this is used only for SUBREG_BYTE.
0 ‘0’ means a slot whose contents do not fit any normal category. ‘0’ slots are
not printed at all in dumps, and are often used in special ways by small parts
of the compiler.
There are macros to get the number of operands and the format of an expression code:
GET_RTX_LENGTH (code)
Number of operands of an RTX of code code.
GET_RTX_FORMAT (code)
The format of an RTX of code code, as a C string.
Some classes of RTX codes always have the same format. For example, it is safe to assume
that all comparison operations have format ee.
RTX_UNARY
All codes of this class have format e.
RTX_BIN_ARITH
RTX_COMM_ARITH
RTX_COMM_COMPARE
RTX_COMPARE
All codes of these classes have format ee.
RTX_BITFIELD_OPS
RTX_TERNARY
All codes of these classes have format eee.
RTX_INSN All codes of this class have formats that begin with iuueiee. See Section 14.19
[Insns], page 322. Note that not all RTL objects linked onto an insn chain are
of class RTX_INSN.
RTX_CONST_OBJ
RTX_OBJ
RTX_MATCH
RTX_EXTRA
You can make no assumptions about the format of these codes.
SYMBOL_REF_CONSTANT (x)
If ‘CONSTANT_POOL_ADDRESS_P (x)’ is true, this is the constant pool
entry for x. It is null otherwise.
SYMBOL_REF_DATA (x)
A field of opaque type used to store SYMBOL_REF_DECL or SYMBOL_
REF_CONSTANT.
SYMBOL_REF_FLAGS (x)
In a symbol_ref, this is used to communicate various predicates
about the symbol. Some of these are common enough to be com-
puted by common code, some are specific to the target. The com-
mon bits are:
SYMBOL_FLAG_FUNCTION
Set if the symbol refers to a function.
SYMBOL_FLAG_LOCAL
Set if the symbol is local to this “module”. See TARGET_
BINDS_LOCAL_P.
SYMBOL_FLAG_EXTERNAL
Set if this symbol is not defined in this translation
unit. Note that this is not the inverse of SYMBOL_FLAG_
LOCAL.
SYMBOL_FLAG_SMALL
Set if the symbol is located in the small data section.
See TARGET_IN_SMALL_DATA_P.
SYMBOL_REF_TLS_MODEL (x)
This is a multi-bit field accessor that returns the tls_
model to be used for a thread-local storage symbol. It
returns zero for non-thread-local symbols.
SYMBOL_FLAG_HAS_BLOCK_INFO
Set if the symbol has SYMBOL_REF_BLOCK and SYMBOL_
REF_BLOCK_OFFSET fields.
SYMBOL_FLAG_ANCHOR
Set if the symbol is used as a section anchor. “Sec-
tion anchors” are symbols that have a known position
within an object_block and that can be used to ac-
cess nearby members of that block. They are used to
implement -fsection-anchors.
If this flag is set, then SYMBOL_FLAG_HAS_BLOCK_INFO
will be too.
Bits beginning with SYMBOL_FLAG_MACH_DEP are available for the
target’s use.
SYMBOL_REF_BLOCK (x)
If ‘SYMBOL_REF_HAS_BLOCK_INFO_P (x)’, this is the ‘object_block’ structure
to which the symbol belongs, or NULL if it has not been assigned a block.
284 GNU Compiler Collection (GCC) Internals
SYMBOL_REF_BLOCK_OFFSET (x)
If ‘SYMBOL_REF_HAS_BLOCK_INFO_P (x)’, this is the offset of x from the first
object in ‘SYMBOL_REF_BLOCK (x)’. The value is negative if x has not yet been
assigned to a block, or it has not been given an offset within that block.
MEM_KEEP_ALIAS_SET_P (x)
In mem expressions, 1 if we should keep the alias set for this mem unchanged
when we access a component. Set to 1, for example, when we are already in
a non-addressable component of an aggregate. Stored in the jump field and
printed as ‘/j’.
MEM_VOLATILE_P (x)
In mem, asm_operands, and asm_input expressions, nonzero for volatile memory
references. Stored in the volatil field and printed as ‘/v’.
MEM_NOTRAP_P (x)
In mem, nonzero for memory references that will not trap. Stored in the call
field and printed as ‘/c’.
MEM_POINTER (x)
Nonzero in a mem if the memory reference holds a pointer. Stored in the frame_
related field and printed as ‘/f’.
MEM_READONLY_P (x)
Nonzero in a mem, if the memory is statically allocated and read-only.
Read-only in this context means never modified during the lifetime of the pro-
gram, not necessarily in ROM or in write-disabled pages. A common example
of the later is a shared library’s global offset table. This table is initialized by
the runtime loader, so the memory is technically writable, but after control is
transferred from the runtime loader to the application, this memory will never
be subsequently modified.
Stored in the unchanging field and printed as ‘/u’.
PREFETCH_SCHEDULE_BARRIER_P (x)
In a prefetch, indicates that the prefetch is a scheduling barrier. No other
INSNs will be moved over it. Stored in the volatil field and printed as ‘/v’.
REG_FUNCTION_VALUE_P (x)
Nonzero in a reg if it is the place in which this function’s value is going to be
returned. (This happens only in a hard register.) Stored in the return_val
field and printed as ‘/i’.
REG_POINTER (x)
Nonzero in a reg if the register holds a pointer. Stored in the frame_related
field and printed as ‘/f’.
REG_USERVAR_P (x)
In a reg, nonzero if it corresponds to a variable present in the user’s source
code. Zero for temporaries generated internally by the compiler. Stored in the
volatil field and printed as ‘/v’.
The same hard register may be used also for collecting the values of functions
called by this one, but REG_FUNCTION_VALUE_P is zero in this kind of use.
RTL_CONST_CALL_P (x)
In a call_insn indicates that the insn represents a call to a const function.
Stored in the unchanging field and printed as ‘/u’.
286 GNU Compiler Collection (GCC) Internals
RTL_PURE_CALL_P (x)
In a call_insn indicates that the insn represents a call to a pure function.
Stored in the return_val field and printed as ‘/i’.
RTL_CONST_OR_PURE_CALL_P (x)
In a call_insn, true if RTL_CONST_CALL_P or RTL_PURE_CALL_P is true.
RTL_LOOPING_CONST_OR_PURE_CALL_P (x)
In a call_insn indicates that the insn represents a possibly infinite looping
call to a const or pure function. Stored in the call field and printed as ‘/c’.
Only true if one of RTL_CONST_CALL_P or RTL_PURE_CALL_P is true.
RTX_FRAME_RELATED_P (x)
Nonzero in an insn, call_insn, jump_insn, barrier, or set which is part of a
function prologue and sets the stack pointer, sets the frame pointer, or saves a
register. This flag should also be set on an instruction that sets up a temporary
register to use in place of the frame pointer. Stored in the frame_related field
and printed as ‘/f’.
In particular, on RISC targets where there are limits on the sizes of immediate
constants, it is sometimes impossible to reach the register save area directly from
the stack pointer. In that case, a temporary register is used that is near enough
to the register save area, and the Canonical Frame Address, i.e., DWARF2’s
logical frame pointer, register must (temporarily) be changed to be this tem-
porary register. So, the instruction that sets this temporary register must be
marked as RTX_FRAME_RELATED_P.
If the marked instruction is overly complex (defined in terms of what
dwarf2out_frame_debug_expr can handle), you will also have to create a
REG_FRAME_RELATED_EXPR note and attach it to the instruction. This note
should contain a simple expression of the computation performed by this
instruction, i.e., one that dwarf2out_frame_debug_expr can handle.
This flag is required for exception handling support on targets with RTL pro-
logues.
SCHED_GROUP_P (x)
During instruction scheduling, in an insn, call_insn, jump_insn or jump_
table_data, indicates that the previous insn must be scheduled together with
this insn. This is used to ensure that certain groups of instructions will not
be split up by the instruction scheduling pass, for example, use insns before a
call_insn may not be separated from the call_insn. Stored in the in_struct
field and printed as ‘/s’.
SET_IS_RETURN_P (x)
For a set, nonzero if it is for a return. Stored in the jump field and printed as
‘/j’.
SIBLING_CALL_P (x)
For a call_insn, nonzero if the insn is a sibling call. Stored in the jump field
and printed as ‘/j’.
Chapter 14: RTL Representation 287
STRING_POOL_ADDRESS_P (x)
For a symbol_ref expression, nonzero if it addresses this function’s string con-
stant pool. Stored in the frame_related field and printed as ‘/f’.
SUBREG_PROMOTED_UNSIGNED_P (x)
Returns a value greater then zero for a subreg that has SUBREG_PROMOTED_
VAR_P nonzero if the object being referenced is kept zero-extended, zero if it
is kept sign-extended, and less then zero if it is extended some other way via
the ptr_extend instruction. Stored in the unchanging field and volatil field,
printed as ‘/u’ and ‘/v’. This macro may only be used to get the value it
may not be used to change the value. Use SUBREG_PROMOTED_UNSIGNED_SET to
change the value.
SUBREG_PROMOTED_UNSIGNED_SET (x)
Set the unchanging and volatil fields in a subreg to reflect zero, sign, or
other extension. If volatil is zero, then unchanging as nonzero means zero
extension and as zero means sign extension. If volatil is nonzero then some
other type of extension was done via the ptr_extend instruction.
SUBREG_PROMOTED_VAR_P (x)
Nonzero in a subreg if it was made when accessing an object that was promoted
to a wider mode in accord with the PROMOTED_MODE machine description macro
(see Section 18.5 [Storage Layout], page 530). In this case, the mode of the
subreg is the declared mode of the object and the mode of SUBREG_REG is the
mode of the register that holds the object. Promoted variables are always either
sign- or zero-extended to the wider mode on every assignment. Stored in the
in_struct field and printed as ‘/s’.
SYMBOL_REF_USED (x)
In a symbol_ref, indicates that x has been used. This is normally only used
to ensure that x is only declared external once. Stored in the used field.
SYMBOL_REF_WEAK (x)
In a symbol_ref, indicates that x has been declared weak. Stored in the
return_val field and printed as ‘/i’.
SYMBOL_REF_FLAG (x)
In a symbol_ref, this is used as a flag for machine-specific purposes. Stored in
the volatil field and printed as ‘/v’.
Most uses of SYMBOL_REF_FLAG are historic and may be subsumed by SYMBOL_
REF_FLAGS. Certainly use of SYMBOL_REF_FLAGS is mandatory if the target
requires more than one bit of storage.
call In a mem, 1 means that the memory reference will not trap.
In a call, 1 means that this pure or const call may possibly infinite loop.
In an RTL dump, this flag is represented as ‘/c’.
288 GNU Compiler Collection (GCC) Internals
frame_related
In an insn or set expression, 1 means that it is part of a function prologue
and sets the stack pointer, sets the frame pointer, saves a register, or sets up a
temporary register to use in place of the frame pointer.
In reg expressions, 1 means that the register holds a pointer.
In mem expressions, 1 means that the memory reference holds a pointer.
In symbol_ref expressions, 1 means that the reference addresses this function’s
string constant pool.
In an RTL dump, this flag is represented as ‘/f’.
in_struct
In reg expressions, it is 1 if the register has its entire life contained within the
test expression of some loop.
In subreg expressions, 1 means that the subreg is accessing an object that has
had its mode promoted from a wider mode.
In label_ref expressions, 1 means that the referenced label is outside the
innermost loop containing the insn in which the label_ref was found.
In code_label expressions, it is 1 if the label may never be deleted. This is
used for labels which are the target of non-local gotos. Such a label that would
have been deleted is replaced with a note of type NOTE_INSN_DELETED_LABEL.
In an insn during dead-code elimination, 1 means that the insn is dead code.
In an insn or jump_insn during reorg for an insn in the delay slot of a branch,
1 means that this insn is from the target of the branch.
In an insn during instruction scheduling, 1 means that this insn must be sched-
uled as part of a group together with the previous insn.
In an RTL dump, this flag is represented as ‘/s’.
return_val
In reg expressions, 1 means the register contains the value to be returned by
the current function. On machines that pass parameters in registers, the same
register number may be used for parameters as well, but this flag is not set on
such uses.
In symbol_ref expressions, 1 means the referenced symbol is weak.
In call expressions, 1 means the call is pure.
In an RTL dump, this flag is represented as ‘/i’.
jump In a mem expression, 1 means we should keep the alias set for this mem un-
changed when we access a component.
In a set, 1 means it is for a return.
In a call_insn, 1 means it is a sibling call.
In a jump_insn, 1 means it is a crossing jump.
In an RTL dump, this flag is represented as ‘/j’.
unchanging
In reg and mem expressions, 1 means that the value of the expression never
changes.
Chapter 14: RTL Representation 289
BLKmode “Block” mode represents values that are aggregates to which none of the other
modes apply. In RTL, only memory references can have this mode, and only if
they appear in string-move or vector instructions. On machines which have no
such instructions, BLKmode will not appear in RTL.
VOIDmode Void mode means the absence of a mode or an unspecified mode. For example,
RTL expressions of code const_int have mode VOIDmode because they can be
taken to have whatever mode the context requires. In debugging dumps of
RTL, VOIDmode is expressed by the absence of any mode.
QCmode, HCmode, SCmode, DCmode, XCmode, TCmode
These modes stand for a complex number represented as a pair of floating
point values. The floating point values are in QFmode, HFmode, SFmode, DFmode,
XFmode, and TFmode, respectively.
CQImode, CHImode, CSImode, CDImode, CTImode, COImode, CPSImode
These modes stand for a complex number represented as a pair of integer values.
The integer values are in QImode, HImode, SImode, DImode, TImode, OImode,
and PSImode, respectively.
BND32mode BND64mode
These modes stand for bounds for pointer of 32 and 64 bit size respectively.
Mode size is double pointer mode size.
The machine description defines Pmode as a C macro which expands into the machine
mode used for addresses. Normally this is the mode whose size is BITS_PER_WORD, SImode
on 32-bit machines.
The only modes which a machine description must support are QImode, and the modes
corresponding to BITS_PER_WORD, FLOAT_TYPE_SIZE and DOUBLE_TYPE_SIZE. The compiler
will attempt to use DImode for 8-byte structures and unions, but this can be prevented by
overriding the definition of MAX_FIXED_MODE_SIZE. Alternatively, you can have the compiler
use TImode for 16-byte structures and unions. Likewise, you can arrange for the C type
short int to avoid using HImode.
Very few explicit references to machine modes remain in the compiler and these few
references will soon be removed. Instead, the machine modes are divided into mode classes.
These are represented by the enumeration type enum mode_class defined in machmode.h.
The possible mode classes are:
MODE_INT Integer modes. By default these are BImode, QImode, HImode, SImode, DImode,
TImode, and OImode.
MODE_PARTIAL_INT
The “partial integer” modes, PQImode, PHImode, PSImode and PDImode.
MODE_FLOAT
Floating point modes. By default these are QFmode, HFmode, TQFmode, SFmode,
DFmode, XFmode and TFmode.
MODE_DECIMAL_FLOAT
Decimal floating point modes. By default these are SDmode, DDmode and TDmode.
Chapter 14: RTL Representation 293
MODE_FRACT
Signed fractional modes. By default these are QQmode, HQmode, SQmode, DQmode
and TQmode.
MODE_UFRACT
Unsigned fractional modes. By default these are UQQmode, UHQmode, USQmode,
UDQmode and UTQmode.
MODE_ACCUM
Signed accumulator modes. By default these are HAmode, SAmode, DAmode and
TAmode.
MODE_UACCUM
Unsigned accumulator modes. By default these are UHAmode, USAmode, UDAmode
and UTAmode.
MODE_COMPLEX_INT
Complex integer modes. (These are not currently implemented).
MODE_COMPLEX_FLOAT
Complex floating point modes. By default these are QCmode, HCmode, SCmode,
DCmode, XCmode, and TCmode.
MODE_CC Modes representing condition code values. These are CCmode plus any CC_MODE
modes listed in the machine-modes.def. See Section 17.13 [Jump Patterns],
page 472, also see Section 18.15 [Condition Code], page 617.
MODE_POINTER_BOUNDS
Pointer bounds modes. Used to represent values of pointer bounds type. Opera-
tions in these modes may be executed as NOPs depending on hardware features
and environment setup.
MODE_OPAQUE
This is a mode class for modes that don’t want to provide operations other than
register moves, memory moves, loads, stores, and unspecs. They have a size
and precision and that’s all.
MODE_RANDOM
This is a catchall mode class for modes which don’t fit into the above classes.
Currently VOIDmode and BLKmode are in MODE_RANDOM.
machmode.h also defines various wrapper classes that combine a machine_mode with a
static assertion that a particular condition holds. The classes are:
scalar_int_mode
A mode that has class MODE_INT or MODE_PARTIAL_INT.
scalar_float_mode
A mode that has class MODE_FLOAT or MODE_DECIMAL_FLOAT.
scalar_mode
A mode that holds a single numerical value. In practice this means that the
mode is a scalar_int_mode, is a scalar_float_mode, or has class MODE_FRACT,
MODE_UFRACT, MODE_ACCUM, MODE_UACCUM or MODE_POINTER_BOUNDS.
294 GNU Compiler Collection (GCC) Internals
complex_mode
A mode that has class MODE_COMPLEX_INT or MODE_COMPLEX_FLOAT.
fixed_size_mode
A mode whose size is known at compile time.
Named modes use the most constrained of the available wrapper classes, if one exists,
otherwise they use machine_mode. For example, QImode is a scalar_int_mode, SFmode is
a scalar_float_mode and BLKmode is a plain machine_mode. It is possible to refer to any
mode as a raw machine_mode by adding the E_ prefix, where E stands for “enumeration”.
For example, the raw machine_mode names of the modes just mentioned are E_QImode,
E_SFmode and E_BLKmode respectively.
The wrapper classes implicitly convert to machine_mode and to any wrapper class that
represents a more general condition; for example scalar_int_mode and scalar_float_
mode both convert to scalar_mode and all three convert to fixed_size_mode. The classes
act like machine_modes that accept only certain named modes.
machmode.h also defines a template class opt_mode<T> that holds a T or nothing, where
T can be either machine_mode or one of the wrapper classes above. The main operations
on an opt_mode<T> x are as follows:
‘x.exists ()’
Return true if x holds a mode rather than nothing.
‘x.exists (&y)’
Return true if x holds a mode rather than nothing, storing the mode in y if so.
y must be assignment-compatible with T.
‘x.require ()’
Assert that x holds a mode rather than nothing and return that mode.
‘x = y’ Set x to y, where y is a T or implicitly converts to a T.
The default constructor sets an opt_mode<T> to nothing. There is also a constructor that
takes an initial value of type T.
It is possible to use the is-a.h accessors on a machine_mode or machine mode wrapper
x:
‘is_a <T> (x)’
Return true if x meets the conditions for wrapper class T.
‘is_a <T> (x, &y)’
Return true if x meets the conditions for wrapper class T, storing it in y if so.
y must be assignment-compatible with T.
‘as_a <T> (x)’
Assert that x meets the conditions for wrapper class T and return it as a T.
‘dyn_cast <T> (x)’
Return an opt_mode<T> that holds x if x meets the conditions for wrapper class
T and that holds nothing otherwise.
The purpose of these wrapper classes is to give stronger static type checking. For example,
if a function takes a scalar_int_mode, a caller that has a general machine_mode must either
check or assert that the code is indeed a scalar integer first, using one of the functions above.
Chapter 14: RTL Representation 295
The wrapper classes are normal C++ classes, with user-defined constructors. Sometimes
it is useful to have a POD version of the same type, particularly if the type appears in a
union. The template class pod_mode<T> provides a POD version of wrapper class T. It is
assignment-compatible with T and implicitly converts to both machine_mode and T.
Here are some C macros that relate to machine modes:
GET_MODE (x)
Returns the machine mode of the RTX x.
PUT_MODE (x, newmode)
Alters the machine mode of the RTX x to be newmode.
NUM_MACHINE_MODES
Stands for the number of machine modes available on the target machine. This
is one greater than the largest numeric value of any machine mode.
GET_MODE_NAME (m)
Returns the name of mode m as a string.
GET_MODE_CLASS (m)
Returns the mode class of mode m.
GET_MODE_WIDER_MODE (m)
Returns the next wider natural mode. For example, the expression GET_MODE_
WIDER_MODE (QImode) returns HImode.
GET_MODE_SIZE (m)
Returns the size in bytes of a datum of mode m.
GET_MODE_BITSIZE (m)
Returns the size in bits of a datum of mode m.
GET_MODE_IBIT (m)
Returns the number of integral bits of a datum of fixed-point mode m.
GET_MODE_FBIT (m)
Returns the number of fractional bits of a datum of fixed-point mode m.
GET_MODE_MASK (m)
Returns a bitmask containing 1 for all bits in a word that fit within mode m.
This macro can only be used for modes whose bitsize is less than or equal to
HOST_BITS_PER_INT.
GET_MODE_ALIGNMENT (m)
Return the required alignment, in bits, for an object of mode m.
GET_MODE_INNER (m)
Returns the mode of the basic parts of mode m. For vector modes this is the
mode of the vector elements. For complex modes it is the mode of the real and
imaginary parts. For other modes it is mode m itself.
GET_MODE_UNIT_SIZE (m)
Returns the size in bytes of the subunits of a datum of mode m. This is the
same as GET_MODE_SIZE except in the case of complex modes. For them, the
unit size is the size of the real or imaginary part.
296 GNU Compiler Collection (GCC) Internals
GET_MODE_NUNITS (m)
Returns the number of units contained in a mode, i.e., GET_MODE_SIZE divided
by GET_MODE_UNIT_SIZE.
GET_CLASS_NARROWEST_MODE (c)
Returns the narrowest mode in mode class c.
The following 3 variables are defined on every target. They can be used to allocate buffers
that are guaranteed to be large enough to hold any value that can be represented on the
target. The first two can be overridden by defining them in the target’s mode.def file,
however, the value must be a constant that can determined very early in the compilation
process. The third symbol cannot be overridden.
BITS_PER_UNIT
The number of bits in an addressable storage unit (byte). If you do not define
this, the default is 8.
MAX_BITSIZE_MODE_ANY_INT
The maximum bitsize of any mode that is used in integer math. This should be
overridden by the target if it uses large integers as containers for larger vectors
but otherwise never uses the contents to compute integer values.
MAX_BITSIZE_MODE_ANY_MODE
The bitsize of the largest mode on the target. The default value is the largest
mode size given in the mode definition file, which is always correct for targets
whose modes have a fixed size. Targets that might increase the size of a mode
beyond this default should define MAX_BITSIZE_MODE_ANY_MODE to the actual
upper limit in machine-modes.def.
The global variables byte_mode and word_mode contain modes whose classes are MODE_
INT and whose bitsizes are either BITS_PER_UNIT or BITS_PER_WORD, respectively. On 32-bit
machines, these are QImode and SImode, respectively.
CONST_WIDE_INT_VEC (code)
Returns the entire array of HOST_WIDE_INTs that are used to store the value.
This macro should be rarely used.
CONST_WIDE_INT_NUNITS (code)
The number of HOST_WIDE_INTs used to represent the number. Note that this
generally is smaller than the number of HOST_WIDE_INTs implied by the mode
size.
CONST_WIDE_INT_ELT (code,i)
Returns the ith element of the array. Element 0 is contains the low order bits
of the constant.
(const_fixed:m ...)
Represents a fixed-point constant of mode m. The operand is a data structure
of type struct fixed_value and is accessed with the macro CONST_FIXED_
VALUE. The high part of data is accessed with CONST_FIXED_VALUE_HIGH; the
low part is accessed with CONST_FIXED_VALUE_LOW.
(const_poly_int:m [c0 c1 ...])
Represents a poly_int-style polynomial integer with coefficients c0, c1, . . . .
The coefficients are wide_int-based integers rather than rtxes. CONST_POLY_
INT_COEFFS gives the values of individual coefficients (which is mostly only
useful in low-level routines) and const_poly_int_value gives the full poly_
int value.
(const_vector:m [x0 x1 ...])
Represents a vector constant. The values in square brackets are elements of
the vector, which are always const_int, const_wide_int, const_double or
const_fixed expressions.
Each vector constant v is treated as a specific instance of an arbitrary-length
sequence that itself contains ‘CONST_VECTOR_NPATTERNS (v)’ interleaved pat-
terns. Each pattern has the form:
{ base0, base1, base1 + step, base1 + step * 2, ... }
The first three elements in each pattern are enough to determine the values of
the other elements. However, if all steps are zero, only the first two elements are
needed. If in addition each base1 is equal to the corresponding base0, only the
first element in each pattern is needed. The number of determining elements
per pattern is given by ‘CONST_VECTOR_NELTS_PER_PATTERN (v)’.
For example, the constant:
{ 0, 1, 2, 6, 3, 8, 4, 10, 5, 12, 6, 14, 7, 16, 8, 18 }
is interpreted as an interleaving of the sequences:
{ 0, 2, 3, 4, 5, 6, 7, 8 }
{ 1, 6, 8, 10, 12, 14, 16, 18 }
where the sequences are represented by the following patterns:
base0 == 0, base1 == 2, step == 1
base0 == 1, base1 == 6, step == 2
In this case:
CONST_VECTOR_NPATTERNS (v) == 2
Chapter 14: RTL Representation 299
CONST_VECTOR_NELTS_PER_PATTERN (v) == 3
Thus the first 6 elements (‘{ 0, 1, 2, 6, 3, 8 }’) are enough to determine the
whole sequence; we refer to them as the “encoded” elements. They are the
only elements present in the square brackets for variable-length const_vectors
(i.e. for const_vectors whose mode m has a variable number of elements).
However, as a convenience to code that needs to handle both const_vectors
and parallels, all elements are present in the square brackets for fixed-length
const_vectors; the encoding scheme simply reduces the amount of work in-
volved in processing constants that follow a regular pattern.
Sometimes this scheme can create two possible encodings of the same vector.
For example { 0, 1 } could be seen as two patterns with one element each or
one pattern with two elements (base0 and base1). The canonical encoding is
always the one with the fewest patterns or (if both encodings have the same
number of patterns) the one with the fewest encoded elements.
‘const_vector_encoding_nelts (v)’ gives the total number of encoded ele-
ments in v, which is 6 in the example above. CONST_VECTOR_ENCODED_ELT (v,
i) accesses the value of encoded element i.
‘CONST_VECTOR_DUPLICATE_P (v)’ is true if v simply contains repeated in-
stances of ‘CONST_VECTOR_NPATTERNS (v)’ values. This is a shorthand for test-
ing ‘CONST_VECTOR_NELTS_PER_PATTERN (v) == 1’.
‘CONST_VECTOR_STEPPED_P (v)’ is true if at least one pattern in v has a nonzero
step. This is a shorthand for testing ‘CONST_VECTOR_NELTS_PER_PATTERN (v)
== 3’.
CONST_VECTOR_NUNITS (v) gives the total number of elements in v; it is a
shorthand for getting the number of units in ‘GET_MODE (v)’.
The utility function const_vector_elt gives the value of an arbitrary element
as an rtx. const_vector_int_elt gives the same value as a wide_int.
(const_string str)
Represents a constant string with value str. Currently this is used only for insn
attributes (see Section 17.20 [Insn Attributes], page 490) since constant strings
in C are placed in memory.
(symbol_ref:mode symbol)
Represents the value of an assembler label for data. symbol is a string that
describes the name of the assembler label. If it starts with a ‘*’, the label is
the rest of symbol not including the ‘*’. Otherwise, the label is symbol, usually
prefixed with ‘_’.
The symbol_ref contains a mode, which is usually Pmode. Usually that is the
only mode for which a symbol is directly valid.
(label_ref:mode label)
Represents the value of an assembler label for code. It contains one operand,
an expression, which must be a code_label or a note of type NOTE_INSN_
DELETED_LABEL that appears in the instruction sequence to identify the place
where the label should go.
300 GNU Compiler Collection (GCC) Internals
The reason for using a distinct expression type for code label references is so
that jump optimization can distinguish them.
The label_ref contains a mode, which is usually Pmode. Usually that is the
only mode for which a label is directly valid.
(const:m exp)
Represents a constant that is the result of an assembly-time arithmetic compu-
tation. The operand, exp, contains only const_int, symbol_ref, label_ref
or unspec expressions, combined with plus and minus. Any such unspecs
are target-specific and typically represent some form of relocation operator. m
should be a valid address mode.
(high:m exp)
Represents the high-order bits of exp. The number of bits is machine-dependent
and is normally the number of bits specified in an instruction that initializes the
high order bits of a register. It is used with lo_sum to represent the typical two-
instruction sequence used in RISC machines to reference large immediate values
and/or link-time constants such as global memory addresses. In the latter case,
m is Pmode and exp is usually a constant expression involving symbol_ref.
The macro CONST0_RTX (mode) refers to an expression with value 0 in mode mode. If
mode mode is of mode class MODE_INT, it returns const0_rtx. If mode mode is of mode class
MODE_FLOAT, it returns a CONST_DOUBLE expression in mode mode. Otherwise, it returns a
CONST_VECTOR expression in mode mode. Similarly, the macro CONST1_RTX (mode) refers to
an expression with value 1 in mode mode and similarly for CONST2_RTX. The CONST1_RTX
and CONST2_RTX macros are undefined for vector modes.
are given hard register numbers, even those that can be used only in certain
instructions or can hold only certain types of data.
A hard register may be accessed in various modes throughout one function,
but each pseudo register is given a natural mode and is accessed only in that
mode. When it is necessary to describe an access to a pseudo register using a
nonnatural mode, a subreg expression is used.
A reg expression with a machine mode that specifies more than one word
of data may actually stand for several consecutive registers. If in addition the
register number specifies a hardware register, then it actually represents several
consecutive hardware registers starting with the specified one.
Each pseudo register number used in a function’s RTL code is represented by
a unique reg expression.
Some pseudo register numbers, those within the range of FIRST_VIRTUAL_
REGISTER to LAST_VIRTUAL_REGISTER only appear during the RTL generation
phase and are eliminated before the optimization phases. These represent lo-
cations in the stack frame that cannot be determined until RTL generation for
the function has been completed. The following virtual register numbers are
defined:
VIRTUAL_INCOMING_ARGS_REGNUM
This points to the first word of the incoming arguments passed
on the stack. Normally these arguments are placed there by the
caller, but the callee may have pushed some arguments that were
previously passed in registers.
When RTL generation is complete, this virtual register is replaced
by the sum of the register given by ARG_POINTER_REGNUM and the
value of FIRST_PARM_OFFSET.
VIRTUAL_STACK_VARS_REGNUM
If FRAME_GROWS_DOWNWARD is defined to a nonzero value, this points
to immediately above the first variable on the stack. Otherwise, it
points to the first variable on the stack.
VIRTUAL_STACK_VARS_REGNUM is replaced with the sum of
the register given by FRAME_POINTER_REGNUM and the value
TARGET_STARTING_FRAME_OFFSET.
VIRTUAL_STACK_DYNAMIC_REGNUM
This points to the location of dynamically allocated memory on the
stack immediately after the stack pointer has been adjusted by the
amount of memory desired.
This virtual register is replaced by the sum of the register given by
STACK_POINTER_REGNUM and the value STACK_DYNAMIC_OFFSET.
VIRTUAL_OUTGOING_ARGS_REGNUM
This points to the location in the stack at which outgoing arguments
should be written when the stack is pre-pushed (arguments pushed
using push insns should always use STACK_POINTER_REGNUM).
302 GNU Compiler Collection (GCC) Internals
sets the low 16 bits of ‘(reg:PSI 0)’ to ‘(reg:HI 4)’, and the high 4 defined
bits of ‘(reg:PSI 0)’ retain their original value. The behavior here is the same
as for normal subregs, when there are no MODE_PARTIAL_INT modes involved.
The rules above apply to both pseudo regs and hard regs. If the semantics
are not correct for particular combinations of m1, m2 and hard reg, the target-
specific code must ensure that those combinations are never used. For example:
TARGET_CAN_CHANGE_MODE_CLASS (m2, m1, class)
must be false for every class class that includes reg.
GCC must be able to determine at compile time whether a subreg is paradoxical,
whether it occupies a whole number of blocks, or whether it is a lowpart of a
block. This means that certain combinations of variable-sized mode are not
permitted. For example, if m2 holds n SI values, where n is greater than zero,
it is not possible to form a DI subreg of it; such a subreg would be paradoxical
when n is 1 but not when n is greater than 1.
The first operand of a subreg expression is customarily accessed with the
SUBREG_REG macro and the second operand is customarily accessed with the
SUBREG_BYTE macro.
It has been several years since a platform in which BYTES_BIG_ENDIAN not
equal to WORDS_BIG_ENDIAN has been tested. Anyone wishing to support such
a platform in the future may be confronted with code rot.
(scratch:m)
This represents a scratch register that will be required for the execution of a
single instruction and not used subsequently. It is converted into a reg by either
the local register allocator or the reload pass.
scratch is usually present inside a clobber operation (see Section 14.15 [Side
Effects], page 315).
On some machines, the condition code register is given a register number and a
reg is used. Other machines store condition codes in general registers; in such
cases a pseudo register should be used.
Some machines, such as the SPARC and RS/6000, have two sets of arithmetic
instructions, one that sets and one that does not set the condition code. This
is best handled by normally generating the instruction that does not set the
condition code, and making a pattern that both performs the arithmetic and
sets the condition code register. For examples, search for ‘addcc’ and ‘andcc’
in sparc.md.
(pc) This represents the machine’s program counter. It has no operands and may
not have a machine mode. (pc) may be validly used only in certain specific
contexts in jump instructions.
There is only one expression object of code pc; it is the value of the variable
pc_rtx. Any attempt to create an expression of code pc will return pc_rtx.
All instructions that do not jump alter the program counter implicitly by in-
crementing it, but there is no need to mention this in the RTL.
306 GNU Compiler Collection (GCC) Internals
(plus:m x y)
(ss_plus:m x y)
(us_plus:m x y)
These three expressions all represent the sum of the values represented by x
and y carried out in machine mode m. They differ in their behavior on overflow
of integer modes. plus wraps round modulo the width of m; ss_plus saturates
at the maximum signed value representable in m; us_plus saturates at the
maximum unsigned value.
(lo_sum:m x y)
This expression represents the sum of x and the low-order bits of y. It is used
with high (see Section 14.7 [Constants], page 296) to represent the typical two-
instruction sequence used in RISC machines to reference large immediate values
and/or link-time constants such as global memory addresses. In the latter case,
m is Pmode and y is usually a constant expression involving symbol_ref.
The number of low order bits is machine-dependent but is normally the number
of bits in mode m minus the number of bits set by high.
(minus:m x y)
(ss_minus:m x y)
(us_minus:m x y)
These three expressions represent the result of subtracting y from x, carried
out in mode M. Behavior on overflow is the same as for the three variants of
plus (see above).
Chapter 14: RTL Representation 307
(compare:m x y)
Represents the result of subtracting y from x for purposes of comparison. The
result is computed without overflow, as if with infinite precision.
Of course, machines cannot really subtract with infinite precision. However,
they can pretend to do so when only the sign of the result will be used, which
is the case when the result is stored in the condition code. And that is the only
way this kind of expression may validly be used: as a value to be stored in the
condition codes, in a register. See Section 14.10 [Comparisons], page 310.
The mode m is not related to the modes of x and y, but instead is the mode
of the condition code value. It is some mode in class MODE_CC, often CCmode.
See Section 18.15 [Condition Code], page 617. If m is CCmode, the operation
returns sufficient information (in an unspecified format) so that any comparison
operator can be applied to the result of the COMPARE operation. For other modes
in class MODE_CC, the operation only returns a subset of this information.
Normally, x and y must have the same mode. Otherwise, compare is valid only
if the mode of x is in class MODE_INT and y is a const_int or const_double
with mode VOIDmode. The mode of x determines what mode the comparison is
to be done in; thus it must not be VOIDmode.
If one of the operands is a constant, it should be placed in the second operand
and the comparison code adjusted as appropriate.
A compare specifying two VOIDmode constants is not valid since there is no way
to know in what mode the comparison is to be performed; the comparison must
either be folded during the compilation or the first operand must be loaded into
a register while its mode is still known.
(neg:m x)
(ss_neg:m x)
(us_neg:m x)
These two expressions represent the negation (subtraction from zero) of the
value represented by x, carried out in mode m. They differ in the behavior
on overflow of integer modes. In the case of neg, the negation of the operand
may be a number not representable in mode m, in which case it is truncated
to m. ss_neg and us_neg ensure that an out-of-bounds result saturates to the
maximum or minimum signed or unsigned value.
(mult:m x y)
(ss_mult:m x y)
(us_mult:m x y)
Represents the signed product of the values represented by x and y carried out
in machine mode m. ss_mult and us_mult ensure that an out-of-bounds result
saturates to the maximum or minimum signed or unsigned value.
Some machines support a multiplication that generates a product wider than
the operands. Write the pattern for this as
(mult:m (sign_extend:m x) (sign_extend:m y))
where m is wider than the modes of x and y, which need not be the same.
For unsigned widening multiplication, use the same idiom, but with zero_
extend instead of sign_extend.
308 GNU Compiler Collection (GCC) Internals
(smul_highpart:m x y)
(umul_highpart:m x y)
Represents the high-part multiplication of x and y carried out in machine mode
m. smul_highpart returns the high part of a signed multiplication, umul_
highpart returns the high part of an unsigned multiplication.
(fma:m x y z)
Represents the fma, fmaf, and fmal builtin functions, which compute ‘x * y +
z’ without doing an intermediate rounding step.
(div:m x y)
(ss_div:m x y)
Represents the quotient in signed division of x by y, carried out in machine mode
m. If m is a floating point mode, it represents the exact quotient; otherwise,
the integerized quotient. ss_div ensures that an out-of-bounds result saturates
to the maximum or minimum signed value.
Some machines have division instructions in which the operands and quo-
tient widths are not all the same; you should represent such instructions using
truncate and sign_extend as in,
(truncate:m1 (div:m2 x (sign_extend:m2 y)))
(udiv:m x y)
(us_div:m x y)
Like div but represents unsigned division. us_div ensures that an out-of-
bounds result saturates to the maximum or minimum unsigned value.
(mod:m x y)
(umod:m x y)
Like div and udiv but represent the remainder instead of the quotient.
(smin:m x y)
(smax:m x y)
Represents the smaller (for smin) or larger (for smax) of x and y, interpreted
as signed values in mode m. When used with floating point, if both operands
are zeros, or if either operand is NaN, then it is unspecified which of the two
operands is returned as the result.
(umin:m x y)
(umax:m x y)
Like smin and smax, but the values are interpreted as unsigned integers.
(not:m x) Represents the bitwise complement of the value represented by x, carried out
in mode m, which must be a fixed-point machine mode.
(and:m x y)
Represents the bitwise logical-and of the values represented by x and y, carried
out in machine mode m, which must be a fixed-point machine mode.
(ior:m x y)
Represents the bitwise inclusive-or of the values represented by x and y, carried
out in machine mode m, which must be a fixed-point mode.
Chapter 14: RTL Representation 309
(xor:m x y)
Represents the bitwise exclusive-or of the values represented by x and y, carried
out in machine mode m, which must be a fixed-point mode.
(ashift:m x c)
(ss_ashift:m x c)
(us_ashift:m x c)
These three expressions represent the result of arithmetically shifting x left by
c places. They differ in their behavior on overflow of integer modes. An ashift
operation is a plain shift with no special behavior in case of a change in the
sign bit; ss_ashift and us_ashift saturates to the minimum or maximum
representable value if any of the bits shifted out differs from the final sign bit.
x have mode m, a fixed-point machine mode. c be a fixed-point mode or be a
constant with mode VOIDmode; which mode is determined by the mode called
for in the machine description entry for the left-shift instruction. For example,
on the VAX, the mode of c is QImode regardless of m.
(lshiftrt:m x c)
(ashiftrt:m x c)
Like ashift but for right shift. Unlike the case for left shift, these two opera-
tions are distinct.
(rotate:m x c)
(rotatert:m x c)
Similar but represent left and right rotate. If c is a constant, use rotate.
(abs:m x)
(ss_abs:m x)
Represents the absolute value of x, computed in mode m. ss_abs ensures that
an out-of-bounds result saturates to the maximum signed value.
(sqrt:m x)
Represents the square root of x, computed in mode m. Most often m will be a
floating point mode.
(ffs:m x) Represents one plus the index of the least significant 1-bit in x, represented as
an integer of mode m. (The value is zero if x is zero.) The mode of x must be
m or VOIDmode.
(clrsb:m x)
Represents the number of redundant leading sign bits in x, represented as an
integer of mode m, starting at the most significant bit position. This is one less
than the number of leading sign bits (either 0 or 1), with no special cases. The
mode of x must be m or VOIDmode.
(clz:m x) Represents the number of leading 0-bits in x, represented as an integer of mode
m, starting at the most significant bit position. If x is zero, the value is deter-
mined by CLZ_DEFINED_VALUE_AT_ZERO (see Section 18.32 [Misc], page 687).
Note that this is one of the few expressions that is not invariant under widening.
The mode of x must be m or VOIDmode.
310 GNU Compiler Collection (GCC) Internals
ent results for the same pair of integer values: for example, 1 is signed greater-than −1 but
not unsigned greater-than, because −1 when regarded as unsigned is actually 0xffffffff
which is greater than 1.
The signed comparisons are also used for floating point values. Floating point comparisons
are distinguished by the machine modes of the operands.
(eq:m x y)
STORE_FLAG_VALUE if the values represented by x and y are equal, otherwise 0.
(ne:m x y)
STORE_FLAG_VALUE if the values represented by x and y are not equal, otherwise
0.
(gt:m x y)
STORE_FLAG_VALUE if the x is greater than y. If they are fixed-point, the com-
parison is done in a signed sense.
(gtu:m x y)
Like gt but does unsigned comparison, on fixed-point numbers only.
(lt:m x y)
(ltu:m x y)
Like gt and gtu but test for “less than”.
(ge:m x y)
(geu:m x y)
Like gt and gtu but test for “greater than or equal”.
(le:m x y)
(leu:m x y)
Like gt and gtu but test for “less than or equal”.
(if_then_else cond then else)
This is not a comparison operation but is listed here because it is always used in
conjunction with a comparison operation. To be precise, cond is a comparison
expression. This expression represents a choice, according to cond, between the
value represented by then and the one represented by else.
On most machines, if_then_else expressions are valid only to express condi-
tional jumps.
(cond [test1 value1 test2 value2 ...] default)
Similar to if_then_else, but more general. Each of test1, test2, . . . is per-
formed in turn. The result of this expression is the value corresponding to the
first nonzero test, or default if none of the tests are nonzero expressions.
This is currently not valid for instruction patterns and is supported only for
insn attributes. See Section 17.20 [Insn Attributes], page 490.
14.11 Bit-Fields
Special expression codes exist to represent bit-field instructions.
(sign_extract:m loc size pos)
This represents a reference to a sign-extended bit-field contained or starting in
loc (a memory or register reference). The bit-field is size bits wide and starts
312 GNU Compiler Collection (GCC) Internals
at bit pos. The compilation option BITS_BIG_ENDIAN says which end of the
memory unit pos counts from.
If loc is in memory, its mode must be a single-byte integer mode. If loc is in a
register, the mode to use is specified by the operand of the insv or extv pattern
(see Section 17.10 [Standard Names], page 420) and is usually a full-word integer
mode, which is the default if none is specified.
The mode of pos is machine-specific and is also specified in the insv or extv
pattern.
The mode m is the same as the mode that would be used for loc if it were a
register.
A sign_extract cannot appear as an lvalue, or part thereof, in RTL.
(zero_extract:m loc size pos)
Like sign_extract but refers to an unsigned or zero-extended bit-field. The
same sequence of bits are extracted, but they are filled to an entire word with
zeros instead of by sign-extension.
Unlike sign_extract, this type of expressions can be lvalues in RTL; they may
appear on the left side of an assignment, indicating insertion of a value into the
specified bit-field.
same submodes as the input vector mode or the scalar modes, and the number
of output parts must be an integer multiple of the number of input parts.
(vec_series:m base step)
This operation creates a vector in which element i is equal to ‘base + i*step’.
m must be a vector integer mode.
14.13 Conversions
All conversions between machine modes must be represented by explicit conversion oper-
ations. For example, an expression which is the sum of a byte and a full word cannot be
written as (plus:SI (reg:QI 34) (reg:SI 80)) because the plus operation requires two
operands of the same machine mode. Therefore, the byte-sized operand is enclosed in a
conversion operation, as in
(plus:SI (sign_extend:SI (reg:QI 34)) (reg:SI 80))
The conversion operation is not a mere placeholder, because there may be more than one
way of converting from a given starting mode to the desired final mode. The conversion
operation code says how to do it.
For all conversion operations, x must not be VOIDmode because the mode in which to do
the conversion would not be known. The conversion must either be done at compile-time
or x must be placed into a register.
(sign_extend:m x)
Represents the result of sign-extending the value x to machine mode m. m
must be a fixed-point mode and x a fixed-point value of a mode narrower than
m.
(zero_extend:m x)
Represents the result of zero-extending the value x to machine mode m. m
must be a fixed-point mode and x a fixed-point value of a mode narrower than
m.
(float_extend:m x)
Represents the result of extending the value x to machine mode m. m must be
a floating point mode and x a floating point value of a mode narrower than m.
(truncate:m x)
Represents the result of truncating the value x to machine mode m. m must
be a fixed-point mode and x a fixed-point value of a mode wider than m.
(ss_truncate:m x)
Represents the result of truncating the value x to machine mode m, using
signed saturation in the case of overflow. Both m and the mode of x must be
fixed-point modes.
(us_truncate:m x)
Represents the result of truncating the value x to machine mode m, using
unsigned saturation in the case of overflow. Both m and the mode of x must
be fixed-point modes.
314 GNU Compiler Collection (GCC) Internals
(float_truncate:m x)
Represents the result of truncating the value x to machine mode m. m must
be a floating point mode and x a floating point value of a mode wider than m.
(float:m x)
Represents the result of converting fixed point value x, regarded as signed, to
floating point mode m.
(unsigned_float:m x)
Represents the result of converting fixed point value x, regarded as unsigned,
to floating point mode m.
(fix:m x) When m is a floating-point mode, represents the result of converting floating
point value x (valid for mode m) to an integer, still represented in floating point
mode m, by rounding towards zero.
When m is a fixed-point mode, represents the result of converting floating point
value x to mode m, regarded as signed. How rounding is done is not specified, so
this operation may be used validly in compiling C code only for integer-valued
operands.
(unsigned_fix:m x)
Represents the result of converting floating point value x to fixed point mode
m, regarded as unsigned. How rounding is done is not specified.
(fract_convert:m x)
Represents the result of converting fixed-point value x to fixed-point mode m,
signed integer value x to fixed-point mode m, floating-point value x to fixed-
point mode m, fixed-point value x to integer mode m regarded as signed, or
fixed-point value x to floating-point mode m. When overflows or underflows
happen, the results are undefined.
(sat_fract:m x)
Represents the result of converting fixed-point value x to fixed-point mode m,
signed integer value x to fixed-point mode m, or floating-point value x to fixed-
point mode m. When overflows or underflows happen, the results are saturated
to the maximum or the minimum.
(unsigned_fract_convert:m x)
Represents the result of converting fixed-point value x to integer mode m re-
garded as unsigned, or unsigned integer value x to fixed-point mode m. When
overflows or underflows happen, the results are undefined.
(unsigned_sat_fract:m x)
Represents the result of converting unsigned integer value x to fixed-point mode
m. When overflows or underflows happen, the results are saturated to the
maximum or the minimum.
14.14 Declarations
Declaration expression codes do not represent arithmetic operations but rather state asser-
tions about their operands.
Chapter 14: RTL Representation 315
or (plus:SI (pc) y), where y may be a reg or a mem; these unusual patterns
are used to represent jumps through branch tables.
If lval is not (pc), the mode of lval must not be VOIDmode and the mode of x
must be valid for the mode of lval.
lval is customarily accessed with the SET_DEST macro and x with the SET_SRC
macro.
(return) As the sole expression in a pattern, represents a return from the current func-
tion, on machines where this can be done with one instruction, such as VAXen.
On machines where a multi-instruction “epilogue” must be executed in order
to return from the function, returning is done by jumping to a label which
precedes the epilogue, and the return expression code is never used.
Inside an if_then_else expression, represents the value to be placed in pc to
return to the caller.
Note that an insn pattern of (return) is logically equivalent to (set (pc)
(return)), but the latter form is never used.
(simple_return)
Like (return), but truly represents only a function return, while (return) may
represent an insn that also performs other functions of the function epilogue.
Like (return), this may also occur in conditional jumps.
(call function nargs)
Represents a function call. function is a mem expression whose address is the
address of the function to be called. nargs is an expression which can be used
for two purposes: on some machines it represents the number of bytes of stack
argument; on others, it represents the number of argument registers.
Each machine has a standard machine mode which function must have. The
machine description defines macro FUNCTION_MODE to expand into the requisite
mode name. The purpose of this mode is to specify what kind of addressing
is allowed, on machines where the allowed kinds of addressing depend on the
machine mode being addressed.
(clobber x)
Represents the storing or possible storing of an unpredictable, undescribed value
into x, which must be a reg, scratch, parallel or mem expression.
One place this is used is in string instructions that store standard values into
particular hard registers. It may not be worth the trouble to describe the values
that are stored, but it is essential to inform the compiler that the registers will
be altered, lest it attempt to keep data in them across the string instruction.
If x is (mem:BLK (const_int 0)) or (mem:BLK (scratch)), it means that all
memory locations must be presumed clobbered. If x is a parallel, it has the
same meaning as a parallel in a set expression.
Note that the machine description classifies certain hard registers as “call-
clobbered”. All function call instructions are assumed by default to clobber
these registers, so there is no need to use clobber expressions to indicate this
fact. Also, each function call is assumed to have the potential to alter any
memory location, unless the function is declared const.
Chapter 14: RTL Representation 317
This will not work, several of the optimizers only look at expressions locally; it
is very likely that if you have multiple insns with identical inputs to the unspec,
they will be optimized away even if register 1 changes in between.
This means that use can only be used to describe that the register is live. You
should think twice before adding use statements, more often you will want to
318 GNU Compiler Collection (GCC) Internals
use unspec instead. The use RTX is most commonly useful to describe that
a fixed register is implicitly used in an insn. It is also safe to use in patterns
where the compiler knows for other reasons that the result of the whole pattern
is variable, such as ‘cpymemm’ or ‘call’ patterns.
During the reload phase, an insn that has a use as pattern can carry a reg equal
note. These use insns will be deleted before the reload phase exits.
During the delayed branch scheduling phase, x may be an insn. This indicates
that x previously was located at this place in the code and its data dependencies
need to be taken into account. These use insns will be deleted before the delayed
branch scheduling phase exits.
address, respectively. flags indicates the relative position of base, min and max
to the containing insn and of min and max to base. See rtl.def for details.
(prefetch:m addr rw locality)
Represents prefetch of memory at address addr. Operand rw is 1 if the
prefetch is for data to be written, 0 otherwise; targets that do not support
write prefetches should treat this as a normal prefetch. Operand locality
specifies the amount of temporal locality; 0 if there is none or 1, 2, or 3 for
increasing levels of temporal locality; targets that do not support locality hints
should ignore this.
This insn is used to minimize cache-miss latency by moving data into a cache
before it is accessed. It should use only non-faulting data prefetch instructions.
(pre_modify:m x expr)
Similar except side effects happen before the use.
These embedded side effect expressions must be used with care. Instruction patterns may
not use them. Until the ‘flow’ pass of the compiler, they may occur only to represent pushes
onto the stack. The ‘flow’ pass finds cases where registers are incremented or decremented
in one instruction and used as an address shortly before or after; these cases are then
transformed to use pre- or post-increment or -decrement.
If a register used as the operand of these expressions is used in another address in an
insn, the original value of the register is used. Uses of the register outside of an address are
not permitted within the same insn as a use in an embedded side effect expression because
such insns behave differently on different machines and hence must be treated as ambiguous
and disallowed.
An instruction that can be represented with an embedded side effect could also be rep-
resented using parallel containing an additional set to describe how the address register
is altered. This is not done because machines that allow these operations at all typically
allow them wherever a memory address is called for. Describing them as additional parallel
stores would require doubling the number of entries in the machine description.
is represented using a single asm_operands RTX which represents the value that is stored
in outputvar:
(set rtx-for-outputvar
(asm_operands "foo %1,%2,%0" "a" 0
[rtx-for-addition-result rtx-for-*z]
[(asm_input:m1 "g")
(asm_input:m2 "di")]))
Here the operands of the asm_operands RTX are the assembler template string, the output-
operand’s constraint, the index-number of the output operand among the output operands
specified, a vector of input operand RTX’s, and a vector of input-operand modes and
constraints. The mode m1 is the mode of the sum x+y; m2 is that of *z.
When an asm statement has multiple output values, its insn has several such set RTX’s
inside of a parallel. Each set contains an asm_operands; all of these share the same
assembler template and vectors, but each contains the constraint for the respective output
operand. They are also distinguished by the output-operand index number, which is 0, 1,
. . . for successive output operands.
Variable tracking at assignments uses these notes only when they refer to variables that
live at fixed locations (e.g., addressable variables, global non-automatic variables). For
variables whose location may vary, it relies on the following types of notes.
(var_location:mode var exp stat)
Binds variable var, a tree, to value exp, an RTL expression. It appears only in
NOTE_INSN_VAR_LOCATION and DEBUG_INSNs, with slightly different meanings.
mode, if present, represents the mode of exp, which is useful if it is a modeless
expression. stat is only meaningful in notes, indicating whether the variable is
known to be initialized or uninitialized.
(debug_expr:mode decl)
Stands for the value bound to the DEBUG_EXPR_DECL decl, that points back to
it, within value expressions in VAR_LOCATION nodes.
(debug_implicit_ptr:mode decl)
Stands for the location of a decl that is no longer addressable.
(entry_value:mode decl)
Stands for the value a decl had at the entry point of the containing function.
(debug_parameter_ref:mode decl)
Refers to a parameter that was completely optimized out.
(debug_marker:mode)
Marks a program location. With VOIDmode, it stands for the beginning of a
statement, a recommended inspection point logically after all prior side effects,
and before any subsequent side effects. With BLKmode, it indicates an inline
entry point: the lexical block encoded in the INSN_LOCATION is the enclosing
block that encloses the inlined function.
14.19 Insns
The RTL representation of the code for a function is a doubly-linked chain of objects called
insns. Insns are expressions with special codes that are used for no other purpose. Some
insns are actual instructions; others represent dispatch tables for switch statements; others
represent labels to jump to or various sorts of declarative information.
In addition to its own specific data, each insn must have a unique id-number that dis-
tinguishes it from all other insns in the current function (after delayed branch scheduling,
copies of an insn with the same id-number may be present in multiple places in a function,
but these copies will always be identical and will only appear inside a sequence), and chain
pointers to the preceding and following insns. These three fields occupy the same position
in every insn, independent of the expression code of the insn. They could be accessed with
XEXP and XINT, but instead three special macros are always used:
INSN_UID (i)
Accesses the unique id of insn i.
PREV_INSN (i)
Accesses the chain pointer to the insn preceding i. If i is the first insn, this is
a null pointer.
Chapter 14: RTL Representation 323
NEXT_INSN (i)
Accesses the chain pointer to the insn following i. If i is the last insn, this is a
null pointer.
The first insn in the chain is obtained by calling get_insns; the last insn is the result
of calling get_last_insn. Within the chain delimited by these insns, the NEXT_INSN and
PREV_INSN pointers must always correspond: if insn is not the first insn,
NEXT_INSN (PREV_INSN (insn)) == insn
is always true and if insn is not the last insn,
PREV_INSN (NEXT_INSN (insn)) == insn
is always true.
After delay slot scheduling, some of the insns in the chain might be sequence expressions,
which contain a vector of insns. The value of NEXT_INSN in all but the last of these insns
is the next insn in the vector; the value of NEXT_INSN of the last insn in the vector is the
same as the value of NEXT_INSN for the sequence in which it is contained. Similar rules
apply for PREV_INSN.
This means that the above invariants are not necessarily true for insns inside sequence
expressions. Specifically, if insn is the first insn in a sequence, NEXT_INSN (PREV_INSN
(insn)) is the insn containing the sequence expression, as is the value of PREV_INSN
(NEXT_INSN (insn)) if insn is the last insn in the sequence expression. You can use these
expressions to find the containing sequence expression.
Every insn has one of the following expression codes:
insn The expression code insn is used for instructions that do not jump and do not
do function calls. sequence expressions are always contained in insns with code
insn even if one of those insns should jump or do function calls.
Insns with code insn have four additional fields beyond the three mandatory
ones listed above. These four are described in a table below.
jump_insn
The expression code jump_insn is used for instructions that may jump (or,
more generally, may contain label_ref expressions to which pc can be set in
that instruction). If there is an instruction to return from the current function,
it is recorded as a jump_insn.
jump_insn insns have the same extra fields as insn insns, accessed in the same
way and in addition contain a field JUMP_LABEL which is defined once jump
optimization has completed.
For simple conditional and unconditional jumps, this field contains the code_
label to which this insn will (possibly conditionally) branch. In a more complex
jump, JUMP_LABEL records one of the labels that the insn refers to; other jump
target labels are recorded as REG_LABEL_TARGET notes. The exception is addr_
vec and addr_diff_vec, where JUMP_LABEL is NULL_RTX and the only way to
find the labels is to scan the entire body of the insn.
Return insns count as jumps, but their JUMP_LABEL is RETURN or SIMPLE_
RETURN.
324 GNU Compiler Collection (GCC) Internals
call_insn
The expression code call_insn is used for instructions that may do function
calls. It is important to distinguish these instructions because they imply that
certain registers and memory locations may be altered unpredictably.
call_insn insns have the same extra fields as insn insns, accessed in the same
way and in addition contain a field CALL_INSN_FUNCTION_USAGE, which contains
a list (chain of expr_list expressions) containing use, clobber and sometimes
set expressions that denote hard registers and mems used or clobbered by the
called function.
A mem generally points to a stack slot in which arguments passed to the libcall by
reference (see Section 18.9.7 [Register Arguments], page 579) are stored. If the
argument is caller-copied (see Section 18.9.7 [Register Arguments], page 579),
the stack slot will be mentioned in clobber and use entries; if it’s callee-copied,
only a use will appear, and the mem may point to addresses that are not stack
slots.
Registers occurring inside a clobber in this list augment registers specified in
CALL_USED_REGISTERS (see Section 18.7.1 [Register Basics], page 546).
If the list contains a set involving two registers, it indicates that the function
returns one of its arguments. Such a set may look like a no-op if the same
register holds the argument and the return value.
code_label
A code_label insn represents a label that a jump insn can jump to. It con-
tains two special fields of data in addition to the three standard ones. CODE_
LABEL_NUMBER is used to hold the label number, a number that identifies this
label uniquely among all the labels in the compilation (not just in the current
function). Ultimately, the label is represented in the assembler output as an
assembler label, usually of the form ‘Ln’ where n is the label number.
When a code_label appears in an RTL expression, it normally appears within
a label_ref which represents the address of the label, as a number.
Besides as a code_label, a label can also be represented as a note of type
NOTE_INSN_DELETED_LABEL.
The field LABEL_NUSES is only defined once the jump optimization phase is
completed. It contains the number of times this label is referenced in the
current function.
The field LABEL_KIND differentiates four different types of labels: LABEL_
NORMAL, LABEL_STATIC_ENTRY, LABEL_GLOBAL_ENTRY, and LABEL_WEAK_ENTRY.
The only labels that do not have type LABEL_NORMAL are alternate entry points
to the current function. These may be static (visible only in the containing
translation unit), global (exposed to all translation units), or weak (global,
but can be overridden by another symbol with the same name).
Much of the compiler treats all four kinds of label identically. Some of it needs
to know whether or not a label is an alternate entry point; for this purpose,
the macro LABEL_ALT_ENTRY_P is provided. It is equivalent to testing whether
‘LABEL_KIND (label) == LABEL_NORMAL’. The only place that cares about the
distinction between static, global, and weak alternate entry points, besides the
Chapter 14: RTL Representation 325
NOTE_INSN_VAR_LOCATION
This note is used to generate variable location debugging infor-
mation. It indicates that the user variable in its VAR_LOCATION
operand is at the location given in the RTL expression, or holds a
value that can be computed by evaluating the RTL expression from
that static point in the program up to the next such note for the
same user variable.
NOTE_INSN_BEGIN_STMT
This note is used to generate is_stmt markers in line number de-
bugging information. It indicates the beginning of a user statement.
NOTE_INSN_INLINE_ENTRY
This note is used to generate entry_pc for inlined subroutines in
debugging information. It indicates an inspection point at which
all arguments for the inlined function have been bound, and before
its first statement.
These codes are printed symbolically when they appear in debugging dumps.
debug_insn
The expression code debug_insn is used for pseudo-instructions that hold de-
bugging information for variable tracking at assignments (see -fvar-tracking-
assignments option). They are the RTL representation of GIMPLE_DEBUG state-
ments (Section 12.8.7 [GIMPLE_DEBUG], page 247), with a VAR_LOCATION operand
that binds a user variable tree to an RTL representation of the value in the
corresponding statement. A DEBUG_EXPR in it stands for the value bound to the
corresponding DEBUG_EXPR_DECL.
GIMPLE_DEBUG_BEGIN_STMT and GIMPLE_DEBUG_INLINE_ENTRY are expanded to
RTL as a DEBUG_INSN with a DEBUG_MARKER PATTERN; the difference is the RTL
mode: the former’s DEBUG_MARKER is VOIDmode, whereas the latter is BLKmode;
information about the inlined function can be taken from the lexical block
encoded in the INSN_LOCATION. These DEBUG_INSNs, that do not carry VAR_
LOCATION information, just DEBUG_MARKERs, can be detected by testing DEBUG_
MARKER_INSN_P, whereas those that do can be recognized as DEBUG_BIND_INSN_
P.
Throughout optimization passes, DEBUG_INSNs are not reordered with respect
to each other, particularly during scheduling. Binding information is kept in
pseudo-instruction form, so that, unlike notes, it gets the same treatment and
adjustments that regular instructions would. It is the variable tracking pass that
turns these pseudo-instructions into NOTE_INSN_VAR_LOCATION, NOTE_INSN_
BEGIN_STMT and NOTE_INSN_INLINE_ENTRY notes, analyzing control flow, value
equivalences and changes to registers and memory referenced in value expres-
sions, propagating the values of debug temporaries and determining expressions
that can be used to compute the value of each user variable at as many points
(ranges, actually) in the program as possible.
Unlike NOTE_INSN_VAR_LOCATION, the value expression in an INSN_VAR_
LOCATION denotes a value at that specific point in the program, rather than
an expression that can be evaluated at any later point before an overriding
Chapter 14: RTL Representation 327
The macro REG_NOTE_KIND (x) returns the kind of register note. Its counterpart, the
macro PUT_REG_NOTE_KIND (x, newkind) sets the register note type of x to be newkind.
Register notes are of three classes: They may say something about an input to an insn,
they may say something about an output of an insn, or they may create a linkage between
two insns.
These register notes annotate inputs to an insn:
REG_DEAD The value in op dies in this insn; that is to say, altering the value immediately
after this insn would not affect the future behavior of the program.
It does not follow that the register op has no useful value after this insn since
op is not necessarily modified by this insn. Rather, no subsequent instruction
uses the contents of op.
REG_UNUSED
The register op being set by this insn will not be used in a subsequent insn.
This differs from a REG_DEAD note, which indicates that the value in an input
will not be used subsequently. These two notes are independent; both may be
present for the same register.
REG_INC The register op is incremented (or decremented; at this level there is no dis-
tinction) by an embedded side effect inside this insn. This means it appears in
a post_inc, pre_inc, post_dec or pre_dec expression.
REG_NONNEG
The register op is known to have a nonnegative value when this insn is reached.
This is used by special looping instructions that terminate when the register
goes negative.
The REG_NONNEG note is added only to ‘doloop_end’ insns, if its pattern uses a
ge condition.
REG_LABEL_OPERAND
This insn uses op, a code_label or a note of type NOTE_INSN_DELETED_LABEL,
but is not a jump_insn, or it is a jump_insn that refers to the operand as an
ordinary operand. The label may still eventually be a jump target, but if so in
an indirect jump in a subsequent insn. The presence of this note allows jump
optimization to be aware that op is, in fact, being used, and flow optimization
to build an accurate flow graph.
REG_LABEL_TARGET
This insn is a jump_insn but not an addr_vec or addr_diff_vec. It uses op,
a code_label as a direct or indirect jump target. Its purpose is similar to
that of REG_LABEL_OPERAND. This note is only present if the insn has multiple
targets; the last label in the insn (in the highest numbered insn-field) goes
into the JUMP_LABEL field and does not have a REG_LABEL_TARGET note. See
Section 14.19 [Insns], page 322.
REG_SETJMP
Appears attached to each CALL_INSN to setjmp or a related function.
The following notes describe attributes of outputs of an insn:
Chapter 14: RTL Representation 329
REG_EQUIV
REG_EQUAL
This note is only valid on an insn that sets only one register and indicates that
that register will be equal to op at run time; the scope of this equivalence differs
between the two types of notes. The value which the insn explicitly copies into
the register may look different from op, but they will be equal at run time. If
the output of the single set is a strict_low_part or zero_extract expression,
the note refers to the register that is contained in its first operand.
For REG_EQUIV, the register is equivalent to op throughout the entire function,
and could validly be replaced in all its occurrences by op. (“Validly” here refers
to the data flow of the program; simple replacement may make some insns
invalid.) For example, when a constant is loaded into a register that is never
assigned any other value, this kind of note is used.
When a parameter is copied into a pseudo-register at entry to a function, a note
of this kind records that the register is equivalent to the stack slot where the
parameter was passed. Although in this case the register may be set by other
insns, it is still valid to replace the register by the stack slot throughout the
function.
A REG_EQUIV note is also used on an instruction which copies a register param-
eter into a pseudo-register at entry to a function, if there is a stack slot where
that parameter could be stored. Although other insns may set the pseudo-
register, it is valid for the compiler to replace the pseudo-register by stack slot
throughout the function, provided the compiler ensures that the stack slot is
properly initialized by making the replacement in the initial copy instruction as
well. This is used on machines for which the calling convention allocates stack
space for register parameters. See REG_PARM_STACK_SPACE in Section 18.9.6
[Stack Arguments], page 577.
In the case of REG_EQUAL, the register that is set by this insn will be equal
to op at run time at the end of this insn but not necessarily elsewhere in the
function. In this case, op is typically an arithmetic expression. For example,
when a sequence of insns such as a library call is used to perform an arithmetic
operation, this kind of note is attached to the insn that produces or copies the
final value.
These two notes are used in different ways by the compiler passes. REG_EQUAL
is used by passes prior to register allocation (such as common subexpression
elimination and loop optimization) to tell them how to think of that value.
REG_EQUIV notes are used by register allocation to indicate that there is an
available substitute expression (either a constant or a mem expression for the
location of a parameter on the stack) that may be used in place of a register if
insufficient registers are available.
Except for stack homes for parameters, which are indicated by a REG_EQUIV note
and are not useful to the early optimization passes and pseudo registers that
are equivalent to a memory location throughout their entire life, which is not
detected until later in the compilation, all equivalences are initially indicated
by an attached REG_EQUAL note. In the early stages of register allocation, a
330 GNU Compiler Collection (GCC) Internals
The only difference between the expression codes insn_list and expr_list is that the
first operand of an insn_list is assumed to be an insn and is printed in debugging dumps
as the insn’s unique id; the first operand of an expr_list is printed in the ordinary way as
an expression.
output is used. One way of obtaining this information is to use the RTL SSA form, which
provides a Static Single Assignment representation of the RTL instructions.
The RTL SSA code is located in the rtl-ssa subdirectory of the GCC source tree. This
section only gives a brief overview of it; please see the comments in the source code for more
details.
delete crtl->ssa;
crtl->ssa = nullptr;
The free_dominance_info call is necessary because dominance information is not cur-
rently maintained between RTL passes. The next two lines commit any changes to the RTL
instructions that were queued for later; see the comment above the declaration of perform_
pending_updates for details. The final two lines discard the RTL SSA form and free the
associated memory.
function. This means that if any path through the function can execute an instruction I1
and then later execute an instruction I2 for the first time, I1 appears before I2 in the list1 .
Two RTL SSA instructions can be compared to find which instruction occurs earlier than
the other in the RPO. One way to do this is to use the C++ comparison operators, such as:
*insn1 < *insn2
Another way is to use the compare_with function:
insn1->compare_with (insn2)
This expression is greater than zero if insn1 comes after insn2 in the RPO, less than zero
if insn1 comes before insn2 in the RPO, or zero if insn1 and insn2 are the same. This order
is maintained even if instructions are added to the function or moved around.
The main purpose of rtl_ssa::insn_info is to hold SSA information about an instruc-
tion. However, it also caches certain properties of the instruction, such as whether it is an
inline assembly instruction, whether it has volatile accesses, and so on.
Next, the pass should create an rtl_ssa::insn_change object for the instruction that
it wants to change. This object specifies several things:
• what the instruction’s new list of uses should be (new_uses). By default this is the
same as the instruction’s current list of uses.
• what the instruction’s new list of definitions should be (new_defs). By default this is
the same as the instruction’s current list of definitions.
• where the instruction should be located (move_range). This is a range of instructions
after which the instruction could be placed, represented as an rtl_ssa::insn_range.
By default the instruction must remain at its current position.
If a pass was attempting to change all these properties of an instruction insn, it might
do something like this:
rtl_ssa::insn_change change (insn);
change.new_defs = ...;
change.new_uses = ...;
change.move_range = ...;
This rtl_ssa::insn_change only describes something that the pass might do; at this
stage, nothing has actually changed.
As noted above, the default move_range requires the instruction to remain where it is.
At the other extreme, it is possible to allow the instruction to move anywhere within its
extended basic block, provided that all the new uses and definitions can be performed at
the new location. The way to do this is:
change.move_range = insn->ebb ()->insn_range ();
In either case, the next step is to make sure that move range is consistent with the new
uses and definitions. The way to do this is:
if (!rtl_ssa::restrict_movement (change))
return false;
This function tries to limit move_range to a range of instructions at which new_uses
and new_defs can be correctly performed. It returns true on success or false if no suitable
location exists.
The pass should also tentatively change the pattern of the instruction to whatever form
the pass wants the instruction to have. This should use the facilities provided by recog.cc.
For example:
rtl_insn *rtl = insn->rtl ();
insn_change_watermark watermark;
validate_change (rtl, &PATTERN (rtl), new_pat, 1);
will tentatively replace insn’s pattern with new_pat.
These changes and the construction of the rtl_ssa::insn_change can happen in either
order or be interleaved.
After the tentative changes to the instruction are complete, the pass should check whether
the new pattern matches a target instruction or satisfies the requirements of an inline asm:
if (!rtl_ssa::recog (attempt, change))
return false;
This step might change the instruction pattern further in order to make it match. It
might also add new definitions or restrict the range of the move. For example, if the new
pattern did not match in its original form, but could be made to match by adding a clobber
Chapter 14: RTL Representation 339
of the flags register, rtl_ssa::recog will check whether the flags register is free at an
appropriate point. If so, it will add a clobber of the flags register to new_defs and restrict
move_range to the locations at which the flags register can be safely clobbered.
Even if the proposed new instruction is valid according to rtl_ssa::recog, the change
might not be worthwhile. For example, when optimizing for speed, the new instruction
might turn out to be slower than the original one. When optimizing for size, the new
instruction might turn out to be bigger than the original one.
Passes should check for this case using change_is_worthwhile. For example:
if (!rtl_ssa::change_is_worthwhile (change))
return false;
If the change passes this test too then the pass can perform the change using:
confirm_change_group ();
crtl->ssa->change_insn (change);
Putting all this together, the change has the following form:
auto attempt = crtl->ssa->new_change_attempt ();
if (!rtl_ssa::restrict_movement (change))
return false;
insn_change_watermark watermark;
// Use validate_change etc. to change INSN's pattern.
...
if (!rtl_ssa::recog (attempt, change)
|| !rtl_ssa::change_is_worthwhile (change))
return false;
confirm_change_group ();
crtl->ssa->change_insn (change);
insn_change_watermark watermark;
// Use validate_change etc. to change INSN1's and INSN2's patterns.
...
if (!rtl_ssa::recog_ignoring (attempt, change1, is_changing)
|| !rtl_ssa::recog_ignoring (attempt, change2, is_changing)
|| !rtl_ssa::changes_are_worthwhile (changes)
|| !crtl->ssa->verify_insn_changes (changes))
return false;
confirm_change_group ();
crtl->ssa->change_insns (changes);
• During initial RTL generation, shared structure is freely introduced. After all the RTL
for a function has been generated, all shared structure is copied by unshare_all_rtl
in emit-rtl.cc, after which the above rules are guaranteed to be followed.
• During the combiner pass, shared structure within an insn can exist temporarily. How-
ever, the shared structure is copied before the combiner is finished with the insn. This
is done by calling copy_rtx_if_shared, which is a subroutine of unshare_all_rtl.
since the basic_block data type is used to represent blocks in both major intermediate
representations of GCC (GIMPLE and RTL), there are pointers to the head and end of a
basic block for both representations, stored in intermediate representation specific data in
the il field of struct basic_block_def.
For RTL, these pointers are BB_HEAD and BB_END.
In the RTL representation of a function, the instruction stream contains not only the
“real” instructions, but also notes or insn notes (to distinguish them from reg notes). Any
function that moves or duplicates the basic blocks needs to take care of updating of these
notes. Many of these notes expect that the instruction stream consists of linear regions, so
updating can sometimes be tedious. All types of insn notes are defined in insn-notes.def.
In the RTL function representation, the instructions contained in a basic block always
follow a NOTE_INSN_BASIC_BLOCK, but zero or more CODE_LABEL nodes can precede the
block note. A basic block ends with a control flow instruction or with the last instruction
before the next CODE_LABEL or NOTE_INSN_BASIC_BLOCK. By definition, a CODE_LABEL
cannot appear in the middle of the instruction stream of a basic block.
In addition to notes, the jump table vectors are also represented as “pseudo-instructions”
inside the insn stream. These vectors never appear in the basic block and should always be
placed just after the table jump instructions referencing them. After removing the table-
jump it is often difficult to eliminate the code computing the address and referencing the
vector, so cleaning up these vectors is postponed until after liveness analysis. Thus the
jump table vectors may appear in the insn stream unreferenced and without any purpose.
Before any edge is made fall-thru, the existence of such construct in the way needs to be
checked by calling can_fallthru function.
For the GIMPLE representation, the PHI nodes and statements contained in a basic block
are in a gimple_seq pointed to by the basic block intermediate language specific pointers.
Abstract containers and iterators are used to access the PHI nodes and statements in a
basic blocks. These iterators are called GIMPLE statement iterators (GSIs). Grep for
^gsi in the various gimple-* and tree-* files. There is a gimple_stmt_iterator type for
iterating over all kinds of statement, and a gphi_iterator subclass for iterating over PHI
nodes. The following snippet will pretty-print all PHI nodes the statements of the current
function in the GIMPLE representation.
basic_block bb;
FOR_EACH_BB (bb)
{
gphi_iterator pi;
gimple_stmt_iterator si;
15.2 Edges
Edges represent possible control flow transfers from the end of some basic block A to the
head of another basic block B. We say that A is a predecessor of B, and B is a successor
of A. Edges are represented in GCC with the edge data type. Each edge acts as a link
between two basic blocks: The src member of an edge points to the predecessor basic block
of the dest basic block. The members preds and succs of the basic_block data type
point to type-safe vectors of edges to the predecessors and successors of the block.
When walking the edges in an edge vector, edge iterators should be used. Edge iterators
are constructed using the edge_iterator data structure and several methods are available
to operate on them:
ei_start This function initializes an edge_iterator that points to the first edge in a
vector of edges.
ei_last This function initializes an edge_iterator that points to the last edge in a
vector of edges.
ei_end_p This predicate is true if an edge_iterator represents the last edge in an edge
vector.
ei_one_before_end_p
This predicate is true if an edge_iterator represents the second last edge in
an edge vector.
ei_next This function takes a pointer to an edge_iterator and makes it point to the
next edge in the sequence.
ei_prev This function takes a pointer to an edge_iterator and makes it point to the
previous edge in the sequence.
ei_edge This function returns the edge currently pointed to by an edge_iterator.
ei_safe_edge
This function returns the edge currently pointed to by an edge_iterator,
but returns NULL if the iterator is pointing at the end of the sequence. This
function has been provided for existing code makes the assumption that a NULL
edge indicates the end of the sequence.
The convenience macro FOR_EACH_EDGE can be used to visit all of the edges in a sequence
of predecessor or successor edges. It must not be used when an element might be removed
during the traversal, otherwise elements will be missed. Here is an example of how to use
the macro:
edge e;
edge_iterator ei;
stream just always starts a new basic block. In this case a fall-thru edge links the basic
block to the first following basic block. But there are several other reasons why edges may
be created. The flags field of the edge data type is used to store information about the
type of edge we are dealing with. Each edge is of one of the following types:
jump No type flags are set for edges corresponding to jump instructions. These edges
are used for unconditional or conditional jumps and in RTL also for table jumps.
They are the easiest to manipulate as they may be freely redirected when the
flow graph is not in SSA form.
fall-thru Fall-thru edges are present in case where the basic block may continue exe-
cution to the following one without branching. These edges have the EDGE_
FALLTHRU flag set. Unlike other types of edges, these edges must come into
the basic block immediately following in the instruction stream. The function
force_nonfallthru is available to insert an unconditional jump in the case
that redirection is needed. Note that this may require creation of a new basic
block.
exception handling
Exception handling edges represent possible control transfers from a trapping
instruction to an exception handler. The definition of “trapping” varies. In
C++, only function calls can throw, but for Ada exceptions like division by zero
or segmentation fault are defined and thus each instruction possibly throwing
this kind of exception needs to be handled as control flow instruction. Exception
edges have the EDGE_ABNORMAL and EDGE_EH flags set.
When updating the instruction stream it is easy to change possibly trapping
instruction to non-trapping, by simply removing the exception edge. The op-
posite conversion is difficult, but should not happen anyway. The edges can be
eliminated via purge_dead_edges call.
In the RTL representation, the destination of an exception edge is specified by
REG_EH_REGION note attached to the insn. In case of a trapping call the EDGE_
ABNORMAL_CALL flag is set too. In the GIMPLE representation, this extra flag is
not set.
In the RTL representation, the predicate may_trap_p may be used to check
whether instruction still may trap or not. For the tree representation, the
tree_could_trap_p predicate is available, but this predicate only checks for
possible memory traps, as in dereferencing an invalid pointer location.
sibling calls
Sibling calls or tail calls terminate the function in a non-standard way and thus
an edge to the exit must be present. EDGE_SIBCALL and EDGE_ABNORMAL are
set in such case. These edges only exist in the RTL representation.
computed jumps
Computed jumps contain edges to all labels in the function referenced from
the code. All those edges have EDGE_ABNORMAL flag set. The edges used to
represent computed jumps often cause compile time performance problems,
since functions consisting of many taken labels and many computed jumps may
have very dense flow graphs, so these edges need to be handled with special
Chapter 15: Control Flow Graph 347
care. During the earlier stages of the compilation process, GCC tries to avoid
such dense flow graphs by factoring computed jumps. For example, given the
following series of jumps,
goto *x;
[ ... ]
goto *x;
[ ... ]
goto *x;
[ ... ]
factoring the computed jumps results in the following code sequence which has
a much simpler flow graph:
goto y;
[ ... ]
goto y;
[ ... ]
goto y;
[ ... ]
y:
goto *x;
However, the classic problem with this transformation is that it has a runtime
cost in there resulting code: An extra jump. Therefore, the computed jumps
are un-factored in the later passes of the compiler (in the pass called pass_
duplicate_computed_gotos). Be aware of that when you work on passes in
that area. There have been numerous examples already where the compile time
for code with unfactored computed jumps caused some serious headaches.
nonlocal goto handlers
GCC allows nested functions to return into caller using a goto to a label passed
to as an argument to the callee. The labels passed to nested functions contain
special code to cleanup after function call. Such sections of code are referred to
as “nonlocal goto receivers”. If a function contains such nonlocal goto receivers,
an edge from the call to the label is created with the EDGE_ABNORMAL and EDGE_
ABNORMAL_CALL flags set.
function entry points
By definition, execution of function starts at basic block 0, so there is always
an edge from the ENTRY_BLOCK_PTR to basic block 0. There is no GIMPLE
representation for alternate entry points at this moment. In RTL, alternate
entry points are specified by CODE_LABEL with LABEL_ALTERNATE_NAME defined.
This feature is currently used for multiple entry point prologues and is limited
to post-reload passes only. This can be used by back-ends to emit alternate
prologues for functions called from different contexts. In future full support for
multiple entry functions defined by Fortran 90 needs to be implemented.
function exits
In the pre-reload representation a function terminates after the last instruction
in the insn chain and no explicit return instructions are used. This corresponds
348 GNU Compiler Collection (GCC) Internals
to the fall-thru edge into exit block. After reload, optimal RTL epilogues are
used that use explicit (conditional) return instructions that are represented by
edges with no flags set.
PROB macro) since they are used when instructions are output to the assembly file and the
flow graph is no longer maintained.
The probability that control flow arrives via a given edge to its destination basic block
is called reverse probability and is not directly represented, but it may be easily computed
from frequencies of basic blocks.
Updating profile information is a delicate task that can unfortunately not be easily in-
tegrated with the CFG manipulation API. Many of the functions and hooks to modify
the CFG, such as redirect_edge_and_branch, do not have enough information to easily
update the profile, so updating it is in the majority of cases left up to the caller. It is
difficult to uncover bugs in the profile updating code, because they manifest themselves
only by producing worse code, and checking profile consistency is not possible because of
numeric error accumulation. Hence special attention needs to be given to this issue in each
pass that modifies the CFG.
It is important to point out that REG_BR_PROB_BASE and BB_FREQ_BASE are both set low
enough to be possible to compute second power of any frequency or probability in the flow
graph, it is not possible to even square the count field, as modern CPUs are fast enough to
execute $2^32$ operations quickly.
gsi_last This function initializes a gimple_stmt_iterator that points to the last state-
ment in a basic block.
gsi_end_p
This predicate is true if a gimple_stmt_iterator represents the end of a basic
block.
gsi_next This function takes a gimple_stmt_iterator and makes it point to its succes-
sor.
gsi_prev This function takes a gimple_stmt_iterator and makes it point to its prede-
cessor.
gsi_insert_after
This function inserts a statement after the gimple_stmt_iterator passed in.
The final parameter determines whether the statement iterator is updated to
point to the newly inserted statement, or left pointing to the original statement.
gsi_insert_before
This function inserts a statement before the gimple_stmt_iterator passed in.
The final parameter determines whether the statement iterator is updated to
point to the newly inserted statement, or left pointing to the original statement.
gsi_remove
This function removes the gimple_stmt_iterator passed in and rechains the
remaining statements in a basic block, if any.
In the RTL representation, the macros BB_HEAD and BB_END may be used to get the head
and end rtx of a basic block. No abstract iterators are defined for traversing the insn chain,
but you can just use NEXT_INSN and PREV_INSN instead. See Section 14.19 [Insns], page 322.
Usually a code manipulating pass simplifies the instruction stream and the flow of control,
possibly eliminating some edges. This may for example happen when a conditional jump
is replaced with an unconditional jump. Updating of edges is not transparent and each
optimization pass is required to do so manually. However only few cases occur in practice.
The pass may call purge_dead_edges on a given basic block to remove superfluous edges,
if any.
Another common scenario is redirection of branch instructions, but this is best modeled as
redirection of edges in the control flow graph and thus use of redirect_edge_and_branch is
preferred over more low level functions, such as redirect_jump that operate on RTL chain
only. The CFG hooks defined in cfghooks.h should provide the complete API required for
manipulating and maintaining the CFG.
It is also possible that a pass has to insert control flow instruction into the middle of a
basic block, thus creating an entry point in the middle of the basic block, which is impossible
by definition: The block must be split to make sure it only has one entry point, i.e. the
head of the basic block. The CFG hook split_block may be used when an instruction in
the middle of a basic block has to become the target of a jump or branch instruction.
For a global optimizer, a common operation is to split edges in the flow graph and
insert instructions on them. In the RTL representation, this can be easily done using the
insert_insn_on_edge function that emits an instruction “on the edge”, caching it for a
later commit_edge_insertions call that will take care of moving the inserted instructions
Chapter 15: Control Flow Graph 351
off the edge into the instruction stream contained in a basic block. This includes the
creation of new basic blocks where needed. In the GIMPLE representation, the equivalent
functions are gsi_insert_on_edge which inserts a block statement iterator on an edge,
and gsi_commit_edge_inserts which flushes the instruction to actual instruction stream.
While debugging the optimization pass, the verify_flow_info function may be useful
to find bugs in the control flow graph updating code.
Each loop is guaranteed to be visited exactly once, regardless of the changes to the loop
tree, and the loops may be removed during the traversal. The newly created loops are never
traversed, if they need to be visited, this must be done separately after their creation.
Each basic block contains the reference to the innermost loop it belongs to (loop_father).
For this reason, it is only possible to have one struct loops structure initialized at the
same time for each CFG. The global variable current_loops contains the struct loops
structure. Many of the loop manipulation functions assume that dominance information is
up-to-date.
The loops are analyzed through loop_optimizer_init function. The argument of this
function is a set of flags represented in an integer bitmask. These flags specify what other
properties of the loop structures should be calculated/enforced and preserved later:
• LOOPS_MAY_HAVE_MULTIPLE_LATCHES: If this flag is set, no changes to CFG will be
performed in the loop analysis, in particular, loops with multiple latch edges will not
be disambiguated. If a loop has multiple latches, its latch block is set to NULL. Most
of the loop manipulation functions will not work for loops in this shape. No other flags
that require CFG changes can be passed to loop optimizer init.
• LOOPS_HAVE_PREHEADERS: Forwarder blocks are created in such a way that each loop
has only one entry edge, and additionally, the source block of this entry edge has only
one successor. This creates a natural place where the code can be moved out of the
loop, and ensures that the entry edge of the loop leads from its immediate super-loop.
• LOOPS_HAVE_SIMPLE_LATCHES: Forwarder blocks are created to force the latch block
of each loop to have only one successor. This ensures that the latch of the loop does
not belong to any of its sub-loops, and makes manipulation with the loops significantly
easier. Most of the loop manipulation functions assume that the loops are in this shape.
Note that with this flag, the “normal” loop without any control flow inside and with
one exit consists of two basic blocks.
• LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS: Basic blocks and edges in the strongly
connected components that are not natural loops (have more than one entry block) are
marked with BB_IRREDUCIBLE_LOOP and EDGE_IRREDUCIBLE_LOOP flags. The flag is
not set for blocks and edges that belong to natural loops that are in such an irreducible
region (but it is set for the entry and exit edges of such a loop, if they lead to/from
this region).
• LOOPS_HAVE_RECORDED_EXITS: The lists of exits are recorded and updated for each
loop. This makes some functions (e.g., get_loop_exit_edges) more efficient. Some
functions (e.g., single_exit) can be used only if the lists of exits are recorded.
These properties may also be computed/enforced later, using functions create_
preheaders, force_single_succ_latches, mark_irreducible_loops and
record_loop_exits. The properties can be queried using loops_state_satisfies_p.
The memory occupied by the loops structures should be freed with loop_optimizer_
finalize function. When loop structures are setup to be preserved across passes this
function reduces the information to be kept up-to-date to a minimum (only LOOPS_MAY_
HAVE_MULTIPLE_LATCHES set).
The CFG manipulation functions in general do not update loop structures. Specialized
versions that additionally do so are provided for the most common tasks. On GIMPLE,
Chapter 16: Analysis and Representation of Loops 355
cleanup_tree_cfg_loop function can be used to cleanup CFG while updating the loops
structures if current_loops is set.
At the moment loop structure is preserved from the start of GIMPLE loop optimizations
until the end of RTL loop optimizations. During this time a loop can be tracked by its
struct loop and number.
expression and of base and step must be the same. A variable has evolution POLYNOMIAL_
CHREC(base, step, loop) if it is (in the specified loop) equivalent to x_1 in the following
example
while (...)
{
x_1 = phi (base, x_2);
x_2 = x_1 + step;
}
Note that this includes the language restrictions on the operations. For example, if we
compile C code and x has signed type, then the overflow in addition would cause undefined
behavior, and we may assume that this does not happen. Hence, the value with this SCEV
cannot overflow (which restricts the number of iterations of such a loop).
In many cases, one wants to restrict the attention just to affine induction variables.
In this case, the extra expressive power of SCEV is not useful, and may complicate the
optimizations. In this case, simple_iv function may be used to analyze a value – the result
is a loop-invariant base and step.
is defined as the number of executions of the loop latch. In many cases, it is not possible
to determine the number of iterations unconditionally – the determined number is correct
only if some assumptions are satisfied. The analysis tries to verify these conditions using
the information contained in the program; if it fails, the conditions are returned together
with the result. The following information and conditions are provided by the analysis:
• assumptions: If this condition is false, the rest of the information is invalid.
• noloop_assumptions on RTL, may_be_zero on GIMPLE: If this condition is true, the
loop exits in the first iteration.
• infinite: If this condition is true, the loop is infinite. This condition is only avail-
able on RTL. On GIMPLE, conditions for finiteness of the loop are included in
assumptions.
• niter_expr on RTL, niter on GIMPLE: The expression that gives number of iter-
ations. The number of iterations is defined as the number of executions of the loop
latch.
Both on GIMPLE and on RTL, it necessary for the induction variable analysis framework
to be initialized (SCEV on GIMPLE, loop-iv on RTL). On GIMPLE, the results are stored
to struct tree_niter_desc structure. Number of iterations before the loop is exited
through a given exit can be determined using number_of_iterations_exit function. On
RTL, the results are returned in struct niter_desc structure. The corresponding function
is named check_simple_exit. There are also functions that pass through all the exits of
a loop and try to find one with easy to determine number of iterations – find_loop_niter
on GIMPLE and find_simple_exit on RTL. Finally, there are functions that provide the
same information, but additionally cache it, so that repeated calls to number of iterations
are not so costly – number_of_latch_executions on GIMPLE and get_simple_loop_
desc on RTL.
Note that some of these functions may behave slightly differently than others – some of
them return only the expression for the number of iterations, and fail if there are some
assumptions. The function number_of_latch_executions works only for single-exit loops.
The function number_of_cond_exit_executions can be used to determine number of ex-
ecutions of the exit condition of a single-exit loop (i.e., the number_of_latch_executions
increased by one).
On GIMPLE, below constraint flags affect semantics of some APIs of number of iterations
analyzer:
• LOOP_C_INFINITE: If this constraint flag is set, the loop is known to be infinite. APIs
like number_of_iterations_exit can return false directly without doing any analysis.
• LOOP_C_FINITE: If this constraint flag is set, the loop is known to be finite, in other
words, loop’s number of iterations can be computed with assumptions be true.
Generally, the constraint flags are set/cleared by consumers which are loop optimizers.
It’s also the consumers’ responsibility to set/clear constraints correctly. Failing to do that
might result in hard to track down bugs in scev/niter consumers. One typical use case is
vectorizer: it drives number of iterations analyzer by setting LOOP_C_FINITE and vectorizes
possibly infinite loop by versioning loop with analysis result. In return, constraints set by
consumers can also help number of iterations analyzer in following optimizers. For example,
niter of a loop versioned under assumptions is valid unconditionally.
360 GNU Compiler Collection (GCC) Internals
Other constraints may be added in the future, for example, a constraint indicating that
loops’ latch must roll thus may_be_zero would be false unconditionally.
Two data references can be compared only if at least one of these two representations
has all its fields filled for both data references.
The current strategy for data dependence tests is as follows: If both a and b are
represented as arrays, compare a.base_object and b.base_object; if they are equal,
apply dependence tests (use access functions based on base objects). Else if both a and
b are represented as pointers, compare a.first_location and b.first_location; if
they are equal, apply dependence tests (use access functions based on first location).
However, if a and b are represented differently, only try to prove that the bases are
definitely different.
• Aliasing information.
• Alignment information.
The structure describing the relation between two data references is data_dependence_
relation and the shorter name for a pointer to such a structure is ddr_p. This structure
contains:
• a pointer to each data reference,
• a tree node are_dependent that is set to chrec_known if the analysis has proved that
there is no dependence between these two data references, chrec_dont_know if the
analysis was not able to determine any useful result and potentially there could exist
a dependence between these data references, and are_dependent is set to NULL_TREE
if there exist a dependence relation between the data references, and the description
of this dependence relation is given in the subscripts, dir_vects, and dist_vects
arrays,
• a boolean that determines whether the dependence relation can be represented by a
classical distance vector,
• an array subscripts that contains a description of each subscript of the data references.
Given two array accesses a subscript is the tuple composed of the access functions for
a given dimension. For example, given A[f1][f2][f3] and B[g1][g2][g3], there are
three subscripts: (f1, g1), (f2, g2), (f3, g3).
• two arrays dir_vects and dist_vects that contain classical representations of the
data dependences under the form of direction and distance dependence vectors,
• an array of loops loop_nest that contains the loops to which the distance and direction
vectors refer to.
Several functions for pretty printing the information extracted by the data dependence
analysis are available: dump_ddrs prints with a maximum verbosity the details of a data
dependence relations array, dump_dist_dir_vectors prints only the classical distance and
direction vectors for a data dependence relations array, and dump_data_references prints
the details of the data references contained in a data reference array.
363
17 Machine Descriptions
A machine description has two parts: a file of instruction patterns (.md file) and a C header
file of macro definitions.
The .md file for a target machine contains a pattern for each instruction that the target
machine supports (or at least each instruction that is worth telling the compiler about).
It may also contain comments. A semicolon causes the rest of the line to be a comment,
unless the semicolon is inside a quoted string.
See the next chapter for information on the C header file.
returns the instruction’s rtx pattern. The compiler also assigns the instruction a unique
code ‘CODE_FOR_n’, with all such codes belonging to an enum called insn_code.
These names serve one of two purposes. The first is to indicate that the instruction
performs a certain standard job for the RTL-generation pass of the compiler, such as
a move, an addition, or a conditional jump. The second is to help the target generate
certain target-specific operations, such as when implementing target-specific intrinsic
functions.
It is better to prefix target-specific names with the name of the target, to avoid any
clash with current or future standard names.
The absence of a name is indicated by writing an empty string where the name should
go. Nameless instruction patterns are never used for generating RTL code, but they
may permit several simpler insns to be combined later on.
For the purpose of debugging the compiler, you may also specify a name beginning
with the ‘*’ character. Such a name is used only for identifying the instruction in RTL
dumps; it is equivalent to having a nameless pattern for all other purposes. Names
beginning with the ‘*’ character are not required to be unique.
The name may also have the form ‘@n’. This has the same effect as a name ‘n’, but
in addition tells the compiler to generate further helper functions; see Section 17.24.5
[Parameterized Names], page 516, for details.
2. The RTL template: This is a vector of incomplete RTL expressions which describe
the semantics of the instruction (see Section 17.4 [RTL Template], page 365). It is
incomplete because it may contain match_operand, match_operator, and match_dup
expressions that stand for operands of the instruction.
If the vector has multiple elements, the RTL template is treated as a parallel expres-
sion.
3. The condition: This is a string which contains a C expression. When the compiler
attempts to match RTL against a pattern, the condition is evaluated. If the condition
evaluates to true, the match is permitted. The condition may be an empty string,
which is treated as always true.
For a named pattern, the condition may not depend on the data in the insn being
matched, but only the target-machine-type flags. The compiler needs to test these
conditions during initialization in order to learn exactly which named instructions are
available in a particular run.
For nameless patterns, the condition is applied only when matching an individual insn,
and only after the insn has matched the pattern’s recognition template. The insn’s
operands may be found in the vector operands.
An instruction condition cannot become more restrictive as compilation progresses.
If the condition accepts a particular RTL instruction at one stage of compilation,
it must continue to accept that instruction until the final pass. For example,
‘!reload_completed’ and ‘can_create_pseudo_p ()’ are both invalid instruction
conditions, because they are true during the earlier RTL passes and false during the
later ones. For the same reason, if a condition accepts an instruction before register
allocation, it cannot later try to control register allocation by excluding certain
register or value combinations.
Chapter 17: Machine Descriptions 365
Construction involves substituting specified operands into a copy of the template. Match-
ing involves determining the values that serve as the operands in the insn being matched.
Both of these activities are controlled by special expression types that direct matching and
substitution of the operands.
(match_operand:m n predicate constraint)
This expression is a placeholder for operand number n of the insn. When
constructing an insn, operand number n will be substituted at this point. When
matching an insn, whatever appears at this position in the insn will be taken
as operand number n; but it must satisfy predicate or this instruction pattern
will not match at all.
Operand numbers must be chosen consecutively counting from zero in each
instruction pattern. There may be only one match_operand expression in the
pattern for each operand number. Usually operands are numbered in the order
of appearance in match_operand expressions. In the case of a define_expand,
any operand numbers used only in match_dup expressions have higher values
than all other operand numbers.
predicate is a string that is the name of a function that accepts two arguments,
an expression and a machine mode. See Section 17.8 [Predicates], page 374.
During matching, the function will be called with the putative operand as the
expression and m as the mode argument (if m is not specified, VOIDmode will be
used, which normally causes predicate to accept any mode). If it returns zero,
this instruction pattern fails to match. predicate may be an empty string; then
it means no test is to be done on the operand, so anything which occurs in this
position is valid.
Most of the time, predicate will reject modes other than m—but not always.
For example, the predicate address_operand uses m as the mode of memory
ref that the address should be valid for. Many predicates accept const_int
nodes even though their mode is VOIDmode.
constraint controls reloading and the choice of the best register class to use for
a value, as explained later (see Section 17.9 [Constraints], page 379). If the
constraint would be an empty string, it can be omitted.
People are often unclear on the difference between the constraint and the predi-
cate. The predicate helps decide whether a given insn matches the pattern. The
constraint plays no role in this decision; instead, it controls various decisions in
the case of an insn which does match.
(match_scratch:m n constraint)
This expression is also a placeholder for operand number n and indicates that
operand must be a scratch or reg expression.
When matching patterns, this is equivalent to
(match_operand:m n "scratch_operand" constraint)
but, when generating RTL, it produces a (scratch:m) expression.
If the last few expressions in a parallel are clobber expressions whose
operands are either a hard register or match_scratch, the combiner can add
or delete them when necessary. See Section 14.15 [Side Effects], page 315.
Chapter 17: Machine Descriptions 367
(match_dup n)
This expression is also a placeholder for operand number n. It is used when the
operand needs to appear more than once in the insn.
In construction, match_dup acts just like match_operand: the operand is sub-
stituted into the insn being constructed. But in matching, match_dup behaves
differently. It assumes that operand number n has already been determined by
a match_operand appearing earlier in the recognition template, and it matches
only an identical-looking expression.
Note that match_dup should not be used to tell the compiler that a particular
register is being used for two operands (example: add that adds one register to
another; the second register is both an input operand and the output operand).
Use a matching constraint (see Section 17.9.1 [Simple Constraints], page 379)
for those. match_dup is for the cases where one operand is used in two places
in the template, such as an instruction that computes both a quotient and a
remainder, where the opcode takes two input operands but the RTL template
has to refer to each of those twice; once for the quotient pattern and once for
the remainder pattern.
(match_operator:m n predicate [operands...])
This pattern is a kind of placeholder for a variable RTL expression code.
When constructing an insn, it stands for an RTL expression whose expression
code is taken from that of operand n, and whose operands are constructed from
the patterns operands.
When matching an expression, it matches an expression if the function predi-
cate returns nonzero on that expression and the patterns operands match the
operands of the expression.
Suppose that the function commutative_operator is defined as follows, to
match any expression whose operator is one of the commutative arithmetic
operators of RTL and whose mode is mode:
int
commutative_operator (x, mode)
rtx x;
machine_mode mode;
{
enum rtx_code code = GET_CODE (x);
if (GET_MODE (x) != mode)
return 0;
return (GET_RTX_CLASS (code) == RTX_COMM_ARITH
|| code == EQ || code == NE);
}
Then the following pattern will match any RTL expression consisting of a com-
mutative operator applied to two general operands:
(match_operator:SI 3 "commutative_operator"
[(match_operand:SI 1 "general_operand" "g")
(match_operand:SI 2 "general_operand" "g")])
Here the vector [operands...] contains two patterns because the expressions
to be matched all contain two operands.
When this pattern does match, the two operands of the commutative operator
are recorded as operands 1 and 2 of the insn. (This is done by the two instances
368 GNU Compiler Collection (GCC) Internals
(match_par_dup n [subpat...])
Like match_op_dup, but for match_parallel instead of match_operator.
nonstandard cases can be defined in the PRINT_OPERAND macro. You must also define
which punctuation characters are valid with the PRINT_OPERAND_PUNCT_VALID_P macro.
The template may generate multiple assembler instructions. Write the text for the in-
structions, with ‘\;’ between them.
When the RTL contains two operands which are required by constraint to match each
other, the output template must refer only to the lower-numbered operand. Matching
operands are not always identical, and the rest of the compiler arranges to put the proper
RTL expression for printing into the lower-numbered operand.
One use of nonstandard letters or punctuation following ‘%’ is to distinguish between
different assembler languages for the same machine; for example, Motorola syntax versus
MIT syntax for the 68000. Motorola syntax requires periods in most opcode names, while
MIT syntax does not. For example, the opcode ‘movel’ in MIT syntax is ‘move.l’ in
Motorola syntax. The same file of patterns is used for both kinds of output syntax, but
the character sequence ‘%.’ is used in each place where Motorola syntax wants a period.
The PRINT_OPERAND macro for Motorola syntax defines the sequence to output a period;
the macro for MIT syntax defines it to do nothing.
As a special case, a template consisting of the single character # instructs the compiler
to first split the insn, and then output the resulting instructions separately. This helps
eliminate redundancy in the output templates. If you have a define_insn that needs
to emit multiple assembler instructions, and there is a matching define_split already
defined, then you can simply use # as the output template instead of writing an output
template that emits the multiple assembler instructions.
Note that # only has an effect while generating assembly code; it does not affect whether
a split occurs earlier. An associated define_split must exist and it must be suitable for
use after register allocation.
If the macro ASSEMBLER_DIALECT is defined, you can use construct of the form
‘{option0|option1|option2}’ in the templates. These describe multiple variants of
assembler language syntax. See Section 18.20.7 [Instruction Output], page 660.
addr %2,%0
addm %2,%0")
If the output control string starts with a ‘*’, then it is not an output template but rather a
piece of C program that should compute a template. It should execute a return statement
to return the template-string you want. Most such templates use C string literals, which
require doublequote characters to delimit them. To include these doublequote characters in
the string, prefix each one with ‘\’.
If the output control string is written as a brace block instead of a double-quoted string,
it is automatically assumed to be C code. In that case, it is not necessary to put in a leading
asterisk, or to escape the doublequotes surrounding C string literals.
The operands may be found in the array operands, whose C data type is rtx [].
It is very common to select different ways of generating assembler code based on whether
an immediate operand is within a certain range. Be careful when doing this, because the
result of INTVAL is an integer on the host machine. If the host machine has more bits in an
int than the target machine has in the mode in which the constant will be used, then some
of the bits you get from INTVAL will be superfluous. For proper results, you must carefully
disregard the values of those bits.
It is possible to output an assembler instruction and then go on to output or compute
more of them, using the subroutine output_asm_insn. This receives two arguments: a
template-string and a vector of operands. The vector may be operands, or it may be
another array of rtx that you declare locally and initialize yourself.
When an insn pattern has multiple alternatives in its constraints, often the appearance
of the assembler code is determined mostly by which alternative was matched. When this
is so, the C code can test the variable which_alternative, which is the ordinal number of
the alternative that was actually satisfied (0 for the first, 1 for the second alternative, etc.).
For example, suppose there are two opcodes for storing zero, ‘clrreg’ for registers and
‘clrmem’ for memory locations. Here is how a pattern could use which_alternative to
choose between them:
(define_insn ""
[(set (match_operand:SI 0 "general_operand" "=r,m")
(const_int 0))]
""
{
return (which_alternative == 0
? "clrreg %0" : "clrmem %0");
})
The example above, where the assembler code to generate was solely determined by the
alternative, could also have been specified as follows, having the output control string start
with a ‘@’:
(define_insn ""
[(set (match_operand:SI 0 "general_operand" "=r,m")
(const_int 0))]
""
"@
clrreg %0
clrmem %0")
If you just need a little bit of C code in one (or a few) alternatives, you can use ‘*’ inside
of a ‘@’ multi-alternative template:
372 GNU Compiler Collection (GCC) Internals
(define_insn ""
[(set (match_operand:SI 0 "general_operand" "=r,<,m")
(const_int 0))]
""
"@
clrreg %0
* return stack_mem_p (operands[0]) ? \"push 0\" : \"clrmem %0\";
clrmem %0")
This syntax puts the constraints and attributes on the same horizontal line as the in-
struction assembly template.
As an example
(define_insn_and_split ""
[(set (match_operand:SI 0 "nonimmediate_operand" "=r,k,r,r,r,r")
(match_operand:SI 1 "aarch64_mov_operand" " r,r,k,M,n,Usv"))]
""
"@
mov\\t%w0, %w1
mov\\t%w0, %w1
mov\\t%w0, %w1
mov\\t%w0, %1
#
* return aarch64_output_sve_cnt_immediate ('cnt', '%x0', operands[1]);"
"&& true"
[(const_int 0)]
{
aarch64_expand_mov_immediate (operands[0], operands[1]);
DONE;
}
[(set_attr "type" "mov_reg,mov_reg,mov_reg,mov_imm,mov_imm,mov_imm")
(set_attr "arch" "*,*,*,*,*,sve")
(set_attr "length" "4,4,4,4,*, 4")
]
)
(define_insn_and_split ""
[(set (match_operand:SI 0 "nonimmediate_operand")
(match_operand:SI 1 "aarch64_mov_operand"))]
""
{@ [cons: =0, 1; attrs: type, arch, length]
[r , r ; mov_reg , * , 4] mov\t%w0, %w1
[k , r ; mov_reg , * , 4] ^
[r , k ; mov_reg , * , 4] ^
[r , M ; mov_imm , * , 4] mov\t%w0, %1
[r , n ; mov_imm , * , *] #
[r , Usv; mov_imm , sve , 4] << aarch64_output_sve_cnt_immediate ("cnt", "%x0", operands[1]);
}
"&& true"
[(const_int 0)]
{
aarch64_expand_mov_immediate (operands[0], operands[1]);
DONE;
}
)
• It is possible to use the ‘attrs’ list to specify some attributes and to use the normal
set_attr syntax to specify other attributes. There must not be any overlap between
the two lists.
In other words, the following is valid:
(define_insn_and_split ""
[(set (match_operand:SI 0 "nonimmediate_operand")
(match_operand:SI 1 "aarch64_mov_operand"))]
""
{@ [cons: 0, 1; attrs: type, arch, length]}
...
[(set_attr "foo" "mov_imm")]
)
but this is not valid:
(define_insn_and_split ""
[(set (match_operand:SI 0 "nonimmediate_operand")
(match_operand:SI 1 "aarch64_mov_operand"))]
""
{@ [cons: 0, 1; attrs: type, arch, length]}
...
[(set_attr "arch" "bar")
(set_attr "foo" "mov_imm")]
)
because it specifies arch twice.
17.8 Predicates
A predicate determines whether a match_operand or match_operator expression matches,
and therefore whether the surrounding instruction pattern will be used for that combination
of operands. GCC has a number of machine-independent predicates, and you can define
machine-specific predicates as needed. By convention, predicates used with match_operand
have names that end in ‘_operand’, and those used with match_operator have names that
end in ‘_operator’.
All predicates are boolean functions (in the mathematical sense) of two arguments: the
RTL expression that is being considered at that position in the instruction pattern, and
the machine mode that the match_operand or match_operator specifies. In this section,
the first argument is called op and the second argument mode. Predicates can be called
from C as ordinary two-argument functions; this can be useful in output templates or other
machine-specific code.
Operand predicates can allow operands that are not actually acceptable to the hard-
ware, as long as the constraints give reload the ability to fix them up (see Section 17.9
[Constraints], page 379). However, GCC will usually generate better code if the predicates
specify the requirements of the machine instructions as closely as possible. Reload cannot
fix up operands that must be constants (“immediate operands”); you must use a predicate
that allows only constants, or else enforce the requirement in the extra condition.
Most predicates handle their mode argument in a uniform manner. If mode is VOIDmode
(unspecified), then op can have any mode. If mode is anything else, then op must have the
same mode, unless op is a CONST_INT or integer CONST_DOUBLE. These RTL expressions
always have VOIDmode, so it would be counterproductive to check that their mode matches.
Chapter 17: Machine Descriptions 375
Instead, predicates that accept CONST_INT and/or integer CONST_DOUBLE check that the
value stored in the constant will fit in the requested mode.
Predicates with this behavior are called normal. genrecog can optimize the instruction
recognizer based on knowledge of how normal predicates treat modes. It can also diagnose
certain kinds of common errors in the use of normal predicates; for instance, it is almost
always an error to use a normal predicate without specifying a mode.
Predicates that do something different with their mode argument are called special. The
generic predicates address_operand and pmode_register_operand are special predicates.
genrecog does not do any optimizations or diagnosis when special predicates are used.
memory_operand [Function]
This predicate allows any valid reference to a quantity of mode mode in memory,
as determined by the weak form of GO_IF_LEGITIMATE_ADDRESS (see Section 18.13
[Addressing Modes], page 605).
address_operand [Function]
This predicate is a little unusual; it allows any operand that is a valid expression
for the address of a quantity of mode mode, again determined by the weak form of
GO_IF_LEGITIMATE_ADDRESS. To first order, if ‘(mem:mode (exp))’ is acceptable to
memory_operand, then exp is acceptable to address_operand. Note that exp does
not necessarily have the mode mode.
indirect_operand [Function]
This is a stricter form of memory_operand which allows only memory references with
a general_operand as the address expression. New uses of this predicate are dis-
couraged, because general_operand is very permissive, so it’s hard to tell what an
indirect_operand does or does not allow. If a target has different requirements
for memory operands for different instructions, it is better to define target-specific
predicates which enforce the hardware’s requirements explicitly.
push_operand [Function]
This predicate allows a memory reference suitable for pushing a value onto the stack.
This will be a MEM which refers to stack_pointer_rtx, with a side effect in its address
expression (see Section 14.16 [Incdec], page 320); which one is determined by the
STACK_PUSH_CODE macro (see Section 18.9.1 [Frame Layout], page 564).
pop_operand [Function]
This predicate allows a memory reference suitable for popping a value off the stack.
Again, this will be a MEM referring to stack_pointer_rtx, with a side effect in its
address expression. However, this time STACK_POP_CODE is expected.
The fourth category of predicates allow some combination of the above operands.
nonmemory_operand [Function]
This predicate allows any immediate or register operand valid for mode.
nonimmediate_operand [Function]
This predicate allows any register or memory operand valid for mode.
general_operand [Function]
This predicate allows any immediate, register, or memory operand valid for mode.
Finally, there are two generic operator predicates.
comparison_operator [Function]
This predicate matches any expression which performs an arithmetic comparison in
mode; that is, COMPARISON_P is true for the expression code.
ordered_comparison_operator [Function]
This predicate matches any expression which performs an arithmetic comparison in
mode and whose expression code is valid for integer modes; that is, the expression
code will be one of eq, ne, lt, ltu, le, leu, gt, gtu, ge, geu.
Chapter 17: Machine Descriptions 377
Here is an example of a simple predicate definition, from the IA64 machine description:
;; True if op is a SYMBOL_REF which refers to the sdata section.
(define_predicate "small_addr_symbolic_operand"
(and (match_code "symbol_ref")
(match_test "SYMBOL_REF_SMALL_ADDR_P (op)")))
The program genpreds is responsible for generating code to test predicates. It also writes
a header file containing function declarations for all machine-specific predicates. It is not
necessary to declare these predicates in cpu-protos.h.
Chapter 17: Machine Descriptions 379
"...")
which has two operands, one of which must appear in two places, and
(define_insn ""
[(set (match_operand:SI 0 "general_operand" "=r")
(plus:SI (match_operand:SI 1 "general_operand" "0")
(match_operand:SI 2 "general_operand" "r")))]
""
"...")
which has three operands, two of which are required by a constraint to be identical. If we
are considering an insn of the form
(insn n prev next
(set (reg:SI 3)
(plus:SI (reg:SI 6) (reg:SI 109)))
...)
the first pattern would not apply at all, because this insn does not contain two identical
subexpressions in the right place. The pattern would say, “That does not look like an
add instruction; try other patterns”. The second pattern would say, “Yes, that’s an add
instruction, but there is something wrong with it”. It would direct the reload pass of the
compiler to generate additional insns to make the constraint true. The results might look
like this:
(insn n2 prev n
(set (reg:SI 3) (reg:SI 6))
...)
(insn n n2 next
(set (reg:SI 3)
(plus:SI (reg:SI 3) (reg:SI 109)))
...)
It is up to you to make sure that each operand, in each pattern, has constraints that
can handle any RTL expression that could be present for that operand. (When multiple
alternatives are in use, each pattern must, for each possible combination of operand expres-
sions, have at least one alternative which can handle that combination of operands.) The
constraints don’t need to allow any possible operand—when this is the case, they do not
constrain—but they must at least point the way to reloading any possible operand so that
it will fit.
• If the constraint accepts whatever operands the predicate permits, there is no problem:
reloading is never necessary for this operand.
For example, an operand whose constraints permit everything except registers is safe
provided its predicate rejects registers.
An operand whose predicate accepts only constant values is safe provided its constraints
include the letter ‘i’. If any possible constant value is accepted, then nothing less than
‘i’ will do; if the predicate is more selective, then the constraints may also be more
selective.
• Any operand expression can be reloaded by copying it into a register. So if an operand’s
constraints allow some kind of register, it is certain to be safe. It need not permit all
classes of registers; the compiler knows how to copy a register into another register of
the proper class in order to make an instruction valid.
Chapter 17: Machine Descriptions 383
two alternatives need the same amount of copying, the one that comes first is chosen. These
choices can be altered with the ‘?’ and ‘!’ characters:
? Disparage slightly the alternative that the ‘?’ appears in, as a choice when no
alternative applies exactly. The compiler regards this alternative as one unit
more costly for each ‘?’ that appears in it.
! Disparage severely the alternative that the ‘!’ appears in. This alternative can
still be used if it fits without reloading, but if reloading is needed, some other
alternative will be used.
^ This constraint is analogous to ‘?’ but it disparages slightly the alternative only
if the operand with the ‘^’ needs a reload.
$ This constraint is analogous to ‘!’ but it disparages severely the alternative
only if the operand with the ‘$’ needs a reload.
When an insn pattern has multiple alternatives in its constraints, often the appearance
of the assembler code is determined mostly by which alternative was matched. When this
is so, the C code for writing the assembler code can use the variable which_alternative,
which is the ordinal number of the alternative that was actually satisfied (0 for the first, 1
for the second alternative, etc.). See Section 17.6 [Output Statement], page 370.
Therefore, this operand may not lie in a register that is read by the instruction
or as part of any memory address.
‘&’ applies only to the alternative in which it is written. In constraints with
multiple alternatives, sometimes one alternative requires ‘&’ while others do
not. See, for example, the ‘movdf’ insn of the 68000.
An operand which is read by the instruction can be tied to an earlyclobber
operand if its only use as an input occurs before the early result is written.
Adding alternatives of this form often allows GCC to produce better code when
only some of the read operands can be affected by the earlyclobber. See, for
example, the ‘mulsi3’ insn of the ARM.
Furthermore, if the earlyclobber operand is also a read/write operand, then
that operand is written only after it’s used.
‘&’ does not obviate the need to write ‘=’ or ‘+’. As earlyclobber operands
are always written, a read-only earlyclobber operand is ill-formed and will be
rejected by the compiler.
‘%’ Declares the instruction to be commutative for this operand and the following
operand. This means that the compiler may interchange the two operands if
that is the cheapest way to make all operands fit the constraints. ‘%’ applies to
all alternatives and must appear as the first character in the constraint. Only
read-only operands can use ‘%’.
This is often used in patterns for addition instructions that really have only
two operands: the result must go in one of the arguments. Here for example,
is how the 68000 halfword-add instruction is defined:
(define_insn "addhi3"
[(set (match_operand:HI 0 "general_operand" "=m,r")
(plus:HI (match_operand:HI 1 "general_operand" "%0,0")
(match_operand:HI 2 "general_operand" "di,g")))]
...)
GCC can only handle one commutative pair in an asm; if you use more, the
compiler may fail. Note that you need not use the modifier if the two alterna-
tives are strictly identical; this would only waste time in the reload pass. The
modifier is not operational after register allocation, so the result of define_
peephole2 and define_splits performed after reload cannot rely on ‘%’ to
make the intended insn match.
‘#’ Says that all following characters, up to the next comma, are to be ignored as
a constraint. They are significant only for choosing register preferences.
‘*’ Says that the following character should be ignored when choosing register
preferences. ‘*’ has no effect on the meaning of the constraint as a constraint,
and no effect on reloading. For LRA ‘*’ additionally disparages slightly the
alternative if the following character matches the operand.
Here is an example: the 68000 has an instruction to sign-extend a halfword
in a data register, and can also sign-extend a value by copying it into an ad-
dress register. While either kind of register is acceptable, the constraints on
an address-register destination are less strict, so it is best if register allocation
386 GNU Compiler Collection (GCC) Internals
makes an address register its goal. Therefore, ‘*’ is used so that the ‘d’ con-
straint letter (for data register) is ignored when computing register preferences.
(define_insn "extendhisi2"
[(set (match_operand:SI 0 "general_operand" "=*d,a")
(sign_extend:SI
(match_operand:HI 1 "general_operand" "0,g")))]
...)
t Temporary register r0
x Register pair X (r27:r26)
y Register pair Y (r29:r28)
z Register pair Z (r31:r30)
I Constant greater than −1, less than 64
J Constant greater than −64, less than 1
K Constant integer 2
L Constant integer 0
M Constant that fits in 8 bits
N Constant integer −1
O Constant integer 8, 16, or 24
P Constant integer 1
G A floating point constant 0.0
Q A memory address based on Y or Z pointer with displacement.
Blackfin family—config/bfin/constraints.md
a P register
d D register
z A call clobbered P register.
qn A single register. If n is in the range 0 to 7, the corresponding D
register. If it is A, then the register P0.
D Even-numbered D register
W Odd-numbered D register
e Accumulator register.
A Even-numbered accumulator register.
B Odd-numbered accumulator register.
b I register
v B register
f M register
c Registers used for circular buffering, i.e. I, B, or L registers.
C The CC register.
t LT0 or LT1.
k LC0 or LC1.
u LB0 or LB1.
Chapter 17: Machine Descriptions 391
x Any D, P, B, M, I or L register.
y Additional registers typically used only in prologues and epilogues:
RETS, RETN, RETI, RETX, RETE, ASTAT, SEQSTAT and USP.
w Any register except accumulators or CC.
Ksh Signed 16 bit integer (in the range −32768 to 32767)
Kuh Unsigned 16 bit integer (in the range 0 to 65535)
Ks7 Signed 7 bit integer (in the range −64 to 63)
Ku7 Unsigned 7 bit integer (in the range 0 to 127)
Ku5 Unsigned 5 bit integer (in the range 0 to 31)
Ks4 Signed 4 bit integer (in the range −8 to 7)
Ks3 Signed 3 bit integer (in the range −3 to 4)
Ku3 Unsigned 3 bit integer (in the range 0 to 7)
Pn Constant n, where n is a single-digit constant in the range 0 to 4.
PA An integer equal to one of the MACFLAG XXX constants that is
suitable for use with either accumulator.
PB An integer equal to one of the MACFLAG XXX constants that is
suitable for use only with accumulator A1.
M1 Constant 255.
M2 Constant 65535.
J An integer constant with exactly a single bit set.
L An integer constant with all bits set except exactly one.
H
Q Any SYMBOL REF.
C-SKY—config/csky/constraints.md
a The mini registers r0 - r7.
b The low registers r0 - r15.
c C register.
y HI and LO registers.
l LO register.
h HI register.
v Vector registers.
z Stack pointer register (SP).
Q A memory address which uses a base register with a short offset or
with a index register with its scale.
392 GNU Compiler Collection (GCC) Internals
FRV—config/frv/frv.h
a Register in the class ACC_REGS (acc0 to acc7).
b Register in the class EVEN_ACC_REGS (acc0 to acc7).
c Register in the class CC_REGS (fcc0 to fcc3 and icc0 to icc3).
d Register in the class GPR_REGS (gr0 to gr63).
e Register in the class EVEN_REGS (gr0 to gr63). Odd registers are
excluded not in the class but through the use of a machine mode
larger than 4 bytes.
f Register in the class FPR_REGS (fr0 to fr63).
h Register in the class FEVEN_REGS (fr0 to fr63). Odd registers are
excluded not in the class but through the use of a machine mode
larger than 4 bytes.
l Register in the class LR_REG (the lr register).
q Register in the class QUAD_REGS (gr2 to gr63). Register numbers
not divisible by 4 are excluded not in the class but through the use
of a machine mode larger than 8 bytes.
t Register in the class ICC_REGS (icc0 to icc3).
u Register in the class FCC_REGS (fcc0 to fcc3).
v Register in the class ICR_REGS (cc4 to cc7).
w Register in the class FCR_REGS (cc0 to cc3).
x Register in the class QUAD_FPR_REGS (fr0 to fr63). Register num-
bers not divisible by 4 are excluded not in the class but through
the use of a machine mode larger than 8 bytes.
z Register in the class SPR_REGS (lcr and lr).
A Register in the class QUAD_ACC_REGS (acc0 to acc7).
B Register in the class ACCG_REGS (accg0 to accg7).
C Register in the class CR_REGS (cc0 to cc7).
G Floating point constant zero
I 6-bit signed integer constant
J 10-bit signed integer constant
L 16-bit signed integer constant
M 16-bit unsigned integer constant
N 12-bit signed integer constant that is negative—i.e. in the range of
−2048 to −1
O Constant zero
394 GNU Compiler Collection (GCC) Internals
U Integer constant 63
G Floating-point constant 0.0
A A lo_sum data-linkage-table memory operand
Q A memory operand that can be used as the destination operand of
an integer store instruction
R A scaled or unscaled indexed memory operand
T A memory operand for floating-point loads and stores
W A register indirect memory operand
Intel IA-64—config/ia64/ia64.h
a General register r0 to r3 for addl instruction
b Branch register
c Predicate register (‘c’ as in “conditional”)
d Application register residing in M-unit
e Application register residing in I-unit
f Floating-point register
m Memory operand. If used together with ‘<’ or ‘>’, the operand can
have postincrement and postdecrement which require printing with
‘%Pn’ on IA-64.
G Floating-point constant 0.0 or 1.0
I 14-bit signed integer constant
J 22-bit signed integer constant
K 8-bit signed integer constant for logical instructions
L 8-bit adjusted signed integer constant for compare pseudo-ops
M 6-bit unsigned integer constant for shift counts
N 9-bit signed integer constant for load and store postincrements
O The constant zero
P 0 or −1 for dep instruction
Q Non-volatile memory for floating-point loads and stores
R Integer constant in the range 1 to 4 for shladd instruction
S Memory operand except postincrement and postdecrement. This
is now roughly the same as ‘m’ when not used together with ‘<’ or
‘>’.
M32C—config/m32c/m32c.cc
Rsp
Rfb
Rsb ‘$sp’, ‘$fb’, ‘$sb’.
396 GNU Compiler Collection (GCC) Internals
Rcr Any control register, when they’re 16 bits wide (nothing if control
registers are 24 bits wide)
Rcl Any control register, when they’re 24 bits wide.
R0w
R1w
R2w
R3w $r0, $r1, $r2, $r3.
R02 $r0 or $r2, or $r2r0 for 32 bit values.
R13 $r1 or $r3, or $r3r1 for 32 bit values.
Rdi A register that can hold a 64 bit value.
Rhl $r0 or $r1 (registers with addressable high/low bytes)
R23 $r2 or $r3
Raa Address registers
Raw Address registers when they’re 16 bits wide.
Ral Address registers when they’re 24 bits wide.
Rqi Registers that can hold QI values.
Rad Registers that can be used with displacements ($a0, $a1, $sb).
Rsi Registers that can hold 32 bit values.
Rhi Registers that can hold 16 bit values.
Rhc Registers chat can hold 16 bit values, including all control registers.
Rra $r0 through R1, plus $a0 and $a1.
Rfl The flags register.
Rmm The memory-based pseudo-registers $mem0 through $mem15.
Rpi Registers that can hold pointers (16 bit registers for r8c, m16c; 24
bit registers for m32cm, m32c).
Rpa Matches multiple registers in a PARALLEL to form a larger regis-
ter. Used to match function return values.
Is3 −8 . . . 7
IS1 −128 . . . 127
IS2 −32768 . . . 32767
IU2 0 . . . 65535
In4 −8 . . . −1 or 1 . . . 8
In5 −16 . . . −1 or 1 . . . 16
In6 −32 . . . −1 or 1 . . . 32
IM2 −65536 . . . −1
Chapter 17: Machine Descriptions 397
es A “stable” memory operand; that is, one which does not include
any automodification of the base register. This used to be useful
when m allowed automodification of the base register, but as those
are now only allowed when < or > is used, es is basically the same
as m without < and >.
Q A memory operand addressed by just a base register.
Y A memory operand for a DQ-form instruction.
Z A memory operand accessed with indexed or indirect addressing.
R An AIX TOC entry.
a An indexed or indirect address.
U A V.4 small data reference.
W A vector constant that does not require memory.
j The zero vector constant.
PRU—config/pru/constraints.md
I An unsigned 8-bit integer constant.
J An unsigned 16-bit integer constant.
L An unsigned 5-bit integer constant (for shift counts).
T A text segment (program memory) constant label.
Z Integer constant zero.
RL78—config/rl78/constraints.md
Int3 An integer constant in the range 1 . . . 7.
Int8 An integer constant in the range 0 . . . 255.
J An integer constant in the range −255 . . . 0
K The integer constant 1.
L The integer constant -1.
M The integer constant 0.
N The integer constant 2.
O The integer constant -2.
P An integer constant in the range 1 . . . 15.
Qbi The built-in compare types–eq, ne, gtu, ltu, geu, and leu.
Qsc The synthetic compare types–gt, lt, ge, and le.
Wab A memory reference with an absolute address.
Wbc A memory reference using BC as a base register, with an optional
offset.
406 GNU Compiler Collection (GCC) Internals
Wca A memory reference using AX, BC, DE, or HL for the address, for
calls.
Wcv A memory reference using any 16-bit register pair for the address,
for calls.
Wd2 A memory reference using DE as a base register, with an optional
offset.
Wde A memory reference using DE as a base register, without any offset.
Wfr Any memory reference to an address in the far address space.
Wh1 A memory reference using HL as a base register, with an optional
one-byte offset.
Whb A memory reference using HL as a base register, with B or C as the
index register.
Whl A memory reference using HL as a base register, without any offset.
Ws1 A memory reference using SP as a base register, with an optional
one-byte offset.
Y Any memory reference to an address in the near address space.
A The AX register.
B The BC register.
D The DE register.
R A through L registers.
S The SP register.
T The HL register.
Z08W The 16-bit R8 register.
Z10W The 16-bit R10 register.
Zint The registers reserved for interrupts (R24 to R31).
a The A register.
b The B register.
c The C register.
d The D register.
e The E register.
h The H register.
l The L register.
v The virtual registers.
w The PSW register.
x The X register.
Chapter 17: Machine Descriptions 407
RISC-V—config/riscv/constraints.md
f A floating-point register (if available).
I An I-type 12-bit signed immediate.
J Integer zero.
K A 5-bit unsigned immediate for CSR access instructions.
A An address that is held in a general-purpose register.
S A constraint that matches an absolute symbolic address.
vr A vector register (if available)..
vd A vector register, excluding v0 (if available).
vm A vector register, only v0 (if available).
RX—config/rx/constraints.md
Q An address which does not involve register indirect addressing or
pre/post increment/decrement addressing.
Symbol A symbol reference.
Int08 A constant in the range −256 to 255, inclusive.
Sint08 A constant in the range −128 to 127, inclusive.
Sint16 A constant in the range −32768 to 32767, inclusive.
Sint24 A constant in the range −8388608 to 8388607, inclusive.
Uint04 A constant in the range 0 to 15, inclusive.
S/390 and zSeries—config/s390/s390.h
a Address register (general purpose register except r0)
c Condition code register
d Data register (arbitrary general purpose register)
f Floating-point register
I Unsigned 8-bit constant (0–255)
J Unsigned 12-bit constant (0–4095)
K Signed 16-bit constant (−32768–32767)
L Value appropriate as displacement.
(0..4095)
for short displacement
(−524288..524287)
for long displacement
M Constant integer with a value of 0x7fffffff.
408 GNU Compiler Collection (GCC) Internals
SPARC—config/sparc/sparc.h
f Floating-point register on the SPARC-V8 architecture and lower
floating-point register on the SPARC-V9 architecture.
e Floating-point register. It is equivalent to ‘f’ on the SPARC-V8
architecture and contains both lower and upper floating-point reg-
isters on the SPARC-V9 architecture.
c Floating-point condition code register.
d Lower floating-point register. It is only valid on the SPARC-V9
architecture when the Visual Instruction Set is available.
b Floating-point register. It is only valid on the SPARC-V9 architec-
ture when the Visual Instruction Set is available.
h 64-bit global or out register for the SPARC-V8+ architecture.
C The constant all-ones, for floating-point.
A Signed 5-bit constant
D A vector constant
I Signed 13-bit constant
J Zero
K 32-bit constant with the low 12 bits clear (a constant that can be
loaded with the sethi instruction)
Chapter 17: Machine Descriptions 409
x86 family—config/i386/constraints.md
R Legacy register—the eight integer registers available on all i386
processors (a, b, c, d, si, di, bp, sp).
q Any register accessible as rl. In 32-bit mode, a, b, c, and d; in
64-bit mode, any integer register.
Q Any register accessible as rh: a, b, c, and d.
l Any register that can be used as the index in a base+index memory
access: that is, any general register except the stack pointer.
a The a register.
b The b register.
c The c register.
d The d register.
S The si register.
D The di register.
A The a and d registers. This class is used for instructions that re-
turn double word results in the ax:dx register pair. Single word
values will be allocated either in ax or dx. For example on i386 the
following implements rdtsc:
unsigned long long rdtsc (void)
{
unsigned long long tick;
__asm__ __volatile__("rdtsc":"=A"(tick));
return tick;
}
This is not correct on x86-64 as it would allocate tick in either ax
or dx. You have to use the following variant instead:
unsigned long long rdtsc (void)
{
unsigned int tickl, tickh;
__asm__ __volatile__("rdtsc":"=a"(tickl),"=d"(tickh));
return ((unsigned long long)tickh << 32)|tickl;
}
which alternatives to consider when adding or modifying an instruction that GCC wants to
optimize for size. preferred_for_speed does the same thing for speed. Note that things
like code motion can lead to cases where code optimized for size uses alternatives that are
not preferred for size, and similarly for speed.
Although define_insns can in principle specify the enabled attribute directly, it is
often clearer to have subsiduary attributes for each architectural feature of interest. The
define_insns can then use these subsiduary attributes to say which alternatives require
which features. The example below does this for cpu_facility.
E.g. the following two patterns could easily be merged using the enabled attribute:
(define_insn "*movdi_old"
[(set (match_operand:DI 0 "register_operand" "=d")
(match_operand:DI 1 "register_operand" " d"))]
"!TARGET_NEW"
"lgr %0,%1")
(define_insn "*movdi_new"
[(set (match_operand:DI 0 "register_operand" "=d,f,d")
(match_operand:DI 1 "register_operand" " d,d,f"))]
"TARGET_NEW"
"@
lgr %0,%1
ldgr %0,%1
lgdr %0,%1")
to:
(define_insn "*movdi_combined"
[(set (match_operand:DI 0 "register_operand" "=d,f,d")
(match_operand:DI 1 "register_operand" " d,d,f"))]
""
"@
lgr %0,%1
ldgr %0,%1
lgdr %0,%1"
[(set_attr "cpu_facility" "*,new,new")])
Machine-specific constraints can be given names of arbitrary length, but they must be
entirely composed of letters, digits, underscores (‘_’), and angle brackets (‘< >’). Like C
identifiers, they must begin with a letter or underscore.
In order to avoid ambiguity in operand constraint strings, no constraint can have a name
that begins with any other constraint’s name. For example, if x is defined as a constraint
name, xy may not be, and vice versa. As a consequence of this rule, no constraint may
begin with one of the generic constraint letters: ‘E F V X g i m n o p r s’.
Register constraints correspond directly to register classes. See Section 18.8 [Register
Classes], page 553. There is thus not much flexibility in their definitions.
Non-register constraints are more like predicates: the constraint definition gives a boolean
expression which indicates whether the constraint matches.
Chapter 17: Machine Descriptions 417
For historical reasons, names beginning with the letters ‘G H’ are reserved for constraints
that match only const_doubles, and names beginning with the letters ‘I J K L M N O P’ are
reserved for constraints that match only const_ints. This may change in the future. For
the time being, constraints with these names must be written in a stylized form, so that
genpreds can tell you did it correctly:
(define_constraint "[GHIJKLMNOP]..."
"doc..."
(and (match_code "const_int") ; const_double for G/H
condition...)) ; usually a match_test
It is fine to use names beginning with other letters for constraints that match const_
doubles or const_ints.
Each docstring in a constraint definition should be one or more complete sentences,
marked up in Texinfo format. They are currently unused. In the future they will be copied
into the GCC manual, in Section 17.9.5 [Machine Constraints], page 386, replacing the
hand-maintained tables currently found in that section. Also, in the future the compiler
may use this to give more helpful diagnostics when poor choice of asm constraints causes a
reload failure.
If you put the pseudo-Texinfo directive ‘@internal’ at the beginning of a docstring, then
(in the future) it will appear only in the internals manual’s version of the machine-specific
constraint tables. Use this for constraints that should not appear in asm statements.
Chapter 17: Machine Descriptions 419
"!satisfies_constraint_K (operands[2])"
"")
‘reload_inm’
‘reload_outm’
These named patterns have been obsoleted by the target hook secondary_
reload.
Like ‘movm’, but used when a scratch register is required to move between
operand 0 and operand 1. Operand 2 describes the scratch register. See the
discussion of the SECONDARY_RELOAD_CLASS macro in see Section 18.8 [Register
Classes], page 553.
There are special restrictions on the form of the match_operands used in these
patterns. First, only the predicate for the reload operand is examined, i.e.,
reload_in examines operand 1, but not the predicates for operand 0 or 2.
Second, there may be only one alternative in the constraints. Third, only a
single register class letter may be used for the constraint; subsequent constraint
letters are ignored. As a special exception, an empty constraint string matches
the ALL_REGS register class. This may relieve ports of the burden of defining
an ALL_REGS constraint letter just for these patterns.
422 GNU Compiler Collection (GCC) Internals
‘movstrictm’
Like ‘movm’ except that if operand 0 is a subreg with mode m of a register
whose natural mode is wider, the ‘movstrictm’ instruction is guaranteed not
to alter any of the register except the part which belongs to mode m.
‘movmisalignm’
This variant of a move pattern is designed to load or store a value from a
memory address that is not naturally aligned for its mode. For a store, the
memory will be in operand 0; for a load, the memory will be in operand 1.
The other operand is guaranteed not to be a memory, so that it’s easy to tell
whether this is a load or store.
This pattern is used by the autovectorizer, and when expanding a MISALIGNED_
INDIRECT_REF expression.
‘load_multiple’
Load several consecutive memory locations into consecutive registers. Operand
0 is the first of the consecutive registers, operand 1 is the first memory location,
and operand 2 is a constant: the number of consecutive registers.
Define this only if the target machine really has such an instruction; do not
define this if the most efficient way of loading consecutive registers from memory
is to do them one at a time.
On some machines, there are restrictions as to which consecutive registers can
be stored into memory, such as particular starting or ending register numbers
or only a range of valid counts. For those machines, use a define_expand (see
Section 17.16 [Expander Definitions], page 477) and make the pattern fail if the
restrictions are not met.
Write the generated insn as a parallel with elements being a set of one register
from the appropriate memory location (you may also need use or clobber
elements). Use a match_parallel (see Section 17.4 [RTL Template], page 365)
to recognize the insn. See rs6000.md for examples of the use of this insn
pattern.
‘store_multiple’
Similar to ‘load_multiple’, but store several consecutive registers into con-
secutive memory locations. Operand 0 is the first of the consecutive memory
locations, operand 1 is the first register, and operand 2 is a constant: the
number of consecutive registers.
‘vec_load_lanesmn’
Perform an interleaved load of several vectors from memory operand 1 into
register operand 0. Both operands have mode m. The register operand is
viewed as holding consecutive vectors of mode n, while the memory operand
is a flat array that contains the same number of elements. The operation is
equivalent to:
int c = GET_MODE_SIZE (m) / GET_MODE_SIZE (n);
for (j = 0; j < GET_MODE_NUNITS (n); j++)
for (i = 0; i < c; i++)
operand0[i][j] = operand1[j * c + i];
Chapter 17: Machine Descriptions 423
The vector output has mode m and the scalar inputs have the mode appropriate
for one element of m. This pattern is not used for floating-point vectors, in order
to avoid having to specify the rounding behavior for i > 1.
This pattern is not allowed to FAIL.
while_ultmn
Set operand 0 to a mask that is true while incrementing operand 1 gives a value
that is less than operand 2, for a vector length up to operand 3. Operand 0
has mode n and operands 1 and 2 are scalar integers of mode m. Operand 3
should be omitted when n is a vector mode, and a CONST_INT otherwise. The
operation for vector modes is equivalent to:
operand0[0] = operand1 < operand2;
for (i = 1; i < GET_MODE_NUNITS (n); i++)
operand0[i] = operand0[i - 1] && (operand1 + i < operand2);
And for non-vector modes the operation is equivalent to:
operand0[0] = operand1 < operand2;
for (i = 1; i < operand3; i++)
operand0[i] = operand0[i - 1] && (operand1 + i < operand2);
select_vlm
Set operand 0 to the number of scalar iterations that should be handled by one
iteration of a vector loop. Operand 1 is the total number of scalar iterations
that the loop needs to process and operand 2 is a maximum bound on the result
(also known as the maximum “vectorization factor”).
The maximum value of operand 0 is given by:
operand0 = MIN (operand1, operand2)
However, targets might choose a lower value than this, based on target-specific
criteria. Each iteration of the vector loop might therefore process a different
number of scalar iterations, which in turn means that induction variables will
have a variable step. Because of this, it is generally not useful to define this
instruction if it will always calculate the maximum value.
This optab is only useful on targets that implement ‘len_load_m’ and/or
‘len_store_m’.
‘check_raw_ptrsm’
Check whether, given two pointers a and b and a length len, a write of len
bytes at a followed by a read of len bytes at b can be split into interleaved
byte accesses ‘a[0], b[0], a[1], b[1], ...’ without affecting the dependen-
cies between the bytes. Set operand 0 to true if the split is possible and false
otherwise.
Operands 1, 2 and 3 provide the values of a, b and len respectively. Operand
4 is a constant integer that provides the known common alignment of a and b.
All inputs have mode m.
This split is possible if:
a == b || a + len <= b || b + len <= a
You should only define this pattern if the target has a way of accelerating the
test without having to do the individual comparisons.
Chapter 17: Machine Descriptions 427
‘check_war_ptrsm’
Like ‘check_raw_ptrsm’, but with the read and write swapped round. The split
is possible in this case if:
b <= a || a + len <= b
‘vec_cmpmn’
Output a vector comparison. Operand 0 of mode n is the destination for predi-
cate in operand 1 which is a signed vector comparison with operands of mode m
in operands 2 and 3. Predicate is computed by element-wise evaluation of the
vector comparison with a truth value of all-ones and a false value of all-zeros.
‘vec_cmpumn’
Similar to vec_cmpmn but perform unsigned vector comparison.
‘vec_cmpeqmn’
Similar to vec_cmpmn but perform equality or non-equality vector comparison
only. If vec_cmpmn or vec_cmpumn instruction pattern is supported, it will
be preferred over vec_cmpeqmn, so there is no need to define this instruction
pattern if the others are supported.
‘vcondmn’ Output a conditional vector move. Operand 0 is the destination to receive a
combination of operand 1 and operand 2, which are of mode m, dependent on
the outcome of the predicate in operand 3 which is a signed vector comparison
with operands of mode n in operands 4 and 5. The modes m and n should have
the same size. Operand 0 will be set to the value op1 & msk | op2 & ~msk
where msk is computed by element-wise evaluation of the vector comparison
with a truth value of all-ones and a false value of all-zeros.
‘vcondumn’
Similar to vcondmn but performs unsigned vector comparison.
‘vcondeqmn’
Similar to vcondmn but performs equality or non-equality vector comparison
only. If vcondmn or vcondumn instruction pattern is supported, it will be pre-
ferred over vcondeqmn, so there is no need to define this instruction pattern if
the others are supported.
‘vcond_mask_mn’
Similar to vcondmn but operand 3 holds a pre-computed result of vector com-
parison.
‘vcond_mask_mn’
Set each element of operand 0 to the corresponding element of operand 2 or
operand 3. Choose operand 2 if both the element index is less than operand 4
plus operand 5 and the corresponding element of operand 1 is nonzero:
for (i = 0; i < GET_MODE_NUNITS (m); i++)
op0[i] = i < op4 + op5 && op1[i] ? op2[i] : op3[i];
Operands 0, 2 and 3 have mode m. Operand 1 has mode n. Operands 4 and 5
have a target-dependent scalar integer mode.
‘maskloadmn’
Perform a masked load of vector from memory operand 1 of mode m into register
operand 0. Mask is provided in register operand 2 of mode n.
428 GNU Compiler Collection (GCC) Internals
only mask indices < (operand 3 + operand 4) are used. Operand 4 conceptually
has mode QI.
Operand 2 can be a variable or a constant amount. Operand 4 specifies a
constant bias: it is either a constant 0 or a constant -1. The predicate on
operand 4 must only accept the bias values that the target actually supports.
GCC handles a bias of 0 more efficiently than a bias of -1.
If (operand 2 + operand 4) exceeds the number of elements in mode m, the
behavior is undefined.
If the target prefers the length to be measured in bytes rather than elements,
it should only implement this pattern for vectors of QI elements.
This pattern is not allowed to FAIL.
‘mask_len_storemn’
Perform a masked store from vector register operand 1 into memory operand
0. (operand 3 + operand 4) elements are stored to memory and leave the
other elements of operand 0 unchanged. This is a combination of len store and
maskstore. Operands 0 and 1 have mode m, which must be a vector mode.
Operand 3 has whichever integer mode the target prefers. A mask is specified
in operand 2 which must be of type n. The mask has lower precedence than the
length and is itself subject to length masking, i.e. only mask indices < (operand
3 + operand 4) are used. Operand 4 conceptually has mode QI.
Operand 2 can be a variable or a constant amount. Operand 3 specifies a
constant bias: it is either a constant 0 or a constant -1. The predicate on
operand 4 must only accept the bias values that the target actually supports.
GCC handles a bias of 0 more efficiently than a bias of -1.
If (operand 2 + operand 4) exceeds the number of elements in mode m, the
behavior is undefined.
If the target prefers the length to be measured in bytes rather than elements,
it should only implement this pattern for vectors of QI elements.
This pattern is not allowed to FAIL.
‘vec_permm’
Output a (variable) vector permutation. Operand 0 is the destination to receive
elements from operand 1 and operand 2, which are of mode m. Operand 3 is
the selector. It is an integral mode vector of the same width and number of
elements as mode m.
The input elements are numbered from 0 in operand 1 through 2 ∗ N − 1 in
operand 2. The elements of the selector must be computed modulo 2 ∗ N . Note
that if rtx_equal_p(operand1, operand2), this can be implemented with just
operand 1 and selector elements modulo N.
In order to make things easy for a number of targets, if there is no ‘vec_perm’
pattern for mode m, but there is for mode q where q is a vector of QImode of
the same width as m, the middle-end will lower the mode m VEC_PERM_EXPR to
mode q.
See also TARGET_VECTORIZER_VEC_PERM_CONST, which performs the analogous
operation for constant selectors.
430 GNU Compiler Collection (GCC) Internals
‘pushm1’ Output a push instruction. Operand 0 is value to push. Used only when PUSH_
ROUNDING is defined. For historical reason, this pattern may be missing and in
such case an mov expander is used instead, with a MEM expression forming the
push operation. The mov expander method is deprecated.
‘addm3’ Add operand 2 and operand 1, storing the result in operand 0. All operands
must have mode m. This can be used even on two-address machines, by means
of constraints requiring operands 1 and 0 to be the same location.
‘ssaddm3’, ‘usaddm3’
‘subm3’, ‘sssubm3’, ‘ussubm3’
‘mulm3’, ‘ssmulm3’, ‘usmulm3’
‘divm3’, ‘ssdivm3’
‘udivm3’, ‘usdivm3’
‘modm3’, ‘umodm3’
‘uminm3’, ‘umaxm3’
‘andm3’, ‘iorm3’, ‘xorm3’
Similar, for other arithmetic operations.
‘addvm4’ Like addm3 but takes a code_label as operand 3 and emits code to jump to it if
signed overflow occurs during the addition. This pattern is used to implement
the built-in functions performing signed integer addition with overflow checking.
‘subvm4’, ‘mulvm4’
Similar, for other signed arithmetic operations.
‘uaddvm4’ Like addvm4 but for unsigned addition. That is to say, the operation is the
same as signed addition but the jump is taken only on unsigned overflow.
‘usubvm4’, ‘umulvm4’
Similar, for other unsigned arithmetic operations.
‘uaddcm5’ Adds unsigned operands 2, 3 and 4 (where the last operand is guaranteed to
have only values 0 or 1) together, sets operand 0 to the result of the addition of
the 3 operands and sets operand 1 to 1 iff there was overflow on the unsigned
additions, and to 0 otherwise. So, it is an addition with carry in (operand 4)
and carry out (operand 1). All operands have the same mode.
‘usubcm5’ Similarly to ‘uaddcm5’, except subtracts unsigned operands 3 and 4 from
operand 2 instead of adding them. So, it is a subtraction with carry/borrow
in (operand 4) and carry/borrow out (operand 1). All operands have the same
mode.
‘addptrm3’
Like addm3 but is guaranteed to only be used for address calculations. The
expanded code is not allowed to clobber the condition code. It only needs to be
defined if addm3 sets the condition code. If adds used for address calculations
and normal adds are not compatible it is required to expand a distinct pattern
(e.g. using an unspec). The pattern is used by LRA to emit address calculations.
addm3 is used if addptrm3 is not defined.
‘fmam4’ Multiply operand 2 and operand 1, then add operand 3, storing the result in
operand 0 without doing an intermediate rounding step. All operands must
Chapter 17: Machine Descriptions 431
have mode m. This pattern is used to implement the fma, fmaf, and fmal
builtin functions from the ISO C99 standard.
‘fmsm4’ Like fmam4, except operand 3 subtracted from the product instead of added to
the product. This is represented in the rtl as
(fma:m op1 op2 (neg:m op3))
‘fnmam4’ Like fmam4 except that the intermediate product is negated before being added
to operand 3. This is represented in the rtl as
(fma:m (neg:m op1) op2 op3)
‘fnmsm4’ Like fmsm4 except that the intermediate product is negated before subtracting
operand 3. This is represented in the rtl as
(fma:m (neg:m op1) op2 (neg:m op3))
‘sminm3’, ‘smaxm3’
Signed minimum and maximum operations. When used with floating point, if
both operands are zeros, or if either operand is NaN, then it is unspecified which
of the two operands is returned as the result.
‘fminm3’, ‘fmaxm3’
IEEE-conformant minimum and maximum operations. If one operand is a quiet
NaN, then the other operand is returned. If both operands are quiet NaN, then a
quiet NaN is returned. In the case when gcc supports signaling NaN (-fsignaling-
nans) an invalid floating point exception is raised and a quiet NaN is returned.
All operands have mode m, which is a scalar or vector floating-point mode.
These patterns are not allowed to FAIL.
‘reduc_smin_scal_m’, ‘reduc_smax_scal_m’
Find the signed minimum/maximum of the elements of a vector. The vector is
operand 1, and operand 0 is the scalar result, with mode equal to the mode of
the elements of the input vector.
‘reduc_umin_scal_m’, ‘reduc_umax_scal_m’
Find the unsigned minimum/maximum of the elements of a vector. The vector
is operand 1, and operand 0 is the scalar result, with mode equal to the mode
of the elements of the input vector.
‘reduc_fmin_scal_m’, ‘reduc_fmax_scal_m’
Find the floating-point minimum/maximum of the elements of a vector, using
the same rules as fminm3 and fmaxm3. Operand 1 is a vector of mode m and
operand 0 is the scalar result, which has mode GET_MODE_INNER (m).
‘reduc_plus_scal_m’
Compute the sum of the elements of a vector. The vector is operand 1, and
operand 0 is the scalar result, with mode equal to the mode of the elements of
the input vector.
432 GNU Compiler Collection (GCC) Internals
‘reduc_and_scal_m’
‘reduc_ior_scal_m’
‘reduc_xor_scal_m’
Compute the bitwise AND/IOR/XOR reduction of the elements of a vector of mode
m. Operand 1 is the vector input and operand 0 is the scalar result. The mode
of the scalar result is the same as one element of m.
extract_last_m
Find the last set bit in mask operand 1 and extract the associated element
of vector operand 2. Store the result in scalar operand 0. Operand 2 has
vector mode m while operand 0 has the mode appropriate for one element of
m. Operand 1 has the usual mask mode for vectors of mode m; see TARGET_
VECTORIZE_GET_MASK_MODE.
fold_extract_last_m
If any bits of mask operand 2 are set, find the last set bit, extract the associated
element from vector operand 3, and store the result in operand 0. Store operand
1 in operand 0 otherwise. Operand 3 has mode m and operands 0 and 1 have
the mode appropriate for one element of m. Operand 2 has the usual mask
mode for vectors of mode m; see TARGET_VECTORIZE_GET_MASK_MODE.
len_fold_extract_last_m
Like ‘fold_extract_last_m’, but takes an extra length operand as operand
4 and an extra bias operand as operand 5. The last associated element is
extracted should have the index i < len (operand 4) + bias (operand 5).
fold_left_plus_m
Take scalar operand 1 and successively add each element from vector operand
2. Store the result in scalar operand 0. The vector has mode m and the scalars
have the mode appropriate for one element of m. The operation is strictly
in-order: there is no reassociation.
mask_fold_left_plus_m
Like ‘fold_left_plus_m’, but takes an additional mask operand (operand 3)
that specifies which elements of the source vector should be added.
mask_len_fold_left_plus_m
Like ‘fold_left_plus_m’, but takes an additional mask operand (operand 3),
len operand (operand 4) and bias operand (operand 5) that performs following
operations strictly in-order (no reassociation):
operand0 = operand1;
for (i = 0; i < LEN + BIAS; i++)
if (operand3[i])
operand0 += operand2[i];
‘sdot_prodm’
Compute the sum of the products of two signed elements. Operand 1 and
operand 2 are of the same mode. Their product, which is of a wider mode, is
computed and added to operand 3. Operand 3 is of a mode equal or wider than
the mode of the product. The result is placed in operand 0, which is of the
same mode as operand 3. m is the mode of operand 1 and operand 2.
Chapter 17: Machine Descriptions 433
‘udot_prodm’
Compute the sum of the products of two unsigned elements. Operand 1 and
operand 2 are of the same mode. Their product, which is of a wider mode, is
computed and added to operand 3. Operand 3 is of a mode equal or wider than
the mode of the product. The result is placed in operand 0, which is of the
same mode as operand 3. m is the mode of operand 1 and operand 2.
Semantically the expressions perform the multiplication in the following signs
udot<unsigned op0, unsigned op1, unsigned op2, unsigned op3> ==
op0 = zero-ext (op1) * zero-ext (op2) + op3
...
‘usdot_prodm’
Compute the sum of the products of elements of different signs. Operand 1
must be unsigned and operand 2 signed. Their product, which is of a wider
mode, is computed and added to operand 3. Operand 3 is of a mode equal or
wider than the mode of the product. The result is placed in operand 0, which
is of the same mode as operand 3. m is the mode of operand 1 and operand 2.
Semantically the expressions perform the multiplication in the following signs
usdot<signed op0, unsigned op1, signed op2, signed op3> ==
op0 = ((signed-conv) zero-ext (op1)) * sign-ext (op2) + op3
...
‘ssadm’
‘usadm’ Compute the sum of absolute differences of two signed/unsigned elements.
Operand 1 and operand 2 are of the same mode. Their absolute difference,
which is of a wider mode, is computed and added to operand 3. Operand 3 is
of a mode equal or wider than the mode of the absolute difference. The result
is placed in operand 0, which is of the same mode as operand 3. m is the mode
of operand 1 and operand 2.
‘widen_ssumm3’
‘widen_usumm3’
Operands 0 and 2 are of the same mode, which is wider than the mode of
operand 1. Add operand 1 to operand 2 and place the widened result in operand
0. (This is used express accumulation of elements into an accumulator of a wider
mode.) m is the mode of operand 1.
‘smulhsm3’
‘umulhsm3’
Signed/unsigned multiply high with scale. This is equivalent to the C code:
narrow op0, op1, op2;
...
op0 = (narrow) (((wide) op1 * (wide) op2) >> (N / 2 - 1));
where the sign of ‘narrow’ determines whether this is a signed or unsigned
operation, and N is the size of ‘wide’ in bits. m is the mode for all 3 operands
(narrow). The wide mode is not specified and is defined to fit the whole multiply.
434 GNU Compiler Collection (GCC) Internals
‘smulhrsm3’
‘umulhrsm3’
Signed/unsigned multiply high with round and scale. This is equivalent to the
C code:
narrow op0, op1, op2;
...
op0 = (narrow) (((((wide) op1 * (wide) op2) >> (N / 2 - 2)) + 1) >> 1);
where the sign of ‘narrow’ determines whether this is a signed or unsigned
operation, and N is the size of ‘wide’ in bits. m is the mode for all 3 operands
(narrow). The wide mode is not specified and is defined to fit the whole multiply.
‘sdiv_pow2m3’
‘sdiv_pow2m3’
Signed division by power-of-2 immediate. Equivalent to:
signed op0, op1;
...
op0 = op1 / (1 << imm);
‘vec_shl_insert_m’
Shift the elements in vector input operand 1 left one element (i.e. away from
element 0) and fill the vacated element 0 with the scalar in operand 2. Store
the result in vector output operand 0. Operands 0 and 1 have mode m and
operand 2 has the mode appropriate for one element of m.
‘vec_shl_m’
Whole vector left shift in bits, i.e. away from element 0. Operand 1 is a vector
to be shifted. Operand 2 is an integer shift amount in bits. Operand 0 is where
the resulting shifted vector is stored. The output and input vectors should have
the same modes.
‘vec_shr_m’
Whole vector right shift in bits, i.e. towards element 0. Operand 1 is a vector
to be shifted. Operand 2 is an integer shift amount in bits. Operand 0 is where
the resulting shifted vector is stored. The output and input vectors should have
the same modes.
‘vec_pack_trunc_m’
Narrow (demote) and merge the elements of two vectors. Operands 1 and 2
are vectors of the same mode having N integral or floating point elements of
size S. Operand 0 is the resulting vector in which 2*N elements of size S/2 are
concatenated after narrowing them down using truncation.
‘vec_pack_sbool_trunc_m’
Narrow and merge the elements of two vectors. Operands 1 and 2 are vectors
of the same type having N boolean elements. Operand 0 is the resulting vector
in which 2*N elements are concatenated. The last operand (operand 3) is the
number of elements in the output vector 2*N as a CONST_INT. This instruction
pattern is used when all the vector input and output operands have the same
scalar mode m and thus using vec_pack_trunc_m would be ambiguous.
Chapter 17: Machine Descriptions 435
‘vec_pack_ssat_m’, ‘vec_pack_usat_m’
Narrow (demote) and merge the elements of two vectors. Operands 1 and 2 are
vectors of the same mode having N integral elements of size S. Operand 0 is the
resulting vector in which the elements of the two input vectors are concatenated
after narrowing them down using signed/unsigned saturating arithmetic.
‘vec_pack_sfix_trunc_m’, ‘vec_pack_ufix_trunc_m’
Narrow, convert to signed/unsigned integral type and merge the elements of two
vectors. Operands 1 and 2 are vectors of the same mode having N floating point
elements of size S. Operand 0 is the resulting vector in which 2*N elements of
size S/2 are concatenated.
‘vec_packs_float_m’, ‘vec_packu_float_m’
Narrow, convert to floating point type and merge the elements of two vectors.
Operands 1 and 2 are vectors of the same mode having N signed/unsigned
integral elements of size S. Operand 0 is the resulting vector in which 2*N
elements of size S/2 are concatenated.
‘vec_unpacks_hi_m’, ‘vec_unpacks_lo_m’
Extract and widen (promote) the high/low part of a vector of signed integral or
floating point elements. The input vector (operand 1) has N elements of size S.
Widen (promote) the high/low elements of the vector using signed or floating
point extension and place the resulting N/2 values of size 2*S in the output
vector (operand 0).
‘vec_unpacku_hi_m’, ‘vec_unpacku_lo_m’
Extract and widen (promote) the high/low part of a vector of unsigned inte-
gral elements. The input vector (operand 1) has N elements of size S. Widen
(promote) the high/low elements of the vector using zero extension and place
the resulting N/2 values of size 2*S in the output vector (operand 0).
‘vec_unpacks_sbool_hi_m’, ‘vec_unpacks_sbool_lo_m’
Extract the high/low part of a vector of boolean elements that have scalar
mode m. The input vector (operand 1) has N elements, the output vector
(operand 0) has N/2 elements. The last operand (operand 2) is the number
of elements of the input vector N as a CONST_INT. These patterns are used if
both the input and output vectors have the same scalar mode m and thus using
vec_unpacks_hi_m or vec_unpacks_lo_m would be ambiguous.
‘vec_unpacks_float_hi_m’, ‘vec_unpacks_float_lo_m’
‘vec_unpacku_float_hi_m’, ‘vec_unpacku_float_lo_m’
Extract, convert to floating point type and widen the high/low part of a vector
of signed/unsigned integral elements. The input vector (operand 1) has N
elements of size S. Convert the high/low elements of the vector using floating
point conversion and place the resulting N/2 values of size 2*S in the output
vector (operand 0).
436 GNU Compiler Collection (GCC) Internals
‘vec_unpack_sfix_trunc_hi_m’,
‘vec_unpack_sfix_trunc_lo_m’
‘vec_unpack_ufix_trunc_hi_m’
‘vec_unpack_ufix_trunc_lo_m’
Extract, convert to signed/unsigned integer type and widen the high/low part
of a vector of floating point elements. The input vector (operand 1) has N
elements of size S. Convert the high/low elements of the vector to integers and
place the resulting N/2 values of size 2*S in the output vector (operand 0).
‘vec_widen_umult_hi_m’, ‘vec_widen_umult_lo_m’
‘vec_widen_smult_hi_m’, ‘vec_widen_smult_lo_m’
‘vec_widen_umult_even_m’, ‘vec_widen_umult_odd_m’
‘vec_widen_smult_even_m’, ‘vec_widen_smult_odd_m’
Signed/Unsigned widening multiplication. The two inputs (operands 1 and 2)
are vectors with N signed/unsigned elements of size S. Multiply the high/low or
even/odd elements of the two vectors, and put the N/2 products of size 2*S in
the output vector (operand 0). A target shouldn’t implement even/odd pattern
pair if it is less efficient than lo/hi one.
‘vec_widen_ushiftl_hi_m’, ‘vec_widen_ushiftl_lo_m’
‘vec_widen_sshiftl_hi_m’, ‘vec_widen_sshiftl_lo_m’
Signed/Unsigned widening shift left. The first input (operand 1) is a vector
with N signed/unsigned elements of size S. Operand 2 is a constant. Shift
the high/low elements of operand 1, and put the N/2 results of size 2*S in the
output vector (operand 0).
‘vec_widen_uaddl_hi_m’, ‘vec_widen_uaddl_lo_m’
‘vec_widen_saddl_hi_m’, ‘vec_widen_saddl_lo_m’
Signed/Unsigned widening add long. Operands 1 and 2 are vectors with N
signed/unsigned elements of size S. Add the high/low elements of 1 and 2
together, widen the resulting elements and put the N/2 results of size 2*S in
the output vector (operand 0).
‘vec_widen_usubl_hi_m’, ‘vec_widen_usubl_lo_m’
‘vec_widen_ssubl_hi_m’, ‘vec_widen_ssubl_lo_m’
Signed/Unsigned widening subtract long. Operands 1 and 2 are vectors with N
signed/unsigned elements of size S. Subtract the high/low elements of 2 from 1
and widen the resulting elements. Put the N/2 results of size 2*S in the output
vector (operand 0).
‘vec_widen_uabd_hi_m’, ‘vec_widen_uabd_lo_m’
‘vec_widen_uabd_odd_m’, ‘vec_widen_uabd_even_m’
‘vec_widen_sabd_hi_m’, ‘vec_widen_sabd_lo_m’
‘vec_widen_sabd_odd_m’, ‘vec_widen_sabd_even_m’
Signed/Unsigned widening absolute difference. Operands 1 and 2 are vectors
with N signed/unsigned elements of size S. Find the absolute difference between
operands 1 and 2 and widen the resulting elements. Put the N/2 results of size
2*S in the output vector (operand 0).
Chapter 17: Machine Descriptions 437
‘vec_addsubm3’
Alternating subtract, add with even lanes doing subtract and odd lanes doing
addition. Operands 1 and 2 and the outout operand are vectors with mode m.
‘vec_fmaddsubm4’
Alternating multiply subtract, add with even lanes doing subtract and odd lanes
doing addition of the third operand to the multiplication result of the first two
operands. Operands 1, 2 and 3 and the outout operand are vectors with mode
m.
‘vec_fmsubaddm4’
Alternating multiply add, subtract with even lanes doing addition and odd
lanes doing subtraction of the third operand to the multiplication result of the
first two operands. Operands 1, 2 and 3 and the outout operand are vectors
with mode m.
These instructions are not allowed to FAIL.
‘mulhisi3’
Multiply operands 1 and 2, which have mode HImode, and store a SImode
product in operand 0.
‘mulqihi3’, ‘mulsidi3’
Similar widening-multiplication instructions of other widths.
‘umulqihi3’, ‘umulhisi3’, ‘umulsidi3’
Similar widening-multiplication instructions that do unsigned multiplication.
‘usmulqihi3’, ‘usmulhisi3’, ‘usmulsidi3’
Similar widening-multiplication instructions that interpret the first operand as
unsigned and the second operand as signed, then do a signed multiplication.
‘smulm3_highpart’
Perform a signed multiplication of operands 1 and 2, which have mode m, and
store the most significant half of the product in operand 0. The least significant
half of the product is discarded. This may be represented in RTL using a smul_
highpart RTX expression.
‘umulm3_highpart’
Similar, but the multiplication is unsigned. This may be represented in RTL
using an umul_highpart RTX expression.
‘maddmn4’ Multiply operands 1 and 2, sign-extend them to mode n, add operand 3, and
store the result in operand 0. Operands 1 and 2 have mode m and operands 0
and 3 have mode n. Both modes must be integer or fixed-point modes and n
must be twice the size of m.
In other words, maddmn4 is like mulmn3 except that it also adds operand 3.
These instructions are not allowed to FAIL.
‘umaddmn4’
Like maddmn4, but zero-extend the multiplication operands instead of sign-
extending them.
438 GNU Compiler Collection (GCC) Internals
‘ssmaddmn4’
Like maddmn4, but all involved operations must be signed-saturating.
‘usmaddmn4’
Like umaddmn4, but all involved operations must be unsigned-saturating.
‘msubmn4’ Multiply operands 1 and 2, sign-extend them to mode n, subtract the result
from operand 3, and store the result in operand 0. Operands 1 and 2 have
mode m and operands 0 and 3 have mode n. Both modes must be integer or
fixed-point modes and n must be twice the size of m.
In other words, msubmn4 is like mulmn3 except that it also subtracts the result
from operand 3.
These instructions are not allowed to FAIL.
‘umsubmn4’
Like msubmn4, but zero-extend the multiplication operands instead of sign-
extending them.
‘ssmsubmn4’
Like msubmn4, but all involved operations must be signed-saturating.
‘usmsubmn4’
Like umsubmn4, but all involved operations must be unsigned-saturating.
‘divmodm4’
Signed division that produces both a quotient and a remainder. Operand 1 is
divided by operand 2 to produce a quotient stored in operand 0 and a remainder
stored in operand 3.
For machines with an instruction that produces both a quotient and a remain-
der, provide a pattern for ‘divmodm4’ but do not provide patterns for ‘divm3’
and ‘modm3’. This allows optimization in the relatively common case when both
the quotient and remainder are computed.
If an instruction that just produces a quotient or just a remainder exists and is
more efficient than the instruction that produces both, write the output routine
of ‘divmodm4’ to call find_reg_note and look for a REG_UNUSED note on the
quotient or remainder and generate the appropriate instruction.
‘udivmodm4’
Similar, but does unsigned division.
‘ashlm3’, ‘ssashlm3’, ‘usashlm3’
Arithmetic-shift operand 1 left by a number of bits specified by operand 2, and
store the result in operand 0. Here m is the mode of operand 0 and operand 1;
operand 2’s mode is specified by the instruction pattern, and the compiler will
convert the operand to that mode before generating the instruction. The shift
or rotate expander or instruction pattern should explicitly specify the mode of
the operand 2, it should never be VOIDmode. The meaning of out-of-range shift
counts can optionally be specified by TARGET_SHIFT_TRUNCATION_MASK. See
[TARGET SHIFT TRUNCATION MASK], page 689. Operand 2 is always a
scalar type.
Chapter 17: Machine Descriptions 439
‘atanm2’ Store the arc tangent of operand 1 into operand 0. Both operands have mode
m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
‘fegetroundm’
Store the current machine floating-point rounding mode into operand 0.
Operand 0 has mode m, which is scalar. This pattern is used to implement
the fegetround function from the ISO C99 standard.
‘feclearexceptm’
‘feraiseexceptm’
Clears or raises the supported machine floating-point exceptions represented
by the bits in operand 1. Error status is stored as nonzero value in operand
0. Both operands have mode m, which is a scalar. These patterns are used
to implement the feclearexcept and feraiseexcept functions from the ISO
C99 standard.
‘expm2’ Raise e (the base of natural logarithms) to the power of operand 1 and store the
result in operand 0. Both operands have mode m, which is a scalar or vector
floating-point mode.
This pattern is not allowed to FAIL.
‘expm1m2’ Raise e (the base of natural logarithms) to the power of operand 1, subtract
1, and store the result in operand 0. Both operands have mode m, which is a
scalar or vector floating-point mode.
For inputs close to zero, the pattern is expected to be more accurate than a
separate expm2 and subm3 would be.
This pattern is not allowed to FAIL.
‘exp10m2’ Raise 10 to the power of operand 1 and store the result in operand 0. Both
operands have mode m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
‘exp2m2’ Raise 2 to the power of operand 1 and store the result in operand 0. Both
operands have mode m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
‘logm2’ Store the natural logarithm of operand 1 into operand 0. Both operands have
mode m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
‘log1pm2’ Add 1 to operand 1, compute the natural logarithm, and store the result in
operand 0. Both operands have mode m, which is a scalar or vector floating-
point mode.
For inputs close to zero, the pattern is expected to be more accurate than a
separate addm3 and logm2 would be.
This pattern is not allowed to FAIL.
‘log10m2’ Store the base-10 logarithm of operand 1 into operand 0. Both operands have
mode m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
442 GNU Compiler Collection (GCC) Internals
‘log2m2’ Store the base-2 logarithm of operand 1 into operand 0. Both operands have
mode m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
‘logbm2’ Store the base-FLT_RADIX logarithm of operand 1 into operand 0. Both
operands have mode m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
‘signbitm2’
Store the sign bit of floating-point operand 1 in operand 0. m is either a scalar
or vector mode. When it is a scalar, operand 1 has mode m but operand 0 must
have mode SImode. When m is a vector, operand 1 has the mode m. operand 0’s
mode should be an vector integer mode which has the same number of elements
and the same size as mode m.
This pattern is not allowed to FAIL.
‘significandm2’
Store the significand of floating-point operand 1 in operand 0. Both operands
have mode m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
‘powm3’ Store the value of operand 1 raised to the exponent operand 2 into operand 0.
All operands have mode m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
‘atan2m3’ Store the arc tangent (inverse tangent) of operand 1 divided by operand 2 into
operand 0, using the signs of both arguments to determine the quadrant of the
result. All operands have mode m, which is a scalar or vector floating-point
mode.
This pattern is not allowed to FAIL.
‘floorm2’ Store the largest integral value not greater than operand 1 in operand 0. Both
operands have mode m, which is a scalar or vector floating-point mode. If
-ffp-int-builtin-inexact is in effect, the “inexact” exception may be raised
for noninteger operands; otherwise, it may not.
This pattern is not allowed to FAIL.
‘btruncm2’
Round operand 1 to an integer, towards zero, and store the result in operand 0.
Both operands have mode m, which is a scalar or vector floating-point mode. If
-ffp-int-builtin-inexact is in effect, the “inexact” exception may be raised
for noninteger operands; otherwise, it may not.
This pattern is not allowed to FAIL.
‘roundm2’ Round operand 1 to the nearest integer, rounding away from zero in the event of
a tie, and store the result in operand 0. Both operands have mode m, which is a
scalar or vector floating-point mode. If -ffp-int-builtin-inexact is in effect,
the “inexact” exception may be raised for noninteger operands; otherwise, it
may not.
This pattern is not allowed to FAIL.
Chapter 17: Machine Descriptions 443
‘ceilm2’ Store the smallest integral value not less than operand 1 in operand 0. Both
operands have mode m, which is a scalar or vector floating-point mode. If
-ffp-int-builtin-inexact is in effect, the “inexact” exception may be raised
for noninteger operands; otherwise, it may not.
This pattern is not allowed to FAIL.
‘nearbyintm2’
Round operand 1 to an integer, using the current rounding mode, and store
the result in operand 0. Do not raise an inexact condition when the result is
different from the argument. Both operands have mode m, which is a scalar or
vector floating-point mode.
This pattern is not allowed to FAIL.
‘rintm2’ Round operand 1 to an integer, using the current rounding mode, and store
the result in operand 0. Raise an inexact condition when the result is different
from the argument. Both operands have mode m, which is a scalar or vector
floating-point mode.
This pattern is not allowed to FAIL.
‘lrintmn2’
Convert operand 1 (valid for floating point mode m) to fixed point mode n as
a signed number according to the current rounding mode and store in operand
0 (which has mode n).
‘lroundmn2’
Convert operand 1 (valid for floating point mode m) to fixed point mode n as
a signed number rounding to nearest and away from zero and store in operand
0 (which has mode n).
‘lfloormn2’
Convert operand 1 (valid for floating point mode m) to fixed point mode n as
a signed number rounding down and store in operand 0 (which has mode n).
‘lceilmn2’
Convert operand 1 (valid for floating point mode m) to fixed point mode n as
a signed number rounding up and store in operand 0 (which has mode n).
‘copysignm3’
Store a value with the magnitude of operand 1 and the sign of operand 2 into
operand 0. All operands have mode m, which is a scalar or vector floating-point
mode.
This pattern is not allowed to FAIL.
‘xorsignm3’
Equivalent to ‘op0 = op1 * copysign (1.0, op2)’: store a value with the mag-
nitude of operand 1 and the sign of operand 2 into operand 0. All operands
have mode m, which is a scalar or vector floating-point mode.
This pattern is not allowed to FAIL.
‘issignalingm2’
Set operand 0 to 1 if operand 1 is a signaling NaN and to 0 otherwise.
444 GNU Compiler Collection (GCC) Internals
‘cadd90m3’
Perform vector add and subtract on even/odd number pairs. The operation
being matched is semantically described as
for (int i = 0; i < N; i += 2)
{
c[i] = a[i] - b[i+1];
c[i+1] = a[i+1] + b[i];
}
‘cadd270m3’
Perform vector add and subtract on even/odd number pairs. The operation
being matched is semantically described as
for (int i = 0; i < N; i += 2)
{
c[i] = a[i] + b[i+1];
c[i+1] = a[i+1] - b[i];
}
‘cmlam4’ Perform a vector multiply and accumulate that is semantically the same as a
multiply and accumulate of complex numbers.
complex TYPE op0[N];
complex TYPE op1[N];
complex TYPE op2[N];
complex TYPE op3[N];
for (int i = 0; i < N; i += 1)
{
op0[i] = op1[i] * op2[i] + op3[i];
}
In GCC lane ordering the real part of the number must be in the even lanes
with the imaginary part in the odd lanes.
The operation is only supported for vector modes m.
This pattern is not allowed to FAIL.
Chapter 17: Machine Descriptions 445
‘cmla_conjm4’
Perform a vector multiply by conjugate and accumulate that is semantically
the same as a multiply and accumulate of complex numbers where the second
multiply arguments is conjugated.
complex TYPE op0[N];
complex TYPE op1[N];
complex TYPE op2[N];
complex TYPE op3[N];
for (int i = 0; i < N; i += 1)
{
op0[i] = op1[i] * conj (op2[i]) + op3[i];
}
In GCC lane ordering the real part of the number must be in the even lanes
with the imaginary part in the odd lanes.
The operation is only supported for vector modes m.
This pattern is not allowed to FAIL.
‘cmlsm4’ Perform a vector multiply and subtract that is semantically the same as a
multiply and subtract of complex numbers.
complex TYPE op0[N];
complex TYPE op1[N];
complex TYPE op2[N];
complex TYPE op3[N];
for (int i = 0; i < N; i += 1)
{
op0[i] = op1[i] * op2[i] - op3[i];
}
In GCC lane ordering the real part of the number must be in the even lanes
with the imaginary part in the odd lanes.
The operation is only supported for vector modes m.
This pattern is not allowed to FAIL.
‘cmls_conjm4’
Perform a vector multiply by conjugate and subtract that is semantically the
same as a multiply and subtract of complex numbers where the second multiply
arguments is conjugated.
complex TYPE op0[N];
complex TYPE op1[N];
complex TYPE op2[N];
complex TYPE op3[N];
for (int i = 0; i < N; i += 1)
{
op0[i] = op1[i] * conj (op2[i]) - op3[i];
}
In GCC lane ordering the real part of the number must be in the even lanes
with the imaginary part in the odd lanes.
The operation is only supported for vector modes m.
This pattern is not allowed to FAIL.
‘cmulm4’ Perform a vector multiply that is semantically the same as multiply of complex
numbers.
complex TYPE op0[N];
446 GNU Compiler Collection (GCC) Internals
The fourth operand is the known shared alignment of the source and destination,
in the form of a const_int rtx. Thus, if the compiler knows that both source
and destination are word-aligned, it may provide the value 4 for this operand.
Optional operands 5 and 6 specify expected alignment and size of block respec-
tively. The expected alignment differs from alignment in operand 4 in a way
that the blocks are not required to be aligned according to it in all cases. This
expected alignment is also in bytes, just like operand 4. Expected size, when
unknown, is set to (const_int -1).
Descriptions of multiple cpymemm patterns can only be beneficial if the pat-
terns for smaller modes have fewer restrictions on their first, second and fourth
operands. Note that the mode m in cpymemm does not impose any restriction
on the mode of individually copied data units in the block.
The cpymemm patterns need not give special consideration to the possibility
that the source and destination strings might overlap. An exception is the case
where source and destination are equal, this case needs to be handled correctly.
These patterns are used to do inline expansion of __builtin_memcpy.
‘movmemm’ Block move instruction. The destination and source blocks of memory are the
first two operands, and both are mem:BLKs with an address in mode Pmode.
The number of bytes to copy is the third operand, in mode m. Usually, you
specify Pmode for m. However, if you can generate better code knowing the range
of valid lengths is smaller than those representable in a full Pmode pointer, you
should provide a pattern with a mode corresponding to the range of values you
can handle efficiently (e.g., QImode for values in the range 0–127; note we avoid
numbers that appear negative) and also a pattern with Pmode.
The fourth operand is the known shared alignment of the source and destination,
in the form of a const_int rtx. Thus, if the compiler knows that both source
and destination are word-aligned, it may provide the value 4 for this operand.
Optional operands 5 and 6 specify expected alignment and size of block respec-
tively. The expected alignment differs from alignment in operand 4 in a way
that the blocks are not required to be aligned according to it in all cases. This
expected alignment is also in bytes, just like operand 4. Expected size, when
unknown, is set to (const_int -1).
Descriptions of multiple movmemm patterns can only be beneficial if the pat-
terns for smaller modes have fewer restrictions on their first, second and fourth
operands. Note that the mode m in movmemm does not impose any restriction
on the mode of individually copied data units in the block.
The movmemm patterns must correctly handle the case where the source and
destination strings overlap. These patterns are used to do inline expansion of
__builtin_memmove.
‘movstr’ String copy instruction, with stpcpy semantics. Operand 0 is an output
operand in mode Pmode. The addresses of the destination and source strings
are operands 1 and 2, and both are mem:BLKs with addresses in mode Pmode.
The execution of the expansion of this pattern should store in operand 0 the
address in which the NUL terminator was stored in the destination string.
Chapter 17: Machine Descriptions 449
This pattern has also several optional operands that are same as in setmem.
‘setmemm’ Block set instruction. The destination string is the first operand, given as a
mem:BLK whose address is in mode Pmode. The number of bytes to set is the
second operand, in mode m. The value to initialize the memory with is the
third operand. Targets that only support the clearing of memory should reject
any value that is not the constant 0. See ‘cpymemm’ for a discussion of the choice
of mode.
The fourth operand is the known alignment of the destination, in the form of
a const_int rtx. Thus, if the compiler knows that the destination is word-
aligned, it may provide the value 4 for this operand.
Optional operands 5 and 6 specify expected alignment and size of block re-
spectively. The expected alignment differs from alignment in operand 4 in a
way that the blocks are not required to be aligned according to it in all cases.
This expected alignment is also in bytes, just like operand 4. Expected size,
when unknown, is set to (const_int -1). Operand 7 is the minimal size of the
block and operand 8 is the maximal size of the block (NULL if it cannot be
represented as CONST INT). Operand 9 is the probable maximal size (i.e. we
cannot rely on it for correctness, but it can be used for choosing proper code
sequence for a given size).
The use for multiple setmemm is as for cpymemm.
‘cmpstrnm’
String compare instruction, with five operands. Operand 0 is the output; it
has mode m. The remaining four operands are like the operands of ‘cpymemm’.
The two memory blocks specified are compared byte by byte in lexicographic
order starting at the beginning of each string. The instruction is not allowed to
prefetch more than one byte at a time since either string may end in the first
byte and reading past that may access an invalid page or segment and cause
a fault. The comparison terminates early if the fetched bytes are different or
if they are equal to zero. The effect of the instruction is to store a value in
operand 0 whose sign indicates the result of the comparison.
‘cmpstrm’ String compare instruction, without known maximum length. Operand 0 is the
output; it has mode m. The second and third operand are the blocks of memory
to be compared; both are mem:BLK with an address in mode Pmode.
The fourth operand is the known shared alignment of the source and destination,
in the form of a const_int rtx. Thus, if the compiler knows that both source
and destination are word-aligned, it may provide the value 4 for this operand.
The two memory blocks specified are compared byte by byte in lexicographic
order starting at the beginning of each string. The instruction is not allowed to
prefetch more than one byte at a time since either string may end in the first
byte and reading past that may access an invalid page or segment and cause
a fault. The comparison will terminate when the fetched bytes are different or
if they are equal to zero. The effect of the instruction is to store a value in
operand 0 whose sign indicates the result of the comparison.
‘cmpmemm’ Block compare instruction, with five operands like the operands of ‘cmpstrm’.
The two memory blocks specified are compared byte by byte in lexicographic
450 GNU Compiler Collection (GCC) Internals
order starting at the beginning of each block. Unlike ‘cmpstrm’ the instruction
can prefetch any bytes in the two memory blocks. Also unlike ‘cmpstrm’ the
comparison will not stop if both bytes are zero. The effect of the instruction is
to store a value in operand 0 whose sign indicates the result of the comparison.
‘strlenm’ Compute the length of a string, with three operands. Operand 0 is the result
(of mode m), operand 1 is a mem referring to the first character of the string,
operand 2 is the character to search for (normally zero), and operand 3 is a
constant describing the known alignment of the beginning of the string.
‘rawmemchrm’
Scan memory referred to by operand 1 for the first occurrence of operand 2.
Operand 1 is a mem and operand 2 a const_int of mode m. Operand 0 is the
result, i.e., a pointer to the first occurrence of operand 2 in the memory block
given by operand 1.
‘floatmn2’
Convert signed integer operand 1 (valid for fixed point mode m) to floating
point mode n and store in operand 0 (which has mode n).
‘floatunsmn2’
Convert unsigned integer operand 1 (valid for fixed point mode m) to floating
point mode n and store in operand 0 (which has mode n).
‘fixmn2’ Convert operand 1 (valid for floating point mode m) to fixed point mode n as a
signed number and store in operand 0 (which has mode n). This instruction’s
result is defined only when the value of operand 1 is an integer.
If the machine description defines this pattern, it also needs to define the ftrunc
pattern.
‘fixunsmn2’
Convert operand 1 (valid for floating point mode m) to fixed point mode n as an
unsigned number and store in operand 0 (which has mode n). This instruction’s
result is defined only when the value of operand 1 is an integer.
‘ftruncm2’
Convert operand 1 (valid for floating point mode m) to an integer value, still
represented in floating point mode m, and store it in operand 0 (valid for floating
point mode m).
‘fix_truncmn2’
Like ‘fixmn2’ but works for any floating point value of mode m by converting
the value to an integer.
‘fixuns_truncmn2’
Like ‘fixunsmn2’ but works for any floating point value of mode m by converting
the value to an integer.
‘truncmn2’
Truncate operand 1 (valid for mode m) to mode n and store in operand 0 (which
has mode n). Both modes must be fixed point or both floating point.
Chapter 17: Machine Descriptions 451
‘extendmn2’
Sign-extend operand 1 (valid for mode m) to mode n and store in operand 0
(which has mode n). Both modes must be fixed point or both floating point.
‘zero_extendmn2’
Zero-extend operand 1 (valid for mode m) to mode n and store in operand 0
(which has mode n). Both modes must be fixed point.
‘fractmn2’
Convert operand 1 of mode m to mode n and store in operand 0 (which has mode
n). Mode m and mode n could be fixed-point to fixed-point, signed integer to
fixed-point, fixed-point to signed integer, floating-point to fixed-point, or fixed-
point to floating-point. When overflows or underflows happen, the results are
undefined.
‘satfractmn2’
Convert operand 1 of mode m to mode n and store in operand 0 (which has
mode n). Mode m and mode n could be fixed-point to fixed-point, signed integer
to fixed-point, or floating-point to fixed-point. When overflows or underflows
happen, the instruction saturates the results to the maximum or the minimum.
‘fractunsmn2’
Convert operand 1 of mode m to mode n and store in operand 0 (which has
mode n). Mode m and mode n could be unsigned integer to fixed-point, or
fixed-point to unsigned integer. When overflows or underflows happen, the
results are undefined.
‘satfractunsmn2’
Convert unsigned integer operand 1 of mode m to fixed-point mode n and store
in operand 0 (which has mode n). When overflows or underflows happen, the
instruction saturates the results to the maximum or the minimum.
‘extvm’ Extract a bit-field from register operand 1, sign-extend it, and store it in
operand 0. Operand 2 specifies the width of the field in bits and operand 3 the
starting bit, which counts from the most significant bit if ‘BITS_BIG_ENDIAN’
is true and from the least significant bit otherwise.
Operands 0 and 1 both have mode m. Operands 2 and 3 have a target-specific
mode.
‘extvmisalignm’
Extract a bit-field from memory operand 1, sign extend it, and store it in
operand 0. Operand 2 specifies the width in bits and operand 3 the starting
bit. The starting bit is always somewhere in the first byte of operand 1; it
counts from the most significant bit if ‘BITS_BIG_ENDIAN’ is true and from the
least significant bit otherwise.
Operand 0 has mode m while operand 1 has BLK mode. Operands 2 and 3 have
a target-specific mode.
The instruction must not read beyond the last byte of the bit-field.
‘extzvm’ Like ‘extvm’ except that the bit-field value is zero-extended.
452 GNU Compiler Collection (GCC) Internals
‘extzvmisalignm’
Like ‘extvmisalignm’ except that the bit-field value is zero-extended.
‘insvm’ Insert operand 3 into a bit-field of register operand 0. Operand 1 specifies the
width of the field in bits and operand 2 the starting bit, which counts from the
most significant bit if ‘BITS_BIG_ENDIAN’ is true and from the least significant
bit otherwise.
Operands 0 and 3 both have mode m. Operands 1 and 2 have a target-specific
mode.
‘insvmisalignm’
Insert operand 3 into a bit-field of memory operand 0. Operand 1 specifies
the width of the field in bits and operand 2 the starting bit. The starting bit
is always somewhere in the first byte of operand 0; it counts from the most
significant bit if ‘BITS_BIG_ENDIAN’ is true and from the least significant bit
otherwise.
Operand 3 has mode m while operand 0 has BLK mode. Operands 1 and 2 have
a target-specific mode.
The instruction must not read or write beyond the last byte of the bit-field.
‘extv’ Extract a bit-field from operand 1 (a register or memory operand), where
operand 2 specifies the width in bits and operand 3 the starting bit, and store
it in operand 0. Operand 0 must have mode word_mode. Operand 1 may have
mode byte_mode or word_mode; often word_mode is allowed only for registers.
Operands 2 and 3 must be valid for word_mode.
The RTL generation pass generates this instruction only with constants for
operands 2 and 3 and the constant is never zero for operand 2.
The bit-field value is sign-extended to a full word integer before it is stored in
operand 0.
This pattern is deprecated; please use ‘extvm’ and extvmisalignm instead.
‘extzv’ Like ‘extv’ except that the bit-field value is zero-extended.
This pattern is deprecated; please use ‘extzvm’ and extzvmisalignm instead.
‘insv’ Store operand 3 (which must be valid for word_mode) into a bit-field in operand
0, where operand 1 specifies the width in bits and operand 2 the starting bit.
Operand 0 may have mode byte_mode or word_mode; often word_mode is al-
lowed only for registers. Operands 1 and 2 must be valid for word_mode.
The RTL generation pass generates this instruction only with constants for
operands 1 and 2 and the constant is never zero for operand 1.
This pattern is deprecated; please use ‘insvm’ and insvmisalignm instead.
‘movmodecc’
Conditionally move operand 2 or operand 3 into operand 0 according to the
comparison in operand 1. If the comparison is true, operand 2 is moved into
operand 0, otherwise operand 3 is moved.
The mode of the operands being compared need not be the same as the operands
being moved. Some machines, sparc64 for example, have instructions that
Chapter 17: Machine Descriptions 453
conditionally move an integer value based on the floating point condition codes
and vice versa.
If the machine does not have conditional move instructions, do not define these
patterns.
‘addmodecc’
Similar to ‘movmodecc’ but for conditional addition. Conditionally move
operand 2 or (operands 2 + operand 3) into operand 0 according to the
comparison in operand 1. If the comparison is false, operand 2 is moved into
operand 0, otherwise (operand 2 + operand 3) is moved.
‘cond_negmode’
‘cond_one_cmplmode’
When operand 1 is true, perform an operation on operands 2 and store the
result in operand 0, otherwise store operand 3 in operand 0. The operation
works elementwise if the operands are vectors.
When defined for floating-point modes, the contents of ‘op2[i]’ are not in-
terpreted if ‘op1[i]’ is false, just like they would not be in a normal C ‘?:’
condition.
‘cond_addmode’
‘cond_submode’
‘cond_mulmode’
‘cond_divmode’
‘cond_udivmode’
‘cond_modmode’
‘cond_umodmode’
‘cond_andmode’
‘cond_iormode’
‘cond_xormode’
‘cond_sminmode’
‘cond_smaxmode’
‘cond_uminmode’
‘cond_umaxmode’
‘cond_copysignmode’
‘cond_fminmode’
‘cond_fmaxmode’
‘cond_ashlmode’
‘cond_ashrmode’
‘cond_lshrmode’
When operand 1 is true, perform an operation on operands 2 and 3 and store
the result in operand 0, otherwise store operand 4 in operand 0. The operation
works elementwise if the operands are vectors.
The scalar case is equivalent to:
op0 = op1 ? op2 op op3 : op4;
while the vector case is equivalent to:
for (i = 0; i < GET_MODE_NUNITS (m); i++)
op0[i] = op1[i] ? op2[i] op op3[i] : op4[i];
where, for example, op is + for ‘cond_addmode’.
When defined for floating-point modes, the contents of ‘op3[i]’ are not in-
terpreted if ‘op1[i]’ is false, just like they would not be in a normal C ‘?:’
condition.
Operands 0, 2, 3 and 4 all have mode m. Operand 1 is a scalar integer if m is
scalar, otherwise it has the mode returned by TARGET_VECTORIZE_GET_MASK_
MODE.
‘cond_opmode’ generally corresponds to a conditional form of ‘opmode3’. As an
exception, the vector forms of shifts correspond to patterns like vashlmode3
rather than patterns like ashlmode3.
‘cond_copysignmode’ is only defined for floating point modes.
‘cond_fmamode’
‘cond_fmsmode’
‘cond_fnmamode’
‘cond_fnmsmode’
Like ‘cond_addm’, except that the conditional operation takes 3 operands rather
than two. For example, the vector form of ‘cond_fmamode’ is equivalent to:
for (i = 0; i < GET_MODE_NUNITS (m); i++)
Chapter 17: Machine Descriptions 455
‘cond_len_negmode’
‘cond_len_one_cmplmode’
When operand 1 is true and element index < operand 4 + operand 5, perform
an operation on operands 1 and store the result in operand 0, otherwise store
operand 2 in operand 0. The operation only works for the operands are vectors.
for (i = 0; i < GET_MODE_NUNITS (m); i++)
op0[i] = (i < ops[4] + ops[5] && op1[i]
? op op2[i]
: op3[i]);
where, for example, op is ~ for ‘cond_len_one_cmplmode’.
When defined for floating-point modes, the contents of ‘op2[i]’ are not in-
terpreted if ‘op1[i]’ is false, just like they would not be in a normal C ‘?:’
condition.
Operands 0, 2, and 3 all have mode m. Operand 1 is a scalar integer if m is
scalar, otherwise it has the mode returned by TARGET_VECTORIZE_GET_MASK_
MODE. Operand 4 has whichever integer mode the target prefers.
‘cond_len_opmode’ generally corresponds to a conditional form of ‘opmode2’.
‘cond_len_addmode’
‘cond_len_submode’
‘cond_len_mulmode’
‘cond_len_divmode’
‘cond_len_udivmode’
‘cond_len_modmode’
‘cond_len_umodmode’
‘cond_len_andmode’
‘cond_len_iormode’
‘cond_len_xormode’
‘cond_len_sminmode’
‘cond_len_smaxmode’
‘cond_len_uminmode’
‘cond_len_umaxmode’
‘cond_len_copysignmode’
‘cond_len_fminmode’
‘cond_len_fmaxmode’
‘cond_len_ashlmode’
‘cond_len_ashrmode’
‘cond_len_lshrmode’
When operand 1 is true and element index < operand 5 + operand 6, perform
an operation on operands 2 and 3 and store the result in operand 0, otherwise
store operand 4 in operand 0. The operation only works for the operands are
vectors.
for (i = 0; i < GET_MODE_NUNITS (m); i++)
op0[i] = (i < ops[5] + ops[6] && op1[i]
? op2[i] op op3[i]
: op4[i]);
456 GNU Compiler Collection (GCC) Internals
‘negmodecc’
Similar to ‘movmodecc’ but for conditional negation. Conditionally move the
negation of operand 2 or the unchanged operand 3 into operand 0 according to
the comparison in operand 1. If the comparison is true, the negation of operand
2 is moved into operand 0, otherwise operand 3 is moved.
‘notmodecc’
Similar to ‘negmodecc’ but for conditional complement. Conditionally move
the bitwise complement of operand 2 or the unchanged operand 3 into operand
0 according to the comparison in operand 1. If the comparison is true, the
complement of operand 2 is moved into operand 0, otherwise operand 3 is
moved.
‘cstoremode4’
Store zero or nonzero in operand 0 according to whether a comparison is true.
Operand 1 is a comparison operator. Operand 2 and operand 3 are the first
and second operand of the comparison, respectively. You specify the mode
that operand 0 must have when you write the match_operand expression. The
compiler automatically sees which mode you have used and supplies an operand
of that mode.
The value stored for a true condition must have 1 as its low bit, or else must
be negative. Otherwise the instruction is not suitable and you should omit it
from the machine description. You describe to the compiler exactly which value
is stored by defining the macro STORE_FLAG_VALUE (see Section 18.32 [Misc],
page 687). If a description cannot be found that can be used for all the possible
Chapter 17: Machine Descriptions 457
comparison operators, you should pick one and use a define_expand to map
all results onto the one you chose.
These operations may FAIL, but should do so only in relatively uncommon
cases; if they would FAIL for common cases involving integer comparisons, it is
best to restrict the predicates to not allow these operands. Likewise if a given
comparison operator will always fail, independent of the operands (for floating-
point modes, the ordered_comparison_operator predicate is often useful in
this case).
If this pattern is omitted, the compiler will generate a conditional branch—for
example, it may copy a constant one to the target and branching around an
assignment of zero to the target—or a libcall. If the predicate for operand
1 only rejects some operators, it will also try reordering the operands and/or
inverting the result value (e.g. by an exclusive OR). These possibilities could
be cheaper or equivalent to the instructions used for the ‘cstoremode4’ pattern
followed by those required to convert a positive result from STORE_FLAG_VALUE
to 1; in this case, you can and should make operand 1’s predicate reject some
operators in the ‘cstoremode4’ pattern, or remove the pattern altogether from
the machine description.
‘tbranch_opmode3’
Conditional branch instruction combined with a bit test-and-compare instruc-
tion. Operand 0 is the operand of the comparison. Operand 1 is the bit position
of Operand 1 to test. Operand 3 is the code_label to jump to. op is one of eq
or ne.
‘cbranchmode4’
Conditional branch instruction combined with a compare instruction. Operand
0 is a comparison operator. Operand 1 and operand 2 are the first and second
operands of the comparison, respectively. Operand 3 is the code_label to jump
to.
‘jump’ A jump inside a function; an unconditional branch. Operand 0 is the code_
label to jump to. This pattern name is mandatory on all machines.
‘call’ Subroutine call instruction returning no value. Operand 0 is the function to
call; operand 1 is the number of bytes of arguments pushed as a const_int.
Operand 2 is the result of calling the target hook TARGET_FUNCTION_ARG with
the second argument arg yielding true for arg.end_marker_p (), in a call after
all parameters have been passed to that hook. By default this is the first register
beyond those used for arguments in the call, or NULL if all the argument-registers
are used in the call.
On most machines, operand 2 is not actually stored into the RTL pattern. It is
supplied for the sake of some RISC machines which need to put this information
into the assembler code; they can put it in the RTL instead of operand 1.
Operand 0 should be a mem RTX whose address is the address of the function.
Note, however, that this address can be a symbol_ref expression even if it
would not be a legitimate memory address on the target machine. If it is also
not a valid argument for a call instruction, the pattern for this operation should
458 GNU Compiler Collection (GCC) Internals
For such machines, the condition specified in this pattern should only be true
when reload_completed is nonzero and the function’s epilogue would only be
a single instruction. For machines with register windows, the routine leaf_
function_p may be used to determine if a register window push is required.
Machines that have conditional return instructions should define patterns such
as
(define_insn ""
[(set (pc)
(if_then_else (match_operator
0 "comparison_operator"
[(reg:CC CC_REG) (const_int 0)])
(return)
(pc)))]
"condition"
"...")
where condition would normally be the same condition specified on the named
‘return’ pattern.
‘untyped_return’
Untyped subroutine return instruction. This instruction pattern should be
defined to support __builtin_return on machines where special instructions
are needed to return a value of any type.
Operand 0 is a memory location where the result of calling a function with
__builtin_apply is stored; operand 1 is a parallel expression where each
element is a set expression that indicates the restoring of a function return
value from the result block.
‘nop’ No-op instruction. This instruction pattern name should always be defined to
output a no-op in assembler code. (const_int 0) will do as an RTL pattern.
‘indirect_jump’
An instruction to jump to an address which is operand zero. This pattern name
is mandatory on all machines.
‘casesi’ Instruction to jump through a dispatch table, including bounds checking. This
instruction takes five operands:
1. The index to dispatch on, which has mode SImode.
2. The lower bound for indices in the table, an integer constant.
3. The total range of indices in the table—the largest index minus the smallest
one (both inclusive).
4. A label that precedes the table itself.
5. A label to jump to if the index has a value outside the bounds.
The table is an addr_vec or addr_diff_vec inside of a jump_table_data. The
number of elements in the table is one plus the difference between the upper
bound and the lower bound.
‘tablejump’
Instruction to jump to a variable address. This is a low-level capability which
can be used to implement a dispatch table when there is no ‘casesi’ pattern.
460 GNU Compiler Collection (GCC) Internals
This pattern requires two operands: the address or offset, and a label which
should immediately precede the jump table. If the macro CASE_VECTOR_PC_
RELATIVE evaluates to a nonzero value then the first operand is an offset which
counts from the address of the table; otherwise, it is an absolute address to
jump to. In either case, the first operand has mode Pmode.
The ‘tablejump’ insn is always the last insn before the jump table it uses. Its
assembler code normally has no need to use the second operand, but you should
incorporate it in the RTL pattern so that the jump optimizer will not delete
the table as unreachable code.
‘doloop_end’
Conditional branch instruction that decrements a register and jumps if the
register is nonzero. Operand 0 is the register to decrement and test; operand
1 is the label to jump to if the register is nonzero. See Section 17.14 [Looping
Patterns], page 473.
This optional instruction pattern should be defined for machines with low-
overhead looping instructions as the loop optimizer will try to modify suitable
loops to utilize it. The target hook TARGET_CAN_USE_DOLOOP_P controls the
conditions under which low-overhead loops can be used.
‘doloop_begin’
Companion instruction to doloop_end required for machines that need to per-
form some initialization, such as loading a special counter register. Operand
1 is the associated doloop_end pattern and operand 0 is the register that it
decrements.
If initialization insns do not always need to be emitted, use a define_expand
(see Section 17.16 [Expander Definitions], page 477) and make it fail.
‘canonicalize_funcptr_for_compare’
Canonicalize the function pointer in operand 1 and store the result into operand
0.
Operand 0 is always a reg and has mode Pmode; operand 1 may be a reg, mem,
symbol_ref, const_int, etc and also has mode Pmode.
Canonicalization of a function pointer usually involves computing the address
of the function which would be called if the function pointer were used in an
indirect call.
Only define this pattern if function pointers on the target machine can have
different values but still call the same function when used in an indirect call.
‘save_stack_block’
‘save_stack_function’
‘save_stack_nonlocal’
‘restore_stack_block’
‘restore_stack_function’
‘restore_stack_nonlocal’
Most machines save and restore the stack pointer by copying it to or from an
object of mode Pmode. Do not define these patterns on such machines.
Chapter 17: Machine Descriptions 461
Some machines require special handling for stack pointer saves and restores. On
those machines, define the patterns corresponding to the non-standard cases by
using a define_expand (see Section 17.16 [Expander Definitions], page 477)
that produces the required insns. The three types of saves and restores are:
1. ‘save_stack_block’ saves the stack pointer at the start of a block that
allocates a variable-sized object, and ‘restore_stack_block’ restores the
stack pointer when the block is exited.
2. ‘save_stack_function’ and ‘restore_stack_function’ do a similar job
for the outermost block of a function and are used when the function al-
locates variable-sized objects or calls alloca. Only the epilogue uses the
restored stack pointer, allowing a simpler save or restore sequence on some
machines.
3. ‘save_stack_nonlocal’ is used in functions that contain labels branched to
by nested functions. It saves the stack pointer in such a way that the inner
function can use ‘restore_stack_nonlocal’ to restore the stack pointer.
The compiler generates code to restore the frame and argument pointer
registers, but some machines require saving and restoring additional data
such as register window information or stack backchains. Place insns in
these patterns to save and restore any such required data.
When saving the stack pointer, operand 0 is the save area and operand 1 is the
stack pointer. The mode used to allocate the save area defaults to Pmode but
you can override that choice by defining the STACK_SAVEAREA_MODE macro (see
Section 18.5 [Storage Layout], page 530). You must specify an integral mode, or
VOIDmode if no save area is needed for a particular type of save (either because
no save is needed or because a machine-specific save area can be used). Operand
0 is the stack pointer and operand 1 is the save area for restore operations. If
‘save_stack_block’ is defined, operand 0 must not be VOIDmode since these
saves can be arbitrarily nested.
A save area is a mem that is at a constant offset from virtual_stack_vars_rtx
when the stack pointer is saved for use by nonlocal gotos and a reg in the other
two cases.
‘allocate_stack’
Subtract (or add if STACK_GROWS_DOWNWARD is undefined) operand 1 from the
stack pointer to create space for dynamically allocated data.
Store the resultant pointer to this space into operand 0. If you are allocating
space from the main stack, do this by emitting a move insn to copy virtual_
stack_dynamic_rtx to operand 0. If you are allocating the space elsewhere,
generate code to copy the location of the space to operand 0. In the latter
case, you must ensure this space gets freed when the corresponding space on
the main stack is free.
Do not define this pattern if all that must be done is the subtraction. Some
machines require other operations such as stack probes or maintaining the back
chain. Define this pattern to emit those operations in addition to updating the
stack pointer.
462 GNU Compiler Collection (GCC) Internals
‘check_stack’
If stack checking (see Section 18.9.3 [Stack Checking], page 571) cannot be done
on your system by probing the stack, define this pattern to perform the needed
check and signal an error if the stack has overflowed. The single operand is
the address in the stack farthest from the current stack pointer that you need
to validate. Normally, on platforms where this pattern is needed, you would
obtain the stack limit from a global or thread-specific variable or register.
‘probe_stack_address’
If stack checking (see Section 18.9.3 [Stack Checking], page 571) can be done
on your system by probing the stack but without the need to actually access it,
define this pattern and signal an error if the stack has overflowed. The single
operand is the memory address in the stack that needs to be probed.
‘probe_stack’
If stack checking (see Section 18.9.3 [Stack Checking], page 571) can be done on
your system by probing the stack but doing it with a “store zero” instruction
is not valid or optimal, define this pattern to do the probing differently and
signal an error if the stack has overflowed. The single operand is the memory
reference in the stack that needs to be probed.
‘nonlocal_goto’
Emit code to generate a non-local goto, e.g., a jump from one function to a
label in an outer function. This pattern has four arguments, each representing
a value to be used in the jump. The first argument is to be loaded into the
frame pointer, the second is the address to branch to (code to dispatch to the
actual label), the third is the address of a location where the stack is saved, and
the last is the address of the label, to be placed in the location for the incoming
static chain.
On most machines you need not define this pattern, since GCC will already
generate the correct code, which is to load the frame pointer and static chain,
restore the stack (using the ‘restore_stack_nonlocal’ pattern, if defined),
and jump indirectly to the dispatcher. You need only define this pattern if this
code will not work on your machine.
‘nonlocal_goto_receiver’
This pattern, if defined, contains code needed at the target of a nonlocal goto
after the code already generated by GCC. You will not normally need to define
this pattern. A typical reason why you might need this pattern is if some value,
such as a pointer to a global table, must be restored when the frame pointer
is restored. Note that a nonlocal goto only occurs within a unit-of-translation,
so a global table pointer that is shared by all functions of a given module need
not be restored. There are no arguments.
‘exception_receiver’
This pattern, if defined, contains code needed at the site of an exception handler
that isn’t needed at the site of a nonlocal goto. You will not normally need
to define this pattern. A typical reason why you might need this pattern is if
some value, such as a pointer to a global table, must be restored after control
flow is branched to the handler of an exception. There are no arguments.
Chapter 17: Machine Descriptions 463
‘builtin_setjmp_setup’
This pattern, if defined, contains additional code needed to initialize the jmp_
buf. You will not normally need to define this pattern. A typical reason why
you might need this pattern is if some value, such as a pointer to a global table,
must be restored. Though it is preferred that the pointer value be recalculated
if possible (given the address of a label for instance). The single argument is
a pointer to the jmp_buf. Note that the buffer is five words long and that the
first three are normally used by the generic mechanism.
‘builtin_setjmp_receiver’
This pattern, if defined, contains code needed at the site of a built-in setjmp
that isn’t needed at the site of a nonlocal goto. You will not normally need
to define this pattern. A typical reason why you might need this pattern is if
some value, such as a pointer to a global table, must be restored. It takes one
argument, which is the label to which builtin longjmp transferred control; this
pattern may be emitted at a small offset from that label.
‘builtin_longjmp’
This pattern, if defined, performs the entire action of the longjmp. You will not
normally need to define this pattern unless you also define builtin_setjmp_
setup. The single argument is a pointer to the jmp_buf.
‘eh_return’
This pattern, if defined, affects the way __builtin_eh_return, and thence the
call frame exception handling library routines, are built. It is intended to handle
non-trivial actions needed along the abnormal return path.
The address of the exception handler to which the function should return is
passed as operand to this pattern. It will normally need to copied by the
pattern to some special register or memory location. If the pattern needs to
determine the location of the target call frame in order to do so, it may use
EH_RETURN_STACKADJ_RTX, if defined; it will have already been assigned.
If this pattern is not defined, the default action will be to simply copy the return
address to EH_RETURN_HANDLER_RTX. Either that macro or this pattern needs
to be defined if call frame exception handling is to be used.
‘prologue’
This pattern, if defined, emits RTL for entry to a function. The function entry is
responsible for setting up the stack frame, initializing the frame pointer register,
saving callee saved registers, etc.
Using a prologue pattern is generally preferred over defining TARGET_ASM_
FUNCTION_PROLOGUE to emit assembly code for the prologue.
The prologue pattern is particularly useful for targets which perform instruc-
tion scheduling.
‘window_save’
This pattern, if defined, emits RTL for a register window save. It should be
defined if the target machine has register windows but the window events are
decoupled from calls to subroutines. The canonical example is the SPARC
architecture.
464 GNU Compiler Collection (GCC) Internals
‘epilogue’
This pattern emits RTL for exit from a function. The function exit is responsible
for deallocating the stack frame, restoring callee saved registers and emitting
the return instruction.
Using an epilogue pattern is generally preferred over defining TARGET_ASM_
FUNCTION_EPILOGUE to emit assembly code for the epilogue.
The epilogue pattern is particularly useful for targets which perform instruc-
tion scheduling or which have delay slots for their return instruction.
‘sibcall_epilogue’
This pattern, if defined, emits RTL for exit from a function without the final
branch back to the calling function. This pattern will be emitted before any
sibling call (aka tail call) sites.
The sibcall_epilogue pattern must not clobber any arguments used for pa-
rameter passing or any stack slots for arguments passed to the current function.
‘trap’ This pattern, if defined, signals an error, typically by causing some kind of
signal to be raised.
‘ctrapMM4’
Conditional trap instruction. Operand 0 is a piece of RTL which performs a
comparison, and operands 1 and 2 are the arms of the comparison. Operand 3
is the trap code, an integer.
A typical ctrap pattern looks like
(define_insn "ctrapsi4"
[(trap_if (match_operator 0 "trap_operator"
[(match_operand 1 "register_operand")
(match_operand 2 "immediate_operand")])
(match_operand 3 "const_int_operand" "i"))]
""
"...")
‘prefetch’
This pattern, if defined, emits code for a non-faulting data prefetch instruction.
Operand 0 is the address of the memory to prefetch. Operand 1 is a constant
1 if the prefetch is preparing for a write to the memory address, or a constant
0 otherwise. Operand 2 is the expected degree of temporal locality of the data
and is a value between 0 and 3, inclusive; 0 means that the data has no temporal
locality, so it need not be left in the cache after the access; 3 means that the
data has a high degree of temporal locality and should be left in all levels of
cache possible; 1 and 2 mean, respectively, a low or moderate degree of temporal
locality.
Targets that do not support write prefetches or locality hints can ignore the
values of operands 1 and 2.
‘blockage’
This pattern defines a pseudo insn that prevents the instruction scheduler
and other passes from moving instructions and using register equivalences
across the boundary defined by the blockage insn. This needs to be an
UNSPEC VOLATILE pattern or a volatile ASM.
Chapter 17: Machine Descriptions 465
‘memory_blockage’
This pattern, if defined, represents a compiler memory barrier, and will be
placed at points across which RTL passes may not propagate memory accesses.
This instruction needs to read and write volatile BLKmode memory. It does
not need to generate any machine instruction. If this pattern is not defined, the
compiler falls back to emitting an instruction corresponding to asm volatile
("" ::: "memory").
‘memory_barrier’
If the target memory model is not fully synchronous, then this pattern should be
defined to an instruction that orders both loads and stores before the instruction
with respect to loads and stores after the instruction. This pattern has no
operands.
‘speculation_barrier’
If the target can support speculative execution, then this pattern should be
defined to an instruction that will block subsequent execution until any prior
speculation conditions has been resolved. The pattern must also ensure that
the compiler cannot move memory operations past the barrier, so it needs to
be an UNSPEC VOLATILE pattern. The pattern has no operands.
If this pattern is not defined then the default expansion of __builtin_
speculation_safe_value will emit a warning. You can suppress this warning
by defining this pattern with a final condition of 0 (zero), which tells the
compiler that a speculation barrier is not needed for this target.
‘sync_compare_and_swapmode’
This pattern, if defined, emits code for an atomic compare-and-swap operation.
Operand 1 is the memory on which the atomic operation is performed. Operand
2 is the “old” value to be compared against the current contents of the memory
location. Operand 3 is the “new” value to store in the memory if the compare
succeeds. Operand 0 is the result of the operation; it should contain the contents
of the memory before the operation. If the compare succeeds, this should
obviously be a copy of operand 2.
This pattern must show that both operand 0 and operand 1 are modified.
This pattern must issue any memory barrier instructions such that all memory
operations before the atomic operation occur before the atomic operation and all
memory operations after the atomic operation occur after the atomic operation.
For targets where the success or failure of the compare-and-swap operation is
available via the status flags, it is possible to avoid a separate compare opera-
tion and issue the subsequent branch or store-flag operation immediately after
the compare-and-swap. To this end, GCC will look for a MODE_CC set in the
output of sync_compare_and_swapmode; if the machine description includes
such a set, the target should also define special cbranchcc4 and/or cstorecc4
instructions. GCC will then be able to take the destination of the MODE_CC set
and pass it to the cbranchcc4 or cstorecc4 pattern as the first operand of the
comparison (the second will be (const_int 0)).
For targets where the operating system may provide support for this opera-
tion via library calls, the sync_compare_and_swap_optab may be initialized
466 GNU Compiler Collection (GCC) Internals
and 0 if the bit was previously clear. The true contents of the memory operand
are implementation defined.
This pattern must issue any memory barrier instructions such that the pattern
as a whole acts as an acquire barrier, that is all memory operations after the
pattern do not occur until the lock is acquired.
If this pattern is not defined, the operation will be constructed from a compare-
and-swap operation, if defined.
‘sync_lock_releasemode’
This pattern, if defined, releases a lock set by sync_lock_test_and_setmode.
Operand 0 is the memory that contains the lock; operand 1 is the value to store
in the lock.
If the target doesn’t implement full semantics for sync_lock_test_and_
setmode, any value operand which is not the constant 0 should be rejected
with FAIL, and the true contents of the memory operand are implementation
defined.
This pattern must issue any memory barrier instructions such that the pattern
as a whole acts as a release barrier, that is the lock is released only after all
previous memory operations have completed.
If this pattern is not defined, then a memory_barrier pattern will be emitted,
followed by a store of the value to the memory operand.
‘atomic_compare_and_swapmode’
This pattern, if defined, emits code for an atomic compare-and-swap operation
with memory model semantics. Operand 2 is the memory on which the atomic
operation is performed. Operand 0 is an output operand which is set to true
or false based on whether the operation succeeded. Operand 1 is an output
operand which is set to the contents of the memory before the operation was
attempted. Operand 3 is the value that is expected to be in memory. Operand 4
is the value to put in memory if the expected value is found there. Operand 5 is
set to 1 if this compare and swap is to be treated as a weak operation. Operand
6 is the memory model to be used if the operation is a success. Operand 7 is
the memory model to be used if the operation fails.
If memory referred to in operand 2 contains the value in operand 3, then operand
4 is stored in memory pointed to by operand 2 and fencing based on the memory
model in operand 6 is issued.
If memory referred to in operand 2 does not contain the value in operand 3,
then fencing based on the memory model in operand 7 is issued.
If a target does not support weak compare-and-swap operations, or the port
elects not to implement weak operations, the argument in operand 5 can be
ignored. Note a strong implementation must be provided.
If this pattern is not provided, the __atomic_compare_exchange built-in
functions will utilize the legacy sync_compare_and_swap pattern with an
__ATOMIC_SEQ_CST memory model.
468 GNU Compiler Collection (GCC) Internals
‘atomic_loadmode’
This pattern implements an atomic load operation with memory model seman-
tics. Operand 1 is the memory address being loaded from. Operand 0 is the
result of the load. Operand 2 is the memory model to be used for the load
operation.
If not present, the __atomic_load built-in function will either resort to a normal
load with memory barriers, or a compare-and-swap operation if a normal load
would not be atomic.
‘atomic_storemode’
This pattern implements an atomic store operation with memory model seman-
tics. Operand 0 is the memory address being stored to. Operand 1 is the value
to be written. Operand 2 is the memory model to be used for the operation.
If not present, the __atomic_store built-in function will attempt to perform
a normal store and surround it with any required memory fences. If the store
would not be atomic, then an __atomic_exchange is attempted with the result
being ignored.
‘atomic_exchangemode’
This pattern implements an atomic exchange operation with memory model
semantics. Operand 1 is the memory location the operation is performed on.
Operand 0 is an output operand which is set to the original value contained
in the memory pointed to by operand 1. Operand 2 is the value to be stored.
Operand 3 is the memory model to be used.
If this pattern is not present, the built-in function __atomic_exchange will
attempt to preform the operation with a compare and swap loop.
‘atomic_addmode’, ‘atomic_submode’
‘atomic_ormode’, ‘atomic_andmode’
‘atomic_xormode’, ‘atomic_nandmode’
These patterns emit code for an atomic operation on memory with memory
model semantics. Operand 0 is the memory on which the atomic operation is
performed. Operand 1 is the second operand to the binary operator. Operand
2 is the memory model to be used by the operation.
If these patterns are not defined, attempts will be made to use legacy sync
patterns, or equivalent patterns which return a result. If none of these are
available a compare-and-swap loop will be used.
‘atomic_fetch_addmode’, ‘atomic_fetch_submode’
‘atomic_fetch_ormode’, ‘atomic_fetch_andmode’
‘atomic_fetch_xormode’, ‘atomic_fetch_nandmode’
These patterns emit code for an atomic operation on memory with memory
model semantics, and return the original value. Operand 0 is an output operand
which contains the value of the memory location before the operation was per-
formed. Operand 1 is the memory on which the atomic operation is performed.
Operand 2 is the second operand to the binary operator. Operand 3 is the
memory model to be used by the operation.
If these patterns are not defined, attempts will be made to use legacy sync
patterns. If none of these are available a compare-and-swap loop will be used.
Chapter 17: Machine Descriptions 469
‘atomic_add_fetchmode’, ‘atomic_sub_fetchmode’
‘atomic_or_fetchmode’, ‘atomic_and_fetchmode’
‘atomic_xor_fetchmode’, ‘atomic_nand_fetchmode’
These patterns emit code for an atomic operation on memory with mem-
ory model semantics and return the result after the operation is performed.
Operand 0 is an output operand which contains the value after the operation.
Operand 1 is the memory on which the atomic operation is performed. Operand
2 is the second operand to the binary operator. Operand 3 is the memory model
to be used by the operation.
If these patterns are not defined, attempts will be made to use legacy sync
patterns, or equivalent patterns which return the result before the operation
followed by the arithmetic operation required to produce the result. If none of
these are available a compare-and-swap loop will be used.
‘atomic_test_and_set’
This pattern emits code for __builtin_atomic_test_and_set. Operand 0 is
an output operand which is set to true if the previous previous contents of the
byte was "set", and false otherwise. Operand 1 is the QImode memory to be
modified. Operand 2 is the memory model to be used.
The specific value that defines "set" is implementation defined, and is normally
based on what is performed by the native atomic test and set instruction.
‘atomic_bit_test_and_setmode’
‘atomic_bit_test_and_complementmode’
‘atomic_bit_test_and_resetmode’
These patterns emit code for an atomic bitwise operation on memory with mem-
ory model semantics, and return the original value of the specified bit. Operand
0 is an output operand which contains the value of the specified bit from the
memory location before the operation was performed. Operand 1 is the memory
on which the atomic operation is performed. Operand 2 is the bit within the
operand, starting with least significant bit. Operand 3 is the memory model to
be used by the operation. Operand 4 is a flag - it is const1_rtx if operand 0
should contain the original value of the specified bit in the least significant bit
of the operand, and const0_rtx if the bit should be in its original position in
the operand. atomic_bit_test_and_setmode atomically sets the specified bit
after remembering its original value, atomic_bit_test_and_complementmode
inverts the specified bit and atomic_bit_test_and_resetmode clears the spec-
ified bit.
If these patterns are not defined, attempts will be made to use atomic_fetch_
ormode, atomic_fetch_xormode or atomic_fetch_andmode instruction pat-
terns, or their sync counterparts. If none of these are available a compare-and-
swap loop will be used.
470 GNU Compiler Collection (GCC) Internals
‘atomic_add_fetch_cmp_0mode’
‘atomic_sub_fetch_cmp_0mode’
‘atomic_and_fetch_cmp_0mode’
‘atomic_or_fetch_cmp_0mode’
‘atomic_xor_fetch_cmp_0mode’
These patterns emit code for an atomic operation on memory with memory
model semantics if the fetch result is used only in a comparison against zero.
Operand 0 is an output operand which contains a boolean result of comparison
of the value after the operation against zero. Operand 1 is the memory on
which the atomic operation is performed. Operand 2 is the second operand
to the binary operator. Operand 3 is the memory model to be used by the
operation. Operand 4 is an integer holding the comparison code, one of EQ, NE,
LT, GT, LE or GE.
If these patterns are not defined, attempts will be made to use separate atomic
operation and fetch pattern followed by comparison of the result against zero.
‘mem_thread_fence’
This pattern emits code required to implement a thread fence with memory
model semantics. Operand 0 is the memory model to be used.
For the __ATOMIC_RELAXED model no instructions need to be issued and this
expansion is not invoked.
The compiler always emits a compiler memory barrier regardless of what ex-
panding this pattern produced.
If this pattern is not defined, the compiler falls back to expanding the memory_
barrier pattern, then to emitting __sync_synchronize library call, and finally
to just placing a compiler memory barrier.
‘get_thread_pointermode’
‘set_thread_pointermode’
These patterns emit code that reads/sets the TLS thread pointer. Currently,
these are only needed if the target needs to support the __builtin_thread_
pointer and __builtin_set_thread_pointer builtins.
The get/set patterns have a single output/input operand respectively, with
mode intended to be Pmode.
‘stack_protect_combined_set’
This pattern, if defined, moves a ptr_mode value from an address whose decla-
ration RTX is given in operand 1 to the memory in operand 0 without leaving
the value in a register afterward. If several instructions are needed by the target
to perform the operation (eg. to load the address from a GOT entry then load
the ptr_mode value and finally store it), it is the backend’s responsibility to en-
sure no intermediate result gets spilled. This is to avoid leaking the value some
place that an attacker might use to rewrite the stack guard slot after having
clobbered it.
If this pattern is not defined, then the address declaration is expanded first in
the standard way and a stack_protect_set pattern is then generated to move
the value from that address to the address in operand 0.
Chapter 17: Machine Descriptions 471
‘stack_protect_set’
This pattern, if defined, moves a ptr_mode value from the valid memory location
in operand 1 to the memory in operand 0 without leaving the value in a register
afterward. This is to avoid leaking the value some place that an attacker might
use to rewrite the stack guard slot after having clobbered it.
Note: on targets where the addressing modes do not allow to load directly from
stack guard address, the address is expanded in a standard way first which
could cause some spills.
If this pattern is not defined, then a plain move pattern is generated.
‘stack_protect_combined_test’
This pattern, if defined, compares a ptr_mode value from an address whose
declaration RTX is given in operand 1 with the memory in operand 0 without
leaving the value in a register afterward and branches to operand 2 if the values
were equal. If several instructions are needed by the target to perform the
operation (eg. to load the address from a GOT entry then load the ptr_
mode value and finally store it), it is the backend’s responsibility to ensure no
intermediate result gets spilled. This is to avoid leaking the value some place
that an attacker might use to rewrite the stack guard slot after having clobbered
it.
If this pattern is not defined, then the address declaration is expanded first
in the standard way and a stack_protect_test pattern is then generated to
compare the value from that address to the value at the memory in operand 0.
‘stack_protect_test’
This pattern, if defined, compares a ptr_mode value from the valid memory
location in operand 1 with the memory in operand 0 without leaving the value
in a register afterward and branches to operand 2 if the values were equal.
If this pattern is not defined, then a plain compare pattern and conditional
branch pattern is used.
‘clear_cache’
This pattern, if defined, flushes the instruction cache for a region of memory.
The region is bounded to by the Pmode pointers in operand 0 inclusive and
operand 1 exclusive.
If this pattern is not defined, a call to the library function __clear_cache is
used.
‘spaceshipm3’
Initialize output operand 0 with mode of integer type to -1, 0, 1 or 2 if operand
1 with mode m compares less than operand 2, equal to operand 2, greater than
operand 2 or is unordered with operand 2. m should be a scalar floating point
mode.
This pattern is not allowed to FAIL.
(patterns that will match fewer things) and faster instructions (those that will produce
better code when they do match) should usually go first in the description.
In some cases the effect of ordering the patterns can be used to hide a pattern when it is
not valid. For example, the 68000 has an instruction for converting a fullword to floating
point and another for converting a byte to floating point. An instruction converting an
integer to floating point could match either one. We put the pattern to convert the fullword
first to make sure that one will be used rather than the other. (Otherwise a large integer
might be generated as a single-byte immediate quantity, which would not work.) Instead
of using this pattern ordering it would be possible to make the pattern for convert-a-byte
smart enough to deal properly with any constant value.
Two separate insns are always used on most machines that use a separate condition code
register (see Section 18.15 [Condition Code], page 617).
Even in this case having a single entry point for conditional branches is advantageous,
because it handles equally well the case where a single comparison instruction records the
results of both signed and unsigned comparison of the given operands (with the branch
insns coming in distinct signed and unsigned flavors) as in the x86 or SPARC, and the
case where there are distinct signed and unsigned compare instructions and only one set of
conditional branch instructions as in the PowerPC.
GCC has two special named patterns to support low overhead looping. They are
‘doloop_begin’ and ‘doloop_end’. These are emitted by the loop optimizer for certain
well-behaved loops with a finite number of loop iterations using information collected
during strength reduction.
The ‘doloop_end’ pattern describes the actual looping instruction (or the implicit looping
operation) and the ‘doloop_begin’ pattern is an optional companion pattern that can be
used for initialization needed for some low-overhead looping instructions.
Note that some machines require the actual looping instruction to be emitted at the
top of the loop (e.g., the TMS320C3x/C4x DSPs). Emitting the true RTL for a looping
instruction at the top of the loop can cause problems with flow analysis. So instead, a
dummy doloop insn is emitted at the end of the loop. The machine dependent reorg pass
checks for the presence of this doloop insn and then searches back to the top of the loop,
where it inserts the true looping insn (provided there are no instructions in the loop which
would cause problems). Any additional labels can be emitted at this point. In addition,
if the desired special iteration counter register was not allocated, this machine dependent
reorg pass could emit a traditional compare and jump instruction pair.
For the ‘doloop_end’ pattern, the loop optimizer allocates an additional pseudo register
as an iteration counter. This pseudo register cannot be used within the loop (i.e., general
induction variables cannot be derived from it), however, in many cases the loop induction
variable may become redundant and removed by the flow pass.
The ‘doloop_end’ pattern must have a specific structure to be handled correctly by GCC.
The example below is taken (slightly simplified) from the PDP-11 target:
474 GNU Compiler Collection (GCC) Internals
(define_expand "doloop_end"
[(parallel [(set (pc)
(if_then_else
(ne (match_operand:HI 0 "nonimmediate_operand" "+r,!m")
(const_int 1))
(label_ref (match_operand 1 "" ""))
(pc)))
(set (match_dup 0)
(plus:HI (match_dup 0)
(const_int -1)))])]
""
"{
if (GET_MODE (operands[0]) != HImode)
FAIL;
}")
(define_insn "doloop_end_insn"
[(set (pc)
(if_then_else
(ne (match_operand:HI 0 "nonimmediate_operand" "+r,!m")
(const_int 1))
(label_ref (match_operand 1 "" ""))
(pc)))
(set (match_dup 0)
(plus:HI (match_dup 0)
(const_int -1)))]
""
{
if (which_alternative == 0)
return "sob %0,%l1";
/* emulate sob */
output_asm_insn ("dec %0", operands);
return "bne %l1";
})
The first part of the pattern describes the branch condition. GCC supports three cases
for the way the target machine handles the loop counter:
• Loop terminates when the loop register decrements to zero. This is represented by a
ne comparison of the register (its old value) with constant 1 (as in the example above).
• Loop terminates when the loop register decrements to −1. This is represented by a ne
comparison of the register with constant zero.
• Loop terminates when the loop register decrements to a negative value. This is repre-
sented by a ge comparison of the register with constant zero. For this case, GCC will
attach a REG_NONNEG note to the doloop_end insn if it can determine that the register
will be non-negative.
Since the doloop_end insn is a jump insn that also has an output, the reload pass does
not handle the output operand. Therefore, the constraint must allow for that operand to
be in memory rather than a register. In the example shown above, that is handled (in the
doloop_end_insn pattern) by using a loop instruction sequence that can handle memory
operands when the memory alternative appears.
GCC does not check the mode of the loop register operand when generating the doloop_
end pattern. If the pattern is only valid for some modes but not others, the pattern should
Chapter 17: Machine Descriptions 475
be a define_expand pattern that checks the operand mode in the preparation code, and
issues FAIL if an unsupported mode is found. The example above does this, since the
machine instruction to be used only exists for HImode.
If the doloop_end pattern is a define_expand, there must also be a define_insn or
define_insn_and_split matching the generated pattern. Otherwise, the compiler will fail
during loop optimization.
• An operand of neg, not, mult, plus, or minus is made the first operand under the
same conditions as above.
• (ltu (plus a b) b) is converted to (ltu (plus a b) a). Likewise with geu instead of
ltu.
• (minus x (const_int n)) is converted to (plus x (const_int -n)).
• Within address computations (i.e., inside mem), a left shift is converted into the appro-
priate multiplication by a power of two.
• De Morgan’s Law is used to move bitwise negation inside a bitwise logical-and or
logical-or operation. If this results in only one operand being a not expression, it will
be the first one.
A machine that has an instruction that performs a bitwise logical-and of one operand
with the bitwise negation of the other should specify the pattern for that instruction
as
(define_insn ""
[(set (match_operand:m 0 ...)
(and:m (not:m (match_operand:m 1 ...))
(match_operand:m 2 ...)))]
"..."
"...")
Similarly, a pattern for a “NAND” instruction should be written
(define_insn ""
[(set (match_operand:m 0 ...)
(ior:m (not:m (match_operand:m 1 ...))
(not:m (match_operand:m 2 ...))))]
"..."
"...")
In both cases, it is not necessary to include patterns for the many logically equivalent
RTL expressions.
• The only possible RTL expressions involving both bitwise exclusive-or and bitwise
negation are (xor:m x y) and (not:m (xor:m x y)).
• The sum of three items, one of which is a constant, will only appear in the form
(plus:m (plus:m x y) constant)
• Equality comparisons of a group of bits (usually a single bit) with zero will be written
using zero_extract rather than the equivalent and or sign_extract operations.
• (sign_extend:m1 (mult:m2 (sign_extend:m2 x) (sign_extend:m2 y))) is
converted to (mult:m1 (sign_extend:m1 x) (sign_extend:m1 y)), and likewise for
zero_extend.
• (sign_extend:m1 (mult:m2 (ashiftrt:m2 x s) (sign_extend:m2 y))) is converted
to (mult:m1 (sign_extend:m1 (ashiftrt:m2 x s)) (sign_extend:m1 y)), and like-
wise for patterns using zero_extend and lshiftrt. If the second operand of mult is
also a shift, then that is extended also. This transformation is only applied when it
can be proven that the original operation had sufficient precision to prevent overflow.
use of this pattern. Instead, they are computed within the pattern, in the preparation
statements. These statements compute the values and store them into the appropriate
elements of operands so that match_dup can find them.
There are two special macros defined for use in the preparation statements: DONE and
FAIL. Use them with a following semicolon, as a statement.
DONE Use the DONE macro to end RTL generation for the pattern. The only RTL
insns resulting from the pattern on this occasion will be those already emitted
by explicit calls to emit_insn within the preparation statements; the RTL
template will not be generated.
FAIL Make the pattern fail on this occasion. When a pattern fails, it means that the
pattern was not truly available. The calling routines in the compiler will try
other strategies for code generation using other patterns.
Failure is currently supported only for binary (addition, multiplication, shifting,
etc.) and bit-field (extv, extzv, and insv) operations.
If the preparation falls through (invokes neither DONE nor FAIL), then the define_expand
acts like a define_insn in that the RTL template is used to generate the insn.
The RTL template is not used for matching, only for generating the initial insn list. If
the preparation statement always invokes DONE or FAIL, the RTL template may be reduced
to a simple list of operands, such as this example:
(define_expand "addsi3"
[(match_operand:SI 0 "register_operand" "")
(match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "register_operand" "")]
""
"
{
handle_add (operands[0], operands[1], operands[2]);
DONE;
}")
Here is an example, the definition of left-shift for the SPUR chip:
(define_expand "ashlsi3"
[(set (match_operand:SI 0 "register_operand" "")
(ashift:SI
(match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "nonmemory_operand" "")))]
""
"
{
if (GET_CODE (operands[2]) != CONST_INT
|| (unsigned) INTVAL (operands[2]) > 3)
FAIL;
}")
This example uses define_expand so that it can generate an RTL insn for shifting when the
shift-count is in the supported range of 0 to 3 but fail in other cases where machine insns
aren’t available. When it fails, the compiler tries another strategy using different patterns
(such as, a library call).
If the compiler were able to handle nontrivial condition-strings in patterns with names,
then it would be possible to use a define_insn in that case. Here is another case (zero-
extension on the 68000) which makes more use of the power of define_expand:
Chapter 17: Machine Descriptions 479
(define_expand "zero_extendhisi2"
[(set (match_operand:SI 0 "general_operand" "")
(const_int 0))
(set (strict_low_part
(subreg:HI
(match_dup 0)
0))
(match_operand:HI 1 "general_operand" ""))]
""
"operands[1] = make_safe_from (operands[1], operands[0]);")
Here two RTL insns are generated, one to clear the entire output operand and the other to
copy the input operand into its low half. This sequence is incorrect if the input operand
refers to [the old value of] the output operand, so the preparation statement makes sure this
isn’t so. The function make_safe_from copies the operands[1] into a temporary register
if it refers to operands[0]. It does this by emitting another RTL insn.
Finally, a third example shows the use of an internal operand. Zero-extension on the
SPUR chip is done by and-ing the result against a halfword mask. But this mask cannot
be represented by a const_int because the constant value is too large to be legitimate on
this machine. So it must be copied into a register with force_reg and then the register
used in the and.
(define_expand "zero_extendhisi2"
[(set (match_operand:SI 0 "register_operand" "")
(and:SI (subreg:SI
(match_operand:HI 1 "register_operand" "")
0)
(match_dup 2)))]
""
"operands[2]
= force_reg (SImode, GEN_INT (65535)); ")
The insn combiner phase also splits putative insns. If three insns are merged into one
insn with a complex expression that cannot be matched by some define_insn pattern,
the combiner phase attempts to split the complex pattern into two insns that are recog-
nized. Usually it can break the complex pattern into two patterns by splitting out some
subexpression. However, in some other cases, such as performing an addition of a large
constant in two insns on a RISC machine, the way to split the addition into two insns is
machine-dependent.
The define_split definition tells the compiler how to split a complex insn into several
simpler insns. It looks like this:
(define_split
[insn-pattern]
"condition"
[new-insn-pattern-1
new-insn-pattern-2
...]
"preparation-statements")
insn-pattern is a pattern that needs to be split and condition is the final condition to be
tested, as in a define_insn. When an insn matching insn-pattern and satisfying condition
is found, it is replaced in the insn list with the insns given by new-insn-pattern-1, new-insn-
pattern-2, etc.
The preparation-statements are similar to those statements that are specified for define_
expand (see Section 17.16 [Expander Definitions], page 477) and are executed before the
new RTL is generated to prepare for the generated code or emit some insns whose pattern
is not fixed. Unlike those in define_expand, however, these statements must not generate
any new pseudo-registers. Once reload has completed, they also must not allocate any space
in the stack frame.
There are two special macros defined for use in the preparation statements: DONE and
FAIL. Use them with a following semicolon, as a statement.
DONE Use the DONE macro to end RTL generation for the splitter. The only RTL
insns generated as replacement for the matched input insn will be those already
emitted by explicit calls to emit_insn within the preparation statements; the
replacement pattern is not used.
FAIL Make the define_split fail on this occasion. When a define_split fails, it
means that the splitter was not truly available for the inputs it was given, and
the input insn will not be split.
If the preparation falls through (invokes neither DONE nor FAIL), then the define_split
uses the replacement template.
Patterns are matched against insn-pattern in two different circumstances. If an insn
needs to be split for delay slot scheduling or insn scheduling, the insn is already known
to be valid, which means that it must have been matched by some define_insn and, if
reload_completed is nonzero, is known to satisfy the constraints of that define_insn. In
that case, the new insn patterns must also be insns that are matched by some define_insn
and, if reload_completed is nonzero, must also satisfy the constraints of those definitions.
As an example of this usage of define_split, consider the following example from
a29k.md, which splits a sign_extend from HImode to SImode into a pair of shift insns:
(define_split
Chapter 17: Machine Descriptions 481
"
{
/* Get the constant we are comparing against, C, and see what it
looks like sign-extended to 16 bits. Then see what constant
could be XOR’ed with C to get the sign-extended value. */
(const_int 0)))
(set (match_operand:PRED_ALL 0 "register_operand" "=Upa")
(unspec:PRED_ALL [(match_dup 2)
(match_dup 3)]
UNSPEC_WHILE_LO))]
"TARGET_SVE"
"whilelo\t%0.<PRED_ALL:Vetype>, %<w>2, %<w>3"
;; Force the compiler to drop the unused predicate operand, so that we
;; don't have an unnecessary PTRUE.
"&& !CONSTANT_P (operands[1])"
{
operands[1] = CONSTM1_RTX (<MODE>mode);
}
)
The splitter in this case simply replaces operand 1 with the constant value that it is
known to have. The equivalent define_insn_and_split would be:
(define_insn_and_split "*while_ult<GPI:mode><PRED_ALL:mode>_cc"
[(set (reg:CC CC_REGNUM)
(compare:CC
(unspec:SI [(match_operand:PRED_ALL 1)
(unspec:PRED_ALL
[(match_operand:GPI 2 "aarch64_reg_or_zero" "rZ")
(match_operand:GPI 3 "aarch64_reg_or_zero" "rZ")]
UNSPEC_WHILE_LO)]
UNSPEC_PTEST_PTRUE)
(const_int 0)))
(set (match_operand:PRED_ALL 0 "register_operand" "=Upa")
(unspec:PRED_ALL [(match_dup 2)
(match_dup 3)]
UNSPEC_WHILE_LO))]
"TARGET_SVE"
"whilelo\t%0.<PRED_ALL:Vetype>, %<w>2, %<w>3"
;; Force the compiler to drop the unused predicate operand, so that we
;; don't have an unnecessary PTRUE.
"&& !CONSTANT_P (operands[1])"
[(parallel
[(set (reg:CC CC_REGNUM)
(compare:CC
(unspec:SI [(match_dup 1)
(unspec:PRED_ALL [(match_dup 2)
(match_dup 3)]
UNSPEC_WHILE_LO)]
UNSPEC_PTEST_PTRUE)
(const_int 0)))
(set (match_dup 0)
(unspec:PRED_ALL [(match_dup 2)
(match_dup 3)]
UNSPEC_WHILE_LO))])]
{
operands[1] = CONSTM1_RTX (<MODE>mode);
}
)
Chapter 17: Machine Descriptions 485
(include pathname)
For example:
(include "filestuff")
Where pathname is a string that specifies the location of the file, specifies the include file
to be in gcc/config/target/filestuff. The directory gcc/config/target is regarded
as the default directory.
Machine descriptions may be split up into smaller more manageable subsections and
placed into subdirectories.
By specifying:
(include "BOGUS/filestuff")
(include "/u2/BOGUS/filestuff")
Add the directory dir to the head of the list of directories to be searched for header files.
This can be used to override a system machine definition file, substituting your own version,
since these directories are searched before the default machine description file directories.
If you use more than one -I option, the directories are scanned in left-to-right order; the
standard default directory come after.
use a register computed in the first one. A machine-specific peephole optimizer can detect
such opportunities.
There are two forms of peephole definitions that may be used. The original define_
peephole is run at assembly output time to match insns and substitute assembly text. Use
of define_peephole is deprecated.
A newer define_peephole2 matches insns and substitutes new insns. The peephole2
pass is run after register allocation but before scheduling, which may result in much better
code for targets that do scheduling.
The last string operand may be omitted if you are not using any machine-specific information
in this machine description. If present, it must obey the same rules as in a define_insn.
In this skeleton, insn-pattern-1 and so on are patterns to match consecutive insns. The
optimization applies to a sequence of insns when insn-pattern-1 matches the first one, insn-
pattern-2 matches the next, and so on.
Each of the insns matched by a peephole must also match a define_insn. Peepholes are
checked only at the last stage just before code generation, and only optionally. Therefore,
any insn which would match a peephole but no define_insn will cause a crash in code
generation in an unoptimized compilation, or at various optimization stages.
The operands of the insns are matched with match_operands, match_operator, and
match_dup, as usual. What is not usual is that the operand numbers apply to all the insn
patterns in the definition. So, you can check for identical operands in two insns by using
match_operand in one insn and match_dup in the other.
The operand constraints used in match_operand patterns do not have any direct effect
on the applicability of the peephole, but they will be validated afterward, so make sure your
constraints are general enough to apply whenever the peephole matches. If the peephole
matches but the constraints are not satisfied, the compiler will crash.
It is safe to omit constraints in all the operands of the peephole; or you can write con-
straints which serve as a double-check on the criteria previously tested.
Once a sequence of insns matches the patterns, the condition is checked. This is a C
expression which makes the final decision whether to perform the optimization (we do so
if the expression is nonzero). If condition is omitted (in other words, the string is empty)
then the optimization is applied to every sequence of insns that matches the patterns.
The defined peephole optimizations are applied after register allocation is complete.
Therefore, the peephole definition can check which operands have ended up in which kinds
of registers, just by looking at the operands.
Chapter 17: Machine Descriptions 487
The way to refer to the operands in condition is to write operands[i] for operand number
i (as matched by (match_operand i ...)). Use the variable insn to refer to the last of the
insns being matched; use prev_active_insn to find the preceding insns.
When optimizing computations with intermediate results, you can use condition to match
only when the intermediate results are not used elsewhere. Use the C expression dead_or_
set_p (insn, op), where insn is the insn in which you expect the value to be used for the
last time (from the value of insn, together with use of prev_nonnote_insn), and op is the
intermediate value (from operands[i]).
Applying the optimization means replacing the sequence of insns with one new insn. The
template controls ultimate output of assembler code for this combined insn. It works exactly
like the template of a define_insn. Operand numbers in this template are the same ones
used in matching the original sequence of insns.
The result of a defined peephole optimizer does not need to match any of the insn patterns
in the machine description; it does not even have an opportunity to match them. The
peephole optimizer definition itself serves as the insn pattern to control how the insn is
output.
Defined peephole optimizers are run as assembler code is being output, so the insns they
produce are never combined or rearranged in any way.
Here is an example, taken from the 68000 machine description:
(define_peephole
[(set (reg:SI 15) (plus:SI (reg:SI 15) (const_int 4)))
(set (match_operand:DF 0 "register_operand" "=f")
(match_operand:DF 1 "register_operand" "ad"))]
"FP_REG_P (operands[0]) && ! FP_REG_P (operands[1])"
{
rtx xoperands[2];
xoperands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
#ifdef MOTOROLA
output_asm_insn ("move.l %1,(sp)", xoperands);
output_asm_insn ("move.l %1,-(sp)", operands);
return "fmove.d (sp)+,%0";
#else
output_asm_insn ("movel %1,sp@", xoperands);
output_asm_insn ("movel %1,sp@-", operands);
return "fmoved sp@+,%0";
#endif
})
The effect of this optimization is to change
jbsr _foobar
addql #4,sp
movel d1,sp@-
movel d0,sp@-
fmoved sp@+,fp0
into
jbsr _foobar
movel d1,sp@
movel d0,sp@-
fmoved sp@+,fp0
insn-pattern-1 and so on look almost like the second operand of define_insn. There
is one important difference: the second operand of define_insn consists of one or more
488 GNU Compiler Collection (GCC) Internals
RTX’s enclosed in square brackets. Usually, there is only one: then the same action can
be written as an element of a define_peephole. But when there are multiple actions in a
define_insn, they are implicitly enclosed in a parallel. Then you must explicitly write
the parallel, and the square brackets within it, in the define_peephole. Thus, if an insn
pattern looks like this,
(define_insn "divmodsi4"
[(set (match_operand:SI 0 "general_operand" "=d")
(div:SI (match_operand:SI 1 "general_operand" "0")
(match_operand:SI 2 "general_operand" "dmsK")))
(set (match_operand:SI 3 "general_operand" "=d")
(mod:SI (match_dup 1) (match_dup 2)))]
"TARGET_68020"
"divsl%.l %2,%3:%0")
then the way to mention this insn in a peephole is as follows:
(define_peephole
[...
(parallel
[(set (match_operand:SI 0 "general_operand" "=d")
(div:SI (match_operand:SI 1 "general_operand" "0")
(match_operand:SI 2 "general_operand" "dmsK")))
(set (match_operand:SI 3 "general_operand" "=d")
(mod:SI (match_dup 1) (match_dup 2)))])
...]
...)
peephole2. For the example above, after its successful replacement, the first insn that can
be matched by a define_peephole2 is (set (match_dup 4) (match_dup 1)).
TYPE_STORE, TYPE_ARITH};
extern enum attr_type get_attr_type ();
If the attribute takes numeric values, no enum type will be defined and the function to
obtain the attribute’s value will return int.
There are attributes which are tied to a specific meaning. These attributes are not free
to use for other purposes:
length The length attribute is used to calculate the length of emitted code
chunks. This is especially important when verifying branch distances. See
Section 17.20.5 [Insn Lengths], page 496.
enabled The enabled attribute can be defined to prevent certain alternatives of an insn
definition from being used during code generation. See Section 17.9.6 [Disable
Insn Alternatives], page 414.
mnemonic The mnemonic attribute can be defined to implement instruction specific checks
in e.g. the pipeline description. See Section 17.20.7 [Mnemonic Attribute],
page 498.
For each of these special attributes, the corresponding ‘HAVE_ATTR_name’ ‘#define’ is
also written when the attribute is not defined; in that case, it is defined as ‘0’.
Another way of defining an attribute is to use:
(define_enum_attr "attr" "enum" default)
This works in just the same way as define_attr, except that the list of values is taken
from a separate enumeration called enum (see [define enum], page 511). This form allows
you to use the same list of values for several attributes without having to repeat the list
each time. For example:
(define_enum "processor" [
model_a
model_b
...
])
(define_enum_attr "arch" "processor"
(const (symbol_ref "target_arch")))
(define_enum_attr "tune" "processor"
(const (symbol_ref "target_tune")))
defines the same attributes as:
(define_attr "arch" "model_a,model_b,..."
(const (symbol_ref "target_arch")))
(define_attr "tune" "model_a,model_b,..."
(const (symbol_ref "target_tune")))
but without duplicating the processor list. The second example defines two separate C
enums (attr_arch and attr_tune) whereas the first defines a single C enum (processor).
(attr_flag name)
The value of an attr_flag expression is true if the flag specified by name is
true for the insn currently being scheduled.
name is a string specifying one of a fixed set of flags to test. Test the flags
forward and backward to determine the direction of a conditional branch.
This example describes a conditional branch delay slot which can be nullified for
forward branches that are taken (annul-true) or for backward branches which
are not taken (annul-false).
(define_delay (eq_attr "type" "cbranch")
[(eq_attr "in_branch_delay" "true")
(and (eq_attr "in_branch_delay" "true")
(attr_flag "forward"))
(and (eq_attr "in_branch_delay" "true")
(attr_flag "backward"))])
The forward and backward flags are false if the current insn being scheduled
is not a conditional branch.
attr_flag is only used during delay slot scheduling and has no meaning to
other passes of the compiler.
(attr name)
The value of another attribute is returned. This is most useful for numeric
attributes, as eq_attr and attr_flag produce more efficient code for non-
numeric attributes.
(set_attr_alternative "type"
[(const_string "load") (const_string "store")
(const_string "arith")])
Assume we have a RISC machine with a condition code and in which only full-word
operations are performed in registers. Let us assume that we can divide all insns into loads,
stores, (integer) arithmetic operations, floating point operations, and branches.
Here we will concern ourselves with determining the effect of an insn on the condition
code and will limit ourselves to the following possible effects: The condition code can be set
unpredictably (clobbered), not be changed, be set to agree with the results of the operation,
or only changed if the item previously set into the condition code has been modified.
Here is part of a sample md file for such a machine:
(define_attr "type" "load,store,arith,fp,branch" (const_string "arith"))
(define_insn ""
[(set (match_operand:SI 0 "general_operand" "=r,r,m")
(match_operand:SI 1 "general_operand" "r,m,r"))]
""
"@
move %0,%1
load %0,%1
store %0,%1"
[(set_attr "type" "arith,load,store")])
Note that we assume in the above example that arithmetic operations performed on
quantities smaller than a machine word clobber the condition code since they will set the
condition code to a value corresponding to the full-word result.
For normal insns, the length will be determined by value of the length attribute. In the
case of addr_vec and addr_diff_vec insn patterns, the length is computed as the number
of vectors multiplied by the size of each vector.
Lengths are measured in addressable storage units (bytes).
Note that it is possible to call functions via the symbol_ref mechanism to compute the
length of an insn. However, if you use this mechanism you must provide dummy clauses to
express the maximum length without using the function call. You can see an example of
this in the pa machine description for the call_symref pattern.
The following macros can be used to refine the length computation:
ADJUST_INSN_LENGTH (insn, length)
If defined, modifies the length assigned to instruction insn as a function of
the context in which it is used. length is an lvalue that contains the initially
computed length of the insn and should be updated with the correct length of
the insn.
This macro will normally not be required. A case in which it is required is the
ROMP. On this machine, the size of an addr_vec insn must be increased by
two to compensate for the fact that alignment may be required.
The routine that returns get_attr_length (the value of the length attribute) can be
used by the output routine to determine the form of the branch instruction to be written,
as the example below illustrates.
As an example of the specification of variable-length branches, consider the IBM 360. If
we adopt the convention that a register will be set to the starting address of a function, we
can jump to labels within 4k of the start using a four-byte instruction. Otherwise, we need
a six-byte sequence to load the address from memory and then branch to it.
On such a machine, a pattern for a branch instruction might be specified as follows:
(define_insn "jump"
[(set (pc)
(label_ref (match_operand 0 "" "")))]
""
{
return (get_attr_length (insn) == 4
? "b %l0" : "l r15,=a(%l0); br r15");
}
[(set (attr "length")
(if_then_else (lt (match_dup 0) (const_int 4096))
(const_int 4)
(const_int 6)))])
The requirement of an insn needing one or more delay slots is indicated via the define_
delay expression. It has the following form:
(define_delay test
[delay-1 annul-true-1 annul-false-1
delay-2 annul-true-2 annul-false-2
...])
test is an attribute test that indicates whether this define_delay applies to a particular
insn. If so, the number of required delay slots is determined by the length of the vector
specified as the second argument. An insn placed in delay slot n must satisfy attribute
test delay-n. annul-true-n is an attribute test that specifies which insns may be annulled
if the branch is true. Similarly, annul-false-n specifies which insns in the delay slot may
be annulled if the branch is false. If annulling is not supported for that delay slot, (nil)
should be coded.
For example, in the common case where branch and call insns require a single delay slot,
which may contain any insn other than a branch or call, the following would be placed in
the md file:
(define_delay (eq_attr "type" "branch,call")
[(eq_attr "type" "!branch,call") (nil) (nil)])
Multiple define_delay expressions may be specified. In this case, each such expression
specifies different delay slot requirements and there must be no insn for which tests in two
define_delay expressions are both true.
For example, if we have a machine that requires one delay slot for branches but two for
calls, no delay slot can contain a branch or call insn, and any valid insn in the delay slot
for the branch can be annulled if the branch is true, we might represent this as follows:
(define_delay (eq_attr "type" "branch")
[(eq_attr "type" "!branch,call")
(eq_attr "type" "!branch,call")
(nil)])
reservation delay means that two instructions under execution will be in need of shared pro-
cessors resources, i.e. buses, internal registers, and/or functional units, which are reserved
for some time. Taking this kind of delay into account is complex especially for modern RISC
processors.
The task of exploiting more processor parallelism is solved by an instruction scheduler.
For a better solution to this problem, the instruction scheduler has to have an adequate
description of the processor parallelism (or pipeline description). GCC machine descriptions
describe processor parallelism and functional unit reservations for groups of instructions
with the aid of regular expressions.
The GCC instruction scheduler uses a pipeline hazard recognizer to figure out the pos-
sibility of the instruction issue by the processor on a given simulated processor cycle. The
pipeline hazard recognizer is automatically generated from the processor pipeline descrip-
tion. The pipeline hazard recognizer generated from the machine description is based on
a deterministic finite state automaton (DFA): the instruction issue is possible if there is
a transition from one automaton state to another one. This algorithm is very fast, and
furthermore, its speed is not dependent on processor complexity1 .
The rest of this section describes the directives that constitute an automaton-based pro-
cessor pipeline description. The order of these constructions within the machine description
file is not important.
The following optional construction describes names of automata generated and used
for the pipeline hazards recognition. Sometimes the generated finite state automaton used
by the pipeline hazard recognizer is large. If we use more than one automaton and bind
functional units to the automata, the total size of the automata is usually less than the
size of the single automaton. If there is no one such construction, only one finite state
automaton is generated.
(define_automaton automata-names)
automata-names is a string giving names of the automata. The names are separated by
commas. All the automata should have unique names. The automaton name is used in the
constructions define_cpu_unit and define_query_cpu_unit.
Each processor functional unit used in the description of instruction reservations should
be described by the following construction.
(define_cpu_unit unit-names [automaton-name])
unit-names is a string giving the names of the functional units separated by commas.
Don’t use name ‘nothing’, it is reserved for other goals.
automaton-name is a string giving the name of the automaton with which the unit is
bound. The automaton should be described in construction define_automaton. You should
give automaton-name, if there is a defined automaton.
The assignment of units to automata are constrained by the uses of the units in insn
reservations. The most important constraint is: if a unit reservation is present on a partic-
ular cycle of an alternative for an insn reservation, then some unit from the same automaton
1
However, the size of the automaton depends on processor complexity. To limit this effect, machine
descriptions can split orthogonal parts of the machine description among several automata: but then,
since each of these must be stepped independently, this does cause a small decrease in the algorithm’s
performance.
Chapter 17: Machine Descriptions 501
must be present on the same cycle for the other alternatives of the insn reservation. The
rest of the constraints are mentioned in the description of the subsequent constructions.
The following construction describes CPU functional units analogously to define_cpu_
unit. The reservation of such units can be queried for an automaton state. The instruction
scheduler never queries reservation of functional units for given automaton state. So as
a rule, you don’t need this construction. This construction could be used for future code
generation goals (e.g. to generate VLIW insn templates).
(define_query_cpu_unit unit-names [automaton-name])
unit-names is a string giving names of the functional units separated by commas.
automaton-name is a string giving the name of the automaton with which the unit is
bound.
The following construction is the major one to describe pipeline characteristics of an
instruction.
(define_insn_reservation insn-name default_latency
condition regexp)
default latency is a number giving latency time of the instruction. There is an important
difference between the old description and the automaton based pipeline description. The
latency time is used for all dependencies when we use the old description. In the automa-
ton based pipeline description, the given latency time is only used for true dependencies.
The cost of anti-dependencies is always zero and the cost of output dependencies is the
difference between latency times of the producing and consuming insns (if the difference is
negative, the cost is considered to be zero). You can always change the default costs for
any description by using the target hook TARGET_SCHED_ADJUST_COST (see Section 18.17
[Scheduling], page 626).
insn-name is a string giving the internal name of the insn. The internal names are
used in constructions define_bypass and in the automaton description file generated for
debugging. The internal name has nothing in common with the names in define_insn. It
is a good practice to use insn classes described in the processor manual.
condition defines what RTL insns are described by this construction. You should re-
member that you will be in trouble if condition for two or more different define_insn_
reservation constructions is TRUE for an insn. In this case what reservation will be used
for the insn is not defined. Such cases are not checked during generation of the pipeline haz-
ards recognizer because in general recognizing that two conditions may have the same value
is quite difficult (especially if the conditions contain symbol_ref). It is also not checked
during the pipeline hazard recognizer work because it would slow down the recognizer con-
siderably.
regexp is a string describing the reservation of the cpu’s functional units by the instruc-
tion. The reservations are described by a regular expression according to the following
syntax:
regexp = regexp "," oneof
| oneof
element = cpu_function_unit_name
| reservation_name
| result_name
| "nothing"
| "(" regexp ")"
• ‘,’ is used for describing the start of the next cycle in the reservation.
• ‘|’ is used for describing a reservation described by the first regular expression or a
reservation described by the second regular expression or etc.
• ‘+’ is used for describing a reservation described by the first regular expression and a
reservation described by the second regular expression and etc.
• ‘*’ is used for convenience and simply means a sequence in which the regular expression
are repeated number times with cycle advancing (see ‘,’).
• ‘cpu_function_unit_name’ denotes reservation of the named functional unit.
• ‘reservation_name’ — see description of construction ‘define_reservation’.
• ‘nothing’ denotes no unit reservations.
Sometimes unit reservations for different insns contain common parts. In such case,
you can simplify the pipeline description by describing the common part by the following
construction
(define_reservation reservation-name regexp)
reservation-name is a string giving name of regexp. Functional unit names and reservation
names are in the same name space. So the reservation names should be different from the
functional unit names and cannot be the reserved name ‘nothing’.
The following construction is used to describe exceptions in the latency time for given
instruction pair. This is so called bypasses.
(define_bypass number out_insn_names in_insn_names
[guard])
number defines when the result generated by the instructions given in string
out insn names will be ready for the instructions given in string in insn names. Each of
these strings is a comma-separated list of filename-style globs and they refer to the names
of define_insn_reservations. For example:
(define_bypass 1 "cpu1_load_*, cpu1_store_*" "cpu1_load_*")
defines a bypass between instructions that start with ‘cpu1_load_’ or ‘cpu1_store_’ and
those that start with ‘cpu1_load_’.
guard is an optional string giving the name of a C function which defines an additional
guard for the bypass. The function will get the two insns as parameters. If the function
returns zero the bypass will be ignored for this case. The additional guard is necessary to
recognize complicated bypasses, e.g. when the consumer is only an address of insn ‘store’
(not a stored value).
If there are more one bypass with the same output and input insns, the chosen bypass is
the first bypass with a guard in description whose guard function returns nonzero. If there
is no such bypass, then bypass without the guard function is chosen.
Chapter 17: Machine Descriptions 503
The following five constructions are usually used to describe VLIW processors, or more
precisely, to describe a placement of small instructions into VLIW instruction slots. They
can be used for RISC processors, too.
(exclusion_set unit-names unit-names)
(presence_set unit-names patterns)
(final_presence_set unit-names patterns)
(absence_set unit-names patterns)
(final_absence_set unit-names patterns)
unit-names is a string giving names of functional units separated by commas.
patterns is a string giving patterns of functional units separated by comma. Currently
pattern is one unit or units separated by white-spaces.
The first construction (‘exclusion_set’) means that each functional unit in the first
string cannot be reserved simultaneously with a unit whose name is in the second string
and vice versa. For example, the construction is useful for describing processors (e.g. some
SPARC processors) with a fully pipelined floating point functional unit which can execute
simultaneously only single floating point insns or only double floating point insns.
The second construction (‘presence_set’) means that each functional unit in the first
string cannot be reserved unless at least one of pattern of units whose names are in the
second string is reserved. This is an asymmetric relation. For example, it is useful for
description that VLIW ‘slot1’ is reserved after ‘slot0’ reservation. We could describe it
by the following construction
(presence_set "slot1" "slot0")
Or ‘slot1’ is reserved only after ‘slot0’ and unit ‘b0’ reservation. In this case we could
write
(presence_set "slot1" "slot0 b0")
The third construction (‘final_presence_set’) is analogous to ‘presence_set’. The
difference between them is when checking is done. When an instruction is issued in given
automaton state reflecting all current and planned unit reservations, the automaton state
is changed. The first state is a source state, the second one is a result state. Checking for
‘presence_set’ is done on the source state reservation, checking for ‘final_presence_set’
is done on the result reservation. This construction is useful to describe a reservation which
is actually two subsequent reservations. For example, if we use
(presence_set "slot1" "slot0")
the following insn will be never issued (because ‘slot1’ requires ‘slot0’ which is absent
in the source state).
(define_reservation "insn_and_nop" "slot0 + slot1")
but it can be issued if we use analogous ‘final_presence_set’.
The forth construction (‘absence_set’) means that each functional unit in the first string
can be reserved only if each pattern of units whose names are in the second string is not
reserved. This is an asymmetric relation (actually ‘exclusion_set’ is analogous to this
one but it is symmetric). For example it might be useful in a VLIW description to say that
‘slot0’ cannot be reserved after either ‘slot1’ or ‘slot2’ have been reserved. This can be
described as:
(absence_set "slot0" "slot1, slot2")
504 GNU Compiler Collection (GCC) Internals
Or ‘slot2’ cannot be reserved if ‘slot0’ and unit ‘b0’ are reserved or ‘slot1’ and unit
‘b1’ are reserved. In this case we could write
(absence_set "slot2" "slot0 b0, slot1 b1")
All functional units mentioned in a set should belong to the same automaton.
The last construction (‘final_absence_set’) is analogous to ‘absence_set’ but checking
is done on the result (state) reservation. See comments for ‘final_presence_set’.
You can control the generator of the pipeline hazard recognizer with the following con-
struction.
(automata_option options)
options is a string giving options which affect the generated code. Currently there are
the following options:
• no-minimization makes no minimization of the automaton. This is only worth to do
when we are debugging the description and need to look more accurately at reservations
of states.
• time means printing time statistics about the generation of automata.
• stats means printing statistics about the generated automata such as the number of
DFA states, NDFA states and arcs.
• v means a generation of the file describing the result automata. The file has suffix
‘.dfa’ and can be used for the description verification and debugging.
• w means a generation of warning instead of error for non-critical errors.
• no-comb-vect prevents the automaton generator from generating two data structures
and comparing them for space efficiency. Using a comb vector to represent transitions
may be better, but it can be very expensive to construct. This option is useful if the
build process spends an unacceptably long time in genautomata.
• ndfa makes nondeterministic finite state automata. This affects the treatment of op-
erator ‘|’ in the regular expressions. The usual treatment of the operator is to try the
first alternative and, if the reservation is not possible, the second alternative. The non-
deterministic treatment means trying all alternatives, some of them may be rejected
by reservations in the subsequent insns.
• collapse-ndfa modifies the behavior of the generator when producing an automaton. An
additional state transition to collapse a nondeterministic NDFA state to a deterministic
DFA state is generated. It can be triggered by passing const0_rtx to state transition.
In such an automaton, cycle advance transitions are available only for these collapsed
states. This option is useful for ports that want to use the ndfa option, but also want
to use define_query_cpu_unit to assign units to insns issued in a cycle.
• progress means output of a progress bar showing how many states were generated so
far for automaton being processed. This is useful during debugging a DFA description.
If you see too many generated states, you could interrupt the generator of the pipeline
hazard recognizer and try to figure out a reason for generation of the huge automaton.
As an example, consider a superscalar RISC machine which can issue three insns (two
integer insns and one floating point insn) on the cycle but can finish only two insns. To
describe this, we define the following functional units.
(define_cpu_unit "i0_pipeline, i1_pipeline, f_pipeline")
(define_cpu_unit "port0, port1")
Chapter 17: Machine Descriptions 505
All simple integer insns can be executed in any integer pipeline and their result is ready
in two cycles. The simple integer insns are issued into the first pipeline unless it is reserved,
otherwise they are issued into the second pipeline. Integer division and multiplication insns
can be executed only in the second integer pipeline and their results are ready correspond-
ingly in 9 and 4 cycles. The integer division is not pipelined, i.e. the subsequent integer
division insn cannot be issued until the current division insn finished. Floating point insns
are fully pipelined and their results are ready in 3 cycles. Where the result of a floating point
insn is used by an integer insn, an additional delay of one cycle is incurred. To describe all
of this we could specify
(define_cpu_unit "div")
order to handle the general case, there is a global variable current_insn_predicate that
will contain the entire predicate if the current insn is predicated, and will otherwise be NULL.
optional-insn-attributes is an optional vector of attributes that gets appended to the
insn attributes of the produced cond exec rtx. It can be used to add some distinguishing
attribute to cond exec rtxs produced that way. An example usage would be to use this at-
tribute in conjunction with attributes on the main pattern to disable particular alternatives
under certain conditions.
When define_cond_exec is used, an implicit reference to the predicable instruction
attribute is made. See Section 17.20 [Insn Attributes], page 490. This attribute must be
a boolean (i.e. have exactly two elements in its list-of-values), with the possible values
being no and yes. The default and all uses in the insns must be a simple constant, not
a complex expressions. It may, however, depend on the alternative, by using a comma-
separated list of values. If that is the case, the port should also define an enabled attribute
(see Section 17.9.6 [Disable Insn Alternatives], page 414), which should also allow only no
and yes as its values.
For each define_insn for which the predicable attribute is true, a new define_insn
pattern will be generated that matches a predicated version of the instruction. For example,
(define_insn "addsi"
[(set (match_operand:SI 0 "register_operand" "r")
(plus:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "register_operand" "r")))]
"test1"
"add %2,%1,%0")
(define_cond_exec
[(ne (match_operand:CC 0 "register_operand" "c")
(const_int 0))]
"test2"
"(%0)")
generates a new pattern
(define_insn ""
[(cond_exec
(ne (match_operand:CC 3 "register_operand" "c") (const_int 0))
(set (match_operand:SI 0 "register_operand" "r")
(plus:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "register_operand" "r"))))]
"(test2) && (test1)"
"(%3) add %2,%1,%0")
[output-template])
input-template is a pattern describing the source RTL template, which will be trans-
formed.
condition is a C expression that is conjunct with the condition from the input-template
to generate a condition to be used in the output-template.
output-template is a pattern that will be used in the resulting template.
define_subst mechanism is tightly coupled with the notion of the subst attribute (see
Section 17.24.4 [Subst Iterators], page 516). The use of define_subst is triggered by a
reference to a subst attribute in the transforming RTL template. This reference initiates
duplication of the source RTL template and substitution of the attributes with their values.
The source RTL template is left unchanged, while the copy is transformed by define_
subst. This transformation can fail in the case when the source RTL template is not
matched against the input-template of the define_subst. In such case the copy is deleted.
define_subst can be used only in define_insn and define_expand, it cannot be used
in other expressions (e.g. in define_insn_and_split).
argument (‘_clobber’) is the value that would be substituted into the second, transformed,
version of the RTL template.
Once the subst-attribute has been defined, it should be used in RTL templates which need
to be processed by the define_subst. So, the original RTL template should be changed:
(define_insn "maxsi<add_clobber_name>"
[(set (match_operand:SI 0 "register_operand" "=r")
(max:SI
(match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "register_operand" "r")))]
""
"max\t{%2, %1, %0|%0, %1, %2}"
[...])
The result of the define_subst usage would look like the following:
(define_insn "maxsi_noclobber"
[(set (match_operand:SI 0 "register_operand" "=r")
(max:SI
(match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "register_operand" "r")))]
""
"max\t{%2, %1, %0|%0, %1, %2}"
[...])
(define_insn "maxsi_clobber"
[(set (match_operand:SI 0 "register_operand" "=r")
(max:SI
(match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "register_operand" "r")))
(clobber (reg:CC FLAGS_REG))]
""
"max\t{%2, %1, %0|%0, %1, %2}"
[...])
subst. Thus, match_dup is used for copying the whole expression from the original pattern,
which matched corresponding match_operand from the input pattern.
match_dup N is used in the output template to be replaced with the expression from the
original pattern, which matched match_operand N from the input pattern. As a conse-
quence, match_dup cannot be used to point to match_operands from the output pattern, it
should always refer to a match_operand from the input pattern. If a match_dup N occurs
more than once in the output template, its first occurrence is replaced with the expression
from the original pattern, and the subsequent expressions are replaced with match_dup N,
i.e., a reference to the first expression.
In the output template one can refer to the expressions from the original pattern and
create new ones. For instance, some operands could be added by means of standard match_
operand.
After replacing match_dup with some RTL-subtree from the original pattern, it could
happen that several match_operands in the output pattern have the same indexes. It
is unknown, how many and what indexes would be used in the expression which would
replace match_dup, so such conflicts in indexes are inevitable. To overcome this issue,
match_operands and match_operators, which were introduced into the output pattern,
are renumerated when all match_dups are replaced.
Number of alternatives in match_operands introduced into the output template M could
differ from the number of alternatives in the original pattern N, so in the resultant pat-
tern there would be N*M alternatives. Thus, constraints from the original pattern would
be duplicated N times, constraints from the output pattern would be duplicated M times,
producing all possible combinations.
])
(define_insn ""
[(match_parallel 0 "load_multiple_operation"
[(set (match_operand:SI 1 "gpc_reg_operand" "=r")
(match_operand:SI 2 "memory_operand" "m"))
(use (reg:SI R_CR))
(clobber (reg:SI R_CR))])]
""
"loadm 0,0,%1,%2")
The constants that are defined with a define constant are also output in the insn-codes.h
header file as #defines.
You can also use the machine description file to define enumerations. Like the constants
defined by define_constant, these enumerations are visible to both the machine description
file and the main C code.
The syntax is as follows:
(define_c_enum "name" [
value0
value1
(value32 32)
value33
...
valuen
])
This definition causes the equivalent of the following C code to appear in
insn-constants.h:
enum name {
value0 = 0,
value1 = 1,
value32 = 32,
value33 = 33,
...
valuen = n
};
#define NUM_cname_VALUES (n + 1)
where cname is the capitalized form of name. It also makes each valuei available in the
machine description file, just as if it had been declared with:
(define_constants [(valuei i)])
Each valuei is usually an upper-case identifier and usually begins with cname.
You can split the enumeration definition into as many statements as you like. The above
example is directly equivalent to:
(define_c_enum "name" [value0])
(define_c_enum "name" [value1])
...
(define_c_enum "name" [valuen])
Splitting the enumeration helps to improve the modularity of each individual .md file.
For example, if a port defines its synchronization instructions in a separate sync.md file,
it is convenient to define all synchronization-specific enumeration values in sync.md rather
than in the main .md file.
Chapter 17: Machine Descriptions 511
unspec If an enumeration called unspec is defined, GCC will use it when printing out
unspec expressions. GCC will also use it when printing out unspec_volatile
expressions unless an unspecv enumeration is also defined. You can therefore
decide whether to keep separate enumerations for volatile and non-volatile ex-
pressions or whether to use the same enumeration for both.
Another way of defining an enumeration is to use define_enum:
(define_enum "name" [
value0
value1
...
valuen
])
This directive implies:
(define_c_enum "name" [
cname_cvalue0
cname_cvalue1
...
cname_cvaluen
])
where cvaluei is the capitalized form of valuei. However, unlike define_c_enum, the
enumerations defined by define_enum can be used in attribute specifications (see [de-
fine enum attr], page 491).
17.24 Iterators
Ports often need to define similar patterns for more than one machine mode or for more
than one rtx code. GCC provides some simple iterator facilities to make this process easier.
attribute. If the attribute is defined for mode, the whole <...> sequence will be replaced
by the appropriate attribute value.
For example, suppose an .md file has:
(define_mode_iterator P [(SI "Pmode == SImode") (DI "Pmode == DImode")])
(define_mode_attr load [(SI "lw") (DI "ld")])
If one of the patterns that uses :P contains the string "<P:load>\t%0,%1", the SI version
of that pattern will use "lw\t%0,%1" and the DI version will use "ld\t%0,%1".
Here is an example of using an attribute for a mode:
(define_mode_iterator LONG [SI DI])
(define_mode_attr SHORT [(SI "HI") (DI "SI")])
(define_insn ...
(sign_extend:LONG (match_operand:<LONG:SHORT> ...)) ...)
The iterator: prefix may be omitted, in which case the substitution will be attempted
for every iterator expansion.
(define_insn "subdi3"
[(set (match_operand:DI 0 "register_operand" "=d")
(minus:DI (match_operand:DI 1 "register_operand" "d")
(match_operand:DI 2 "register_operand" "d")))]
"TARGET_64BIT"
"dsubu\t%0,%1,%2"
[(set_attr "type" "arith")
(set_attr "mode" "DI")])
The construct:
(define_code_iterator name [(code1 "cond1") ... (coden "condn")])
defines a pseudo rtx code name that can be instantiated as codei if condition condi is
true. Each codei must have the same rtx format. See Section 14.2 [RTL Classes], page 278.
As with mode iterators, each pattern that uses name will be expanded n times, once with
all uses of name replaced by code1, once with all uses replaced by code2, and so on. See
Section 17.24.1.1 [Defining Mode Iterators], page 512.
It is possible to define attributes for codes as well as for modes. There are two standard
code attributes: code, the name of the code in lower case, and CODE, the name of the code
in upper case. Other attributes are defined using:
(define_code_attr name [(code1 "value1") ... (coden "valuen")])
Instruction patterns can use code attributes as rtx codes, which can be useful if two
sets of codes act in tandem. For example, the following define_insn defines two patterns,
one calculating a signed absolute difference and another calculating an unsigned absolute
difference:
(define_code_iterator any_max [smax umax])
(define_code_attr paired_min [(smax "smin") (umax "umin")])
(define_insn ...
[(set (match_operand:SI 0 ...)
(minus:SI (any_max:SI (match_operand:SI 1 ...)
(match_operand:SI 2 ...))
(<paired_min>:SI (match_dup 1) (match_dup 2))))]
...)
The signed version of the instruction uses smax and smin while the unsigned version uses
umax and umin. There are no versions that pair smax with umin or umax with smin.
Here’s an example of code iterators in action, taken from the MIPS port:
(define_code_iterator any_cond [unordered ordered unlt unge uneq ltgt unle ungt
eq ne gt ge lt le gtu geu ltu leu])
(define_expand "b<code>"
[(set (pc)
(if_then_else (any_cond:CC (cc0)
(const_int 0))
(label_ref (match_operand 0 ""))
(pc)))]
""
{
gen_conditional_branch (operands, <CODE>);
DONE;
})
This is equivalent to:
(define_expand "bunordered"
[(set (pc)
(if_then_else (unordered:CC (cc0)
(const_int 0))
(label_ref (match_operand 0 ""))
(pc)))]
""
{
gen_conditional_branch (operands, UNORDERED);
DONE;
Chapter 17: Machine Descriptions 515
})
(define_expand "bordered"
[(set (pc)
(if_then_else (ordered:CC (cc0)
(const_int 0))
(label_ref (match_operand 0 ""))
(pc)))]
""
{
gen_conditional_branch (operands, ORDERED);
DONE;
})
...
(define_insn "neon_vq<absneg><mode>"
[(set (match_operand:VDQIW 0 "s_register_operand" "=w")
(unspec:VDQIW [(match_operand:VDQIW 1 "s_register_operand" "w")
(match_operand:SI 2 "immediate_operand" "i")]
QABSNEG))]
"TARGET_NEON"
"vq<absneg>.<V_s_elem>\t%<V_reg>0, %<V_reg>1"
[(set_attr "type" "neon_vqneg_vqabs")]
)
(define_insn "neon_vqneg<mode>"
[(set (match_operand:VDQIW 0 "s_register_operand" "=w")
(unspec:VDQIW [(match_operand:VDQIW 1 "s_register_operand" "w")
(match_operand:SI 2 "immediate_operand" "i")]
UNSPEC_VQNEG))]
"TARGET_NEON"
"vqneg.<V_s_elem>\t%<V_reg>0, %<V_reg>1"
[(set_attr "type" "neon_vqneg_vqabs")]
)
(define_insn "neon_vq<absneg><mode>"
[(set (match_operand:VDQIW 0 "s_register_operand" "=w")
(unspec:VDQIW [(match_operand:VDQIW 1 "s_register_operand" "w")
(match_operand:SI 2 "immediate_operand" "i")]
QABSNEG))]
...
)
A port might need to generate this pattern for a variable ‘QABSNEG’ value and a variable
‘VDQIW’ mode. There are two ways of doing this. The first is to build the rtx for the pattern
directly from C++ code; this is a valid technique and avoids any risk of combinatorial
explosion. The second is to prefix the instruction name with the special character ‘@’,
which tells GCC to generate the four additional functions below. In each case, name is the
name of the instruction without the leading ‘@’ character, without the ‘<...>’ placeholders,
and with any underscore before a ‘<...>’ placeholder removed if keeping it would lead to a
double or trailing underscore.
‘insn_code maybe_code_for_name (i1, i2, ...)’
See whether replacing the first ‘<...>’ placeholder with iterator value i1, the
second with iterator value i2, and so on, gives a valid instruction. Return its
code if so, otherwise return CODE_FOR_nothing.
‘insn_code code_for_name (i1, i2, ...)’
Same, but abort the compiler if the requested instruction does not exist.
‘rtx maybe_gen_name (i1, i2, ..., op0, op1, ...)’
Check for a valid instruction in the same way as maybe_code_for_name. If the
instruction exists, generate an instance of it using the operand values given by
op0, op1, and so on, otherwise return null.
‘rtx gen_name (i1, i2, ..., op0, op1, ...)’
Same, but abort the compiler if the requested instruction does not exist, or if
the instruction generator invoked the FAIL macro.
For example, changing the pattern above to:
(define_insn "@neon_vq<absneg><mode>"
[(set (match_operand:VDQIW 0 "s_register_operand" "=w")
(unspec:VDQIW [(match_operand:VDQIW 1 "s_register_operand" "w")
(match_operand:SI 2 "immediate_operand" "i")]
QABSNEG))]
...
)
would define the same patterns as before, but in addition would generate the four func-
tions below:
insn_code maybe_code_for_neon_vq (int, machine_mode);
insn_code code_for_neon_vq (int, machine_mode);
rtx maybe_gen_neon_vq (int, machine_mode, rtx, rtx, rtx);
rtx gen_neon_vq (int, machine_mode, rtx, rtx, rtx);
Calling ‘code_for_neon_vq (UNSPEC_VQABS, V8QImode)’ would then give CODE_FOR_
neon_vqabsv8qi.
518 GNU Compiler Collection (GCC) Internals
It is possible to have multiple ‘@’ patterns with the same name and same types of iterator.
For example:
(define_insn "@some_arithmetic_op<mode>"
[(set (match_operand:INTEGER_MODES 0 "register_operand") ...)]
...
)
(define_insn "@some_arithmetic_op<mode>"
[(set (match_operand:FLOAT_MODES 0 "register_operand") ...)]
...
)
would produce a single set of functions that handles both INTEGER_MODES and FLOAT_
MODES.
It is also possible for these ‘@’ patterns to have different numbers of operands from each
other. For example, patterns with a binary rtl code might take three operands (one output
and two inputs) while patterns with a ternary rtl code might take four operands (one
output and three inputs). This combination would produce separate ‘maybe_gen_name’
and ‘gen_name’ functions for each operand count, but it would still produce a single
‘maybe_code_for_name’ and a single ‘code_for_name’.
519
#undef TARGET_COMP_TYPE_ATTRIBUTES
#define TARGET_COMP_TYPE_ATTRIBUTES machine_comp_type_attributes
Where a macro should be defined in the .c file in this manner to form part of the targetm
structure, it is documented below as a “Target Hook” with a prototype. Many macros will
change in future from being defined in the .h file to being part of the targetm structure.
Similarly, there is a targetcm variable for hooks that are specific to front ends for C-family
languages, documented as “C Target Hook”. This is declared in c-family/c-target.h,
the initializer TARGETCM_INITIALIZER in c-family/c-target-def.h. If targets initialize
targetcm themselves, they should set target_has_targetcm=yes in config.gcc; otherwise
a default definition is used.
Similarly, there is a targetm_common variable for hooks that are shared between the
compiler driver and the compilers proper, documented as “Common Target Hook”. This
is declared in common/common-target.h, the initializer TARGETM_COMMON_INITIALIZER
in common/common-target-def.h. If targets initialize targetm_common themselves,
they should set target_has_targetm_common=yes in config.gcc; otherwise a default
definition is used.
Similarly, there is a targetdm variable for hooks that are specific to the D language front
end, documented as “D Target Hook”. This is declared in d/d-target.h, the initializer
TARGETDM_INITIALIZER in d/d-target-def.h. If targets initialize targetdm themselves,
520 GNU Compiler Collection (GCC) Internals
CC1_SPEC [Macro]
A C string constant that tells the GCC driver program options to pass to cc1,
cc1plus, f771, and the other language front ends. It can also specify how to translate
options you give to GCC into options for GCC to pass to front ends.
Do not define this macro if it does not need to do anything.
CC1PLUS_SPEC [Macro]
A C string constant that tells the GCC driver program options to pass to cc1plus.
It can also specify how to translate options you give to GCC into options for GCC to
pass to the cc1plus.
Do not define this macro if it does not need to do anything. Note that everything
defined in CC1 SPEC is already passed to cc1plus so there is no need to duplicate
the contents of CC1 SPEC in CC1PLUS SPEC.
ASM_SPEC [Macro]
A C string constant that tells the GCC driver program options to pass to the assem-
bler. It can also specify how to translate options you give to GCC into options for
GCC to pass to the assembler. See the file sun3.h for an example of this.
Do not define this macro if it does not need to do anything.
ASM_FINAL_SPEC [Macro]
A C string constant that tells the GCC driver program how to run any programs
which cleanup after the normal assembler. Normally, this is not needed. See the file
mips.h for an example of this.
Do not define this macro if it does not need to do anything.
AS_NEEDS_DASH_FOR_PIPED_INPUT [Macro]
Define this macro, with no value, if the driver should give the assembler an argument
consisting of a single dash, -, to instruct it to read from its standard input (which
will be a pipe connected to the output of the compiler proper). This argument is
given after any -o option specifying the name of the output file.
If you do not define this macro, the assembler is assumed to read its standard input
if given no non-option arguments. If your assembler cannot read standard input at
all, use a ‘%{pipe:%e}’ construct; see mips.h for instance.
LINK_SPEC [Macro]
A C string constant that tells the GCC driver program options to pass to the linker.
It can also specify how to translate options you give to GCC into options for GCC to
pass to the linker.
Do not define this macro if it does not need to do anything.
LIB_SPEC [Macro]
Another C string constant used much like LINK_SPEC. The difference between the
two is that LIB_SPEC is used at the end of the command given to the linker.
If this macro is not defined, a default is provided that loads the standard C library
from the usual place. See gcc.cc.
522 GNU Compiler Collection (GCC) Internals
LIBGCC_SPEC [Macro]
Another C string constant that tells the GCC driver program how and when to place
a reference to libgcc.a into the linker command line. This constant is placed both
before and after the value of LIB_SPEC.
If this macro is not defined, the GCC driver provides a default that passes the string
-lgcc to the linker.
REAL_LIBGCC_SPEC [Macro]
By default, if ENABLE_SHARED_LIBGCC is defined, the LIBGCC_SPEC is not directly
used by the driver program but is instead modified to refer to different versions of
libgcc.a depending on the values of the command line flags -static, -shared,
-static-libgcc, and -shared-libgcc. On targets where these modifications are
inappropriate, define REAL_LIBGCC_SPEC instead. REAL_LIBGCC_SPEC tells the driver
how to place a reference to libgcc on the link command line, but, unlike LIBGCC_
SPEC, it is used unmodified.
USE_LD_AS_NEEDED [Macro]
A macro that controls the modifications to LIBGCC_SPEC mentioned in REAL_LIBGCC_
SPEC. If nonzero, a spec will be generated that uses --as-needed or equivalent options
and the shared libgcc in place of the static exception handler library, when linking
without any of -static, -static-libgcc, or -shared-libgcc.
LINK_EH_SPEC [Macro]
If defined, this C string constant is added to LINK_SPEC. When USE_LD_AS_NEEDED
is zero or undefined, it also affects the modifications to LIBGCC_SPEC mentioned in
REAL_LIBGCC_SPEC.
STARTFILE_SPEC [Macro]
Another C string constant used much like LINK_SPEC. The difference between the
two is that STARTFILE_SPEC is used at the very beginning of the command given to
the linker.
If this macro is not defined, a default is provided that loads the standard C startup
file from the usual place. See gcc.cc.
ENDFILE_SPEC [Macro]
Another C string constant used much like LINK_SPEC. The difference between the
two is that ENDFILE_SPEC is used at the very end of the command given to the linker.
Do not define this macro if it does not need to do anything.
THREAD_MODEL_SPEC [Macro]
GCC -v will print the thread model GCC was configured to use. However, this doesn’t
work on platforms that are multilibbed on thread models, such as AIX 4.3. On such
platforms, define THREAD_MODEL_SPEC such that it evaluates to a string without blanks
that names one of the recognized thread models. %*, the default value of this macro,
will expand to the value of thread_file set in config.gcc.
SYSROOT_SUFFIX_SPEC [Macro]
Define this macro to add a suffix to the target sysroot when GCC is configured with
a sysroot. This will cause GCC to search for usr/lib, et al, within sysroot+suffix.
Chapter 18: Target Description Macros and Functions 523
SYSROOT_HEADERS_SUFFIX_SPEC [Macro]
Define this macro to add a headers suffix to the target sysroot when GCC is configured
with a sysroot. This will cause GCC to pass the updated sysroot+headers suffix to
CPP, causing it to search for usr/include, et al, within sysroot+headers suffix.
EXTRA_SPECS [Macro]
Define this macro to provide additional specifications to put in the specs file that
can be used in various specifications like CC1_SPEC.
The definition should be an initializer for an array of structures, containing a string
constant, that defines the specification name, and a string constant that provides the
specification.
Do not define this macro if it does not need to do anything.
EXTRA_SPECS is useful when an architecture contains several related targets, which
have various ..._SPECS which are similar to each other, and the maintainer would
like one central place to keep these definitions.
For example, the PowerPC System V.4 targets use EXTRA_SPECS to define either _
CALL_SYSV when the System V calling sequence is used or _CALL_AIX when the older
AIX-based calling sequence is used.
The config/rs6000/rs6000.h target file defines:
#define EXTRA_SPECS \
{ "cpp_sysv_default", CPP_SYSV_DEFAULT },
#undef CPP_SYSV_DEFAULT
#define CPP_SYSV_DEFAULT "-D_CALL_SYSV"
while the config/rs6000/eabiaix.h target file defines CPP_SYSV_DEFAULT as:
#undef CPP_SYSV_DEFAULT
#define CPP_SYSV_DEFAULT "-D_CALL_AIX"
LINK_LIBGCC_SPECIAL_1 [Macro]
Define this macro if the driver program should find the library libgcc.a. If you do
not define this macro, the driver program will pass the argument -lgcc to tell the
linker to do the search.
LINK_GCC_C_SEQUENCE_SPEC [Macro]
The sequence in which libgcc and libc are specified to the linker. By default this is
%G %L %G.
POST_LINK_SPEC [Macro]
Define this macro to add additional steps to be executed after linker. The default
value of this macro is empty string.
524 GNU Compiler Collection (GCC) Internals
LINK_COMMAND_SPEC [Macro]
A C string constant giving the complete command line need to execute the linker.
When you do this, you will need to update your port each time a change is made to
the link command line within gcc.cc. Therefore, define this macro only if you need
to completely redefine the command line for invoking the linker and there is no other
way to accomplish the effect you need. Overriding this macro may be avoidable by
overriding LINK_GCC_C_SEQUENCE_SPEC instead.
MULTILIB_DEFAULTS [Macro]
Define this macro as a C expression for the initializer of an array of string to tell the
driver program which options are defaults for this target and thus do not need to be
handled specially when using MULTILIB_OPTIONS.
Do not define this macro if MULTILIB_OPTIONS is not defined in the target makefile
fragment or if none of the options listed in MULTILIB_OPTIONS are set by default. See
Section 20.1 [Target Fragment], page 715.
RELATIVE_PREFIX_NOT_LINKDIR [Macro]
Define this macro to tell gcc that it should only translate a -B prefix into a -L linker
option if the prefix indicates an absolute file name.
MD_EXEC_PREFIX [Macro]
If defined, this macro is an additional prefix to try after STANDARD_EXEC_PREFIX.
MD_EXEC_PREFIX is not searched when the compiler is built as a cross compiler. If
you define MD_EXEC_PREFIX, then be sure to add it to the list of directories used to
find the assembler in configure.ac.
STANDARD_STARTFILE_PREFIX [Macro]
Define this macro as a C string constant if you wish to override the standard choice
of libdir as the default prefix to try when searching for startup files such as crt0.o.
STANDARD_STARTFILE_PREFIX is not searched when the compiler is built as a cross
compiler.
STANDARD_STARTFILE_PREFIX_1 [Macro]
Define this macro as a C string constant if you wish to override the standard choice of
/lib as a prefix to try after the default prefix when searching for startup files such as
crt0.o. STANDARD_STARTFILE_PREFIX_1 is not searched when the compiler is built
as a cross compiler.
STANDARD_STARTFILE_PREFIX_2 [Macro]
Define this macro as a C string constant if you wish to override the standard choice of
/lib as yet another prefix to try after the default prefix when searching for startup files
such as crt0.o. STANDARD_STARTFILE_PREFIX_2 is not searched when the compiler
is built as a cross compiler.
Chapter 18: Target Description Macros and Functions 525
MD_STARTFILE_PREFIX [Macro]
If defined, this macro supplies an additional prefix to try after the standard prefixes.
MD_EXEC_PREFIX is not searched when the compiler is built as a cross compiler.
MD_STARTFILE_PREFIX_1 [Macro]
If defined, this macro supplies yet another prefix to try after the standard prefixes.
It is not searched when the compiler is built as a cross compiler.
INIT_ENVIRONMENT [Macro]
Define this macro as a C string constant if you wish to set environment variables for
programs called by the driver, such as the assembler and loader. The driver passes
the value of this macro to putenv to initialize the necessary environment variables.
LOCAL_INCLUDE_DIR [Macro]
Define this macro as a C string constant if you wish to override the standard choice of
/usr/local/include as the default prefix to try when searching for local header files.
LOCAL_INCLUDE_DIR comes before NATIVE_SYSTEM_HEADER_DIR (set in config.gcc,
normally /usr/include) in the search order.
Cross compilers do not search either /usr/local/include or its replacement.
NATIVE_SYSTEM_HEADER_COMPONENT [Macro]
The “component” corresponding to NATIVE_SYSTEM_HEADER_DIR. See INCLUDE_
DEFAULTS, below, for the description of components. If you do not define this macro,
no component is used.
INCLUDE_DEFAULTS [Macro]
Define this macro if you wish to override the entire default search path for include
files. For a native compiler, the default search path usually consists of GCC_INCLUDE_
DIR, LOCAL_INCLUDE_DIR, GPLUSPLUS_INCLUDE_DIR, and NATIVE_SYSTEM_HEADER_
DIR. In addition, GPLUSPLUS_INCLUDE_DIR and GCC_INCLUDE_DIR are defined au-
tomatically by Makefile, and specify private search areas for GCC. The directory
GPLUSPLUS_INCLUDE_DIR is used only for C++ programs.
The definition should be an initializer for an array of structures. Each array element
should have four elements: the directory name (a string constant), the component
name (also a string constant), a flag for C++-only directories, and a flag showing that
the includes in the directory don’t need to be wrapped in extern ‘C’ when compiling
C++. Mark the end of the array with a null element.
The component name denotes what GNU package the include file is part of, if any,
in all uppercase letters. For example, it might be ‘GCC’ or ‘BINUTILS’. If the package
is part of a vendor-supplied operating system, code the component name as ‘0’.
For example, here is the definition used for VAX/VMS:
#define INCLUDE_DEFAULTS \
{ \
{ "GNU_GXX_INCLUDE:", "G++", 1, 1}, \
{ "GNU_CC_INCLUDE:", "GCC", 0, 0}, \
{ "SYS$SYSROOT:[SYSLIB.]", 0, 0, 0}, \
{ ".", 0, 0, 0}, \
{ 0, 0, 0, 0} \
}
526 GNU Compiler Collection (GCC) Internals
TARGET_CPU_CPP_BUILTINS () [Macro]
This function-like macro expands to a block of code that defines built-in preproces-
sor macros and assertions for the target CPU, using the functions builtin_define,
builtin_define_std and builtin_assert. When the front end calls this macro it
provides a trailing semicolon, and since it has finished command line option processing
your code can use those results freely.
Chapter 18: Target Description Macros and Functions 527
builtin_assert takes a string in the form you pass to the command-line option -A,
such as cpu=mips, and creates the assertion. builtin_define takes a string in the
form accepted by option -D and unconditionally defines the macro.
builtin_define_std takes a string representing the name of an object-like macro. If
it doesn’t lie in the user’s namespace, builtin_define_std defines it unconditionally.
Otherwise, it defines a version with two leading underscores, and another version with
two leading and trailing underscores, and defines the original only if an ISO standard
was not requested on the command line. For example, passing unix defines __unix,
__unix__ and possibly unix; passing _mips defines __mips, __mips__ and possibly
_mips, and passing _ABI64 defines only _ABI64.
You can also test for the C dialect being compiled. The variable c_language is set to
one of clk_c, clk_cplusplus or clk_objective_c. Note that if we are preprocessing
assembler, this variable will be clk_c but the function-like macro preprocessing_
asm_p() will return true, so you might want to check for that first. If you need to
check for strict ANSI, the variable flag_iso can be used. The function-like macro
preprocessing_trad_p() can be used to check for traditional preprocessing.
TARGET_OS_CPP_BUILTINS () [Macro]
Similarly to TARGET_CPU_CPP_BUILTINS but this macro is optional and is used for
the target operating system instead.
TARGET_OBJFMT_CPP_BUILTINS () [Macro]
Similarly to TARGET_CPU_CPP_BUILTINS but this macro is optional and is used for the
target object format. elfos.h uses this macro to define __ELF__, so you probably do
not need to define it yourself.
page 133). It has the opportunity to do some option-specific processing and should
return true if the option is valid. The arguments are like for TARGET_HANDLE_OPTION.
The default definition does nothing but return false.
In general, you should use TARGET_HANDLE_OPTION to handle options. However, if
processing an option requires routines that are only available in the C (and related
language) front ends, then you should use TARGET_HANDLE_C_OPTION instead.
tree TARGET_OBJC_CONSTRUCT_STRING_OBJECT (tree string) [C Target Hook]
Targets may provide a string object type that can be used within and between C, C++
and their respective Objective-C dialects. A string object might, for example, embed
encoding and length information. These objects are considered opaque to the compiler
and handled as references. An ideal implementation makes the composition of the
string object match that of the Objective-C NSString (NXString for GNUStep),
allowing efficient interworking between C-only and Objective-C code. If a target
implements string objects then this hook should return a reference to such an object
constructed from the normal ‘C’ string representation provided in string. At present,
the hook is used by Objective-C only, to obtain a common-format string object when
the target provides one.
void TARGET_OBJC_DECLARE_UNRESOLVED_CLASS_REFERENCE [C Target Hook]
(const char *classname)
Declare that Objective C class classname is referenced by the current TU.
void TARGET_OBJC_DECLARE_CLASS_DEFINITION (const char [C Target Hook]
*classname)
Declare that Objective C class classname is defined by the current TU.
bool TARGET_STRING_OBJECT_REF_TYPE_P (const_tree [C Target Hook]
stringref)
If a target implements string objects then this hook should return true if stringref
is a valid reference to such an object.
void TARGET_CHECK_STRING_OBJECT_FORMAT_ARG (tree [C Target Hook]
format_arg, tree args_list)
If a target implements string objects then this hook should provide a facility to check
the function arguments in args list against the format specifiers in format arg where
the type of format arg is one recognized as a valid string reference type.
void TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE (void) [Target Hook]
This target function is similar to the hook TARGET_OPTION_OVERRIDE but is called
when the optimize level is changed via an attribute or pragma or when it is reset
at the end of the code affected by the attribute or pragma. It is not called at the
beginning of compilation when TARGET_OPTION_OVERRIDE is called so if you want to
perform these actions then, you should have TARGET_OPTION_OVERRIDE call TARGET_
OVERRIDE_OPTIONS_AFTER_CHANGE.
C_COMMON_OVERRIDE_OPTIONS [Macro]
This is similar to the TARGET_OPTION_OVERRIDE hook but is only used in the C lan-
guage frontends (C, Objective-C, C++, Objective-C++) and so can be used to alter
option flag variables which only exist in those frontends.
Chapter 18: Target Description Macros and Functions 529
instructions, then this must still be defined, but it doesn’t matter which value it is
defined to. This macro need not be a constant.
This macro does not affect the way structure fields are packed into bytes or words;
that is controlled by BYTES_BIG_ENDIAN.
BYTES_BIG_ENDIAN [Macro]
Define this macro to have the value 1 if the most significant byte in a word has the
lowest number. This macro need not be a constant.
WORDS_BIG_ENDIAN [Macro]
Define this macro to have the value 1 if, in a multiword object, the most significant
word has the lowest number. This applies to both memory locations and registers;
see REG_WORDS_BIG_ENDIAN if the order of words in memory is not the same as the
order in registers. This macro need not be a constant.
REG_WORDS_BIG_ENDIAN [Macro]
On some machines, the order of words in a multiword object differs between registers
in memory. In such a situation, define this macro to describe the order of words in a
register. The macro WORDS_BIG_ENDIAN controls the order of words in memory.
FLOAT_WORDS_BIG_ENDIAN [Macro]
Define this macro to have the value 1 if DFmode, XFmode or TFmode floating point
numbers are stored in memory with the word containing the sign bit at the lowest
address; otherwise define it to have the value 0. This macro need not be a constant.
You need not define this macro if the ordering is the same as for multi-word integers.
BITS_PER_WORD [Macro]
Number of bits in a word. If you do not define this macro, the default is BITS_PER_
UNIT * UNITS_PER_WORD.
MAX_BITS_PER_WORD [Macro]
Maximum number of bits in a word. If this is undefined, the default is BITS_PER_
WORD. Otherwise, it is the constant value that is the largest value that BITS_PER_WORD
can have at run-time.
UNITS_PER_WORD [Macro]
Number of storage units in a word; normally the size of a general-purpose register, a
power of two from 1 or 8.
MIN_UNITS_PER_WORD [Macro]
Minimum number of units in a word. If this is undefined, the default is UNITS_PER_
WORD. Otherwise, it is the constant value that is the smallest value that UNITS_PER_
WORD can have at run-time.
POINTER_SIZE [Macro]
Width of a pointer, in bits. You must specify a value no wider than the width of
Pmode. If it is not equal to the width of Pmode, you must define POINTERS_EXTEND_
UNSIGNED. If you do not specify a value the default is BITS_PER_WORD.
532 GNU Compiler Collection (GCC) Internals
POINTERS_EXTEND_UNSIGNED [Macro]
A C expression that determines how pointers should be extended from ptr_mode to
either Pmode or word_mode. It is greater than zero if pointers should be zero-extended,
zero if they should be sign-extended, and negative if some other sort of conversion is
needed. In the last case, the extension is done by the target’s ptr_extend instruction.
You need not define this macro if the ptr_mode, Pmode and word_mode are all the
same width.
PROMOTE_MODE (m, unsignedp, type) [Macro]
A macro to update m and unsignedp when an object whose type is type and which
has the specified mode and signedness is to be stored in a register. This macro is only
called when type is a scalar type.
On most RISC machines, which only have operations that operate on a full register,
define this macro to set m to word_mode if m is an integer mode narrower than
BITS_PER_WORD. In most cases, only integer modes should be widened because wider-
precision floating-point operations are usually more expensive than their narrower
counterparts.
For most machines, the macro definition does not change unsignedp. However, some
machines, have instructions that preferentially handle either signed or unsigned quan-
tities of certain modes. For example, on the DEC Alpha, 32-bit loads from memory
and 32-bit add instructions sign-extend the result to 64 bits. On such machines, set
unsignedp according to which kind of extension is more efficient.
Do not define this macro if it would never modify m.
enum flt_eval_method TARGET_C_EXCESS_PRECISION (enum [Target Hook]
excess_precision_type type)
Return a value, with the same meaning as the C99 macro FLT_EVAL_
METHOD that describes which excess precision should be applied. type is
either EXCESS_PRECISION_TYPE_IMPLICIT, EXCESS_PRECISION_TYPE_FAST,
EXCESS_PRECISION_TYPE_STANDARD, or EXCESS_PRECISION_TYPE_FLOAT16. For
EXCESS_PRECISION_TYPE_IMPLICIT, the target should return which precision and
range operations will be implictly evaluated in regardless of the excess precision
explicitly added. For EXCESS_PRECISION_TYPE_STANDARD, EXCESS_PRECISION_
TYPE_FLOAT16, and EXCESS_PRECISION_TYPE_FAST, the target should return
the explicit excess precision that should be added depending on the value set
for -fexcess-precision=[standard|fast|16]. Note that unpredictable explicit
excess precision does not make sense, so a target should never return FLT_
EVAL_METHOD_UNPREDICTABLE when type is EXCESS_PRECISION_TYPE_STANDARD,
EXCESS_PRECISION_TYPE_FLOAT16 or EXCESS_PRECISION_TYPE_FAST.
Return a value, with the same meaning as the C99 macro FLT_EVAL_METHOD that describes
which excess precision should be applied.
bool TARGET_C_BITINT_TYPE_INFO (int n, struct [Target Hook]
bitint_info *info)
This target hook returns true if _BitInt(N) is supported and provides details on it.
_BitInt(N) is to be represented as series of info->abi_limb_mode CEIL (N, GET_
MODE_PRECISION (info->abi_limb_mode)) limbs, ordered from least significant to
Chapter 18: Target Description Macros and Functions 533
PARM_BOUNDARY [Macro]
Normal alignment required for function parameters on the stack, in bits. All stack
parameters receive at least this much alignment regardless of data type. On most
machines, this is the same as the size of an integer.
STACK_BOUNDARY [Macro]
Define this macro to the minimum alignment enforced by hardware for the stack
pointer on this machine. The definition is a C expression for the desired alignment
(measured in bits). This value is used as a default if PREFERRED_STACK_BOUNDARY is
not defined. On most machines, this should be the same as PARM_BOUNDARY.
PREFERRED_STACK_BOUNDARY [Macro]
Define this macro if you wish to preserve a certain alignment for the stack pointer,
greater than what the hardware enforces. The definition is a C expression for the
desired alignment (measured in bits). This macro must evaluate to a value equal to
or larger than STACK_BOUNDARY.
INCOMING_STACK_BOUNDARY [Macro]
Define this macro if the incoming stack boundary may be different from PREFERRED_
STACK_BOUNDARY. This macro must evaluate to a value equal to or larger than STACK_
BOUNDARY.
FUNCTION_BOUNDARY [Macro]
Alignment required for a function entry point, in bits.
534 GNU Compiler Collection (GCC) Internals
BIGGEST_ALIGNMENT [Macro]
Biggest alignment that any data type can require on this machine, in bits. Note that
this is not the biggest alignment that is supported, just the biggest alignment that,
when violated, may cause a fault.
HOST_WIDE_INT TARGET_ABSOLUTE_BIGGEST_ALIGNMENT [Target Hook]
If defined, this target hook specifies the absolute biggest alignment that a type or
variable can have on this machine, otherwise, BIGGEST_ALIGNMENT is used.
MALLOC_ABI_ALIGNMENT [Macro]
Alignment, in bits, a C conformant malloc implementation has to provide. If not
defined, the default value is BITS_PER_WORD.
ATTRIBUTE_ALIGNED_VALUE [Macro]
Alignment used by the __attribute__ ((aligned)) construct. If not defined, the
default value is BIGGEST_ALIGNMENT.
MINIMUM_ATOMIC_ALIGNMENT [Macro]
If defined, the smallest alignment, in bits, that can be given to an object that can
be referenced in one operation, without disturbing any nearby object. Normally, this
is BITS_PER_UNIT, but may be larger on machines that don’t have byte or half-word
store operations.
BIGGEST_FIELD_ALIGNMENT [Macro]
Biggest alignment that any structure or union field can require on this machine,
in bits. If defined, this overrides BIGGEST_ALIGNMENT for structure and union fields
only, unless the field alignment has been set by the __attribute__ ((aligned (n)))
construct.
ADJUST_FIELD_ALIGN (field, type, computed) [Macro]
An expression for the alignment of a structure field field of type type if the alignment
computed in the usual way (including applying of BIGGEST_ALIGNMENT and BIGGEST_
FIELD_ALIGNMENT to the alignment) is computed. It overrides alignment only if the
field alignment has not been set by the __attribute__ ((aligned (n))) construct.
Note that field may be NULL_TREE in case we just query for the minimum alignment
of a field of type type in structure context.
MAX_STACK_ALIGNMENT [Macro]
Biggest stack alignment guaranteed by the backend. Use this macro to specify the
maximum alignment of a variable on stack.
If not defined, the default value is STACK_BOUNDARY.
MAX_OFILE_ALIGNMENT [Macro]
Biggest alignment supported by the object file format of this machine. Use this macro
to limit the alignment which can be specified using the __attribute__ ((aligned
(n))) construct for functions and objects with static storage duration. The alignment
of automatic objects may exceed the object file format maximum up to the maximum
supported by GCC. If not defined, the default value is BIGGEST_ALIGNMENT.
On systems that use ELF, the default (in config/elfos.h) is the largest supported
32-bit ELF section alignment representable on a 32-bit host e.g. ‘(((uint64_t) 1
Chapter 18: Target Description Macros and Functions 535
<< 28) * 8)’. On 32-bit ELF the largest supported section alignment in bits is
‘(0x80000000 * 8)’, but this is not representable on 32-bit hosts.
EMPTY_FIELD_BOUNDARY [Macro]
Alignment in bits to be given to a structure bit-field that follows an empty field such
as int : 0;.
If PCC_BITFIELD_TYPE_MATTERS is true, it overrides this macro.
STRUCTURE_SIZE_BOUNDARY [Macro]
Number of bits which any structure or union’s size must be a multiple of. Each
structure or union’s size is rounded up to a multiple of this.
If you do not define this macro, the default is the same as BITS_PER_UNIT.
STRICT_ALIGNMENT [Macro]
Define this macro to be the value 1 if instructions will fail to work if given data not
on the nominal alignment. If instructions will merely go slower in that case, define
this macro as 0.
Chapter 18: Target Description Macros and Functions 537
PCC_BITFIELD_TYPE_MATTERS [Macro]
Define this if you wish to imitate the way many other C compilers handle alignment
of bit-fields and the structures that contain them.
The behavior is that the type written for a named bit-field (int, short, or other
integer type) imposes an alignment for the entire structure, as if the structure really
did contain an ordinary field of that type. In addition, the bit-field is placed within
the structure so that it would fit within such a field, not crossing a boundary for it.
Thus, on most machines, a named bit-field whose type is written as int would not
cross a four-byte boundary, and would force four-byte alignment for the whole struc-
ture. (The alignment used may not be four bytes; it is controlled by the other align-
ment parameters.)
An unnamed bit-field will not affect the alignment of the containing structure.
If the macro is defined, its definition should be a C expression; a nonzero value for
the expression enables this behavior.
Note that if this macro is not defined, or its value is zero, some bit-fields may cross
more than one alignment boundary. The compiler can support such references if there
are ‘insv’, ‘extv’, and ‘extzv’ insns that can directly reference memory.
The other known way of making bit-fields work is to define STRUCTURE_SIZE_
BOUNDARY as large as BIGGEST_ALIGNMENT. Then every structure can be accessed
with fullwords.
Unless the machine has bit-field instructions or you define STRUCTURE_SIZE_BOUNDARY
that way, you must define PCC_BITFIELD_TYPE_MATTERS to have a nonzero value.
If your aim is to make GCC use the same conventions for laying out bit-fields as are
used by another compiler, here is how to investigate what the other compiler does.
Compile and run this program:
struct foo1
{
char x;
char :0;
char y;
};
struct foo2
{
char x;
int :0;
char y;
};
main ()
{
printf ("Size of foo1 is %d\n",
sizeof (struct foo1));
printf ("Size of foo2 is %d\n",
sizeof (struct foo2));
exit (0);
}
If this prints 2 and 5, then the compiler’s behavior is what you would get from PCC_
BITFIELD_TYPE_MATTERS.
538 GNU Compiler Collection (GCC) Internals
BITFIELD_NBYTES_LIMITED [Macro]
Like PCC_BITFIELD_TYPE_MATTERS except that its effect is limited to aligning a bit-
field within the structure.
MAX_FIXED_MODE_SIZE [Macro]
An integer expression for the size in bits of the largest integer machine mode that
should actually be used. All integer machine modes of this size or smaller can be
used for structures and unions with the appropriate sizes. If this macro is undefined,
GET_MODE_BITSIZE (DImode) is assumed.
STACK_SIZE_MODE [Macro]
If defined, an expression of type machine_mode that specifies the mode of the size
increment operand of an allocate_stack named pattern (see Section 17.10 [Standard
Names], page 420).
You need not define this macro if it always returns word_mode. You would most
commonly define this macro if the allocate_stack pattern needs to support both a
32- and a 64-bit mode.
INT_TYPE_SIZE [Macro]
A C expression for the size in bits of the type int on the target machine. If you don’t
define this, the default is one word.
SHORT_TYPE_SIZE [Macro]
A C expression for the size in bits of the type short on the target machine. If you
don’t define this, the default is half a word. (If this would be less than one storage
unit, it is rounded up to one unit.)
LONG_TYPE_SIZE [Macro]
A C expression for the size in bits of the type long on the target machine. If you
don’t define this, the default is one word.
ADA_LONG_TYPE_SIZE [Macro]
On some machines, the size used for the Ada equivalent of the type long by a native
Ada compiler differs from that used by C. In that situation, define this macro to be a
C expression to be used for the size of that type. If you don’t define this, the default
is the value of LONG_TYPE_SIZE.
LONG_LONG_TYPE_SIZE [Macro]
A C expression for the size in bits of the type long long on the target machine. If
you don’t define this, the default is two words. If you want to support GNU Ada on
your machine, the value of this macro must be at least 64.
CHAR_TYPE_SIZE [Macro]
A C expression for the size in bits of the type char on the target machine. If you
don’t define this, the default is BITS_PER_UNIT.
BOOL_TYPE_SIZE [Macro]
A C expression for the size in bits of the C++ type bool and C99 type _Bool on the
target machine. If you don’t define this, and you probably shouldn’t, the default is
CHAR_TYPE_SIZE.
FLOAT_TYPE_SIZE [Macro]
A C expression for the size in bits of the type float on the target machine. If you
don’t define this, the default is one word.
DOUBLE_TYPE_SIZE [Macro]
A C expression for the size in bits of the type double on the target machine. If you
don’t define this, the default is two words.
LONG_DOUBLE_TYPE_SIZE [Macro]
A C expression for the size in bits of the type long double on the target machine. If
you don’t define this, the default is two words.
SHORT_FRACT_TYPE_SIZE [Macro]
A C expression for the size in bits of the type short _Fract on the target machine.
If you don’t define this, the default is BITS_PER_UNIT.
FRACT_TYPE_SIZE [Macro]
A C expression for the size in bits of the type _Fract on the target machine. If you
don’t define this, the default is BITS_PER_UNIT * 2.
542 GNU Compiler Collection (GCC) Internals
LONG_FRACT_TYPE_SIZE [Macro]
A C expression for the size in bits of the type long _Fract on the target machine. If
you don’t define this, the default is BITS_PER_UNIT * 4.
LONG_LONG_FRACT_TYPE_SIZE [Macro]
A C expression for the size in bits of the type long long _Fract on the target machine.
If you don’t define this, the default is BITS_PER_UNIT * 8.
SHORT_ACCUM_TYPE_SIZE [Macro]
A C expression for the size in bits of the type short _Accum on the target machine.
If you don’t define this, the default is BITS_PER_UNIT * 2.
ACCUM_TYPE_SIZE [Macro]
A C expression for the size in bits of the type _Accum on the target machine. If you
don’t define this, the default is BITS_PER_UNIT * 4.
LONG_ACCUM_TYPE_SIZE [Macro]
A C expression for the size in bits of the type long _Accum on the target machine. If
you don’t define this, the default is BITS_PER_UNIT * 8.
LONG_LONG_ACCUM_TYPE_SIZE [Macro]
A C expression for the size in bits of the type long long _Accum on the target machine.
If you don’t define this, the default is BITS_PER_UNIT * 16.
LIBGCC2_GNU_PREFIX [Macro]
This macro corresponds to the TARGET_LIBFUNC_GNU_PREFIX target hook and should
be defined if that hook is overriden to be true. It causes function names in libgcc
to be changed to use a __gnu_ prefix for their name rather than the default __. A
port which uses this macro should also arrange to use t-gnu-prefix in the libgcc
config.host.
WIDEST_HARDWARE_FP_SIZE [Macro]
A C expression for the size in bits of the widest floating-point format supported by
the hardware. If you define this macro, you must specify a value less than or equal
to the value of LONG_DOUBLE_TYPE_SIZE. If you do not define this macro, the value
of LONG_DOUBLE_TYPE_SIZE is the default.
DEFAULT_SIGNED_CHAR [Macro]
An expression whose value is 1 or 0, according to whether the type char should be
signed or unsigned by default. The user can always override this default with the
options -fsigned-char and -funsigned-char.
SIZE_TYPE [Macro]
A C expression for a string describing the name of the data type to use for size values.
The typedef name size_t is defined using the contents of the string.
The string can contain more than one keyword. If so, separate them with spaces,
and write first any length keyword, then unsigned if appropriate, and finally int.
The string must exactly match one of the data type names defined in the function
c_common_nodes_and_builtins in the file c-family/c-common.cc. You may not
omit int or change the order—that would cause the compiler to crash on startup.
If you don’t define this macro, the default is "long unsigned int".
SIZETYPE [Macro]
GCC defines internal types (sizetype, ssizetype, bitsizetype and sbitsizetype)
for expressions dealing with size. This macro is a C expression for a string describing
the name of the data type from which the precision of sizetype is extracted.
The string has the same restrictions as SIZE_TYPE string.
If you don’t define this macro, the default is SIZE_TYPE.
PTRDIFF_TYPE [Macro]
A C expression for a string describing the name of the data type to use for the result of
subtracting two pointers. The typedef name ptrdiff_t is defined using the contents
of the string. See SIZE_TYPE above for more information.
If you don’t define this macro, the default is "long int".
WCHAR_TYPE [Macro]
A C expression for a string describing the name of the data type to use for wide
characters. The typedef name wchar_t is defined using the contents of the string.
See SIZE_TYPE above for more information.
If you don’t define this macro, the default is "int".
WCHAR_TYPE_SIZE [Macro]
A C expression for the size in bits of the data type for wide characters. This is used
in cpp, which cannot make use of WCHAR_TYPE.
WINT_TYPE [Macro]
A C expression for a string describing the name of the data type to use for wide
characters passed to printf and returned from getwc. The typedef name wint_t is
defined using the contents of the string. See SIZE_TYPE above for more information.
If you don’t define this macro, the default is "unsigned int".
INTMAX_TYPE [Macro]
A C expression for a string describing the name of the data type that can represent any
value of any standard or extended signed integer type. The typedef name intmax_t is
defined using the contents of the string. See SIZE_TYPE above for more information.
If you don’t define this macro, the default is the first of "int", "long int", or "long
long int" that has as much precision as long long int.
544 GNU Compiler Collection (GCC) Internals
UINTMAX_TYPE [Macro]
A C expression for a string describing the name of the data type that can represent
any value of any standard or extended unsigned integer type. The typedef name
uintmax_t is defined using the contents of the string. See SIZE_TYPE above for more
information.
If you don’t define this macro, the default is the first of "unsigned int", "long
unsigned int", or "long long unsigned int" that has as much precision as long
long unsigned int.
SIG_ATOMIC_TYPE [Macro]
INT8_TYPE [Macro]
INT16_TYPE [Macro]
INT32_TYPE [Macro]
INT64_TYPE [Macro]
UINT8_TYPE [Macro]
UINT16_TYPE [Macro]
UINT32_TYPE [Macro]
UINT64_TYPE [Macro]
INT_LEAST8_TYPE [Macro]
INT_LEAST16_TYPE [Macro]
INT_LEAST32_TYPE [Macro]
INT_LEAST64_TYPE [Macro]
UINT_LEAST8_TYPE [Macro]
UINT_LEAST16_TYPE [Macro]
UINT_LEAST32_TYPE [Macro]
UINT_LEAST64_TYPE [Macro]
INT_FAST8_TYPE [Macro]
INT_FAST16_TYPE [Macro]
INT_FAST32_TYPE [Macro]
INT_FAST64_TYPE [Macro]
UINT_FAST8_TYPE [Macro]
UINT_FAST16_TYPE [Macro]
UINT_FAST32_TYPE [Macro]
UINT_FAST64_TYPE [Macro]
INTPTR_TYPE [Macro]
UINTPTR_TYPE [Macro]
C expressions for the standard types sig_atomic_t, int8_t, int16_t, int32_t,
int64_t, uint8_t, uint16_t, uint32_t, uint64_t, int_least8_t, int_least16_t,
int_least32_t, int_least64_t, uint_least8_t, uint_least16_t, uint_least32_
t, uint_least64_t, int_fast8_t, int_fast16_t, int_fast32_t, int_fast64_t,
uint_fast8_t, uint_fast16_t, uint_fast32_t, uint_fast64_t, intptr_t, and
uintptr_t. See SIZE_TYPE above for more information.
If any of these macros evaluates to a null pointer, the corresponding type is not
supported; if GCC is configured to provide <stdint.h> in such a case, the header
provided may not conform to C99, depending on the type in question. The defaults
for all of these macros are null pointers.
Chapter 18: Target Description Macros and Functions 545
TARGET_PTRMEMFUNC_VBIT_LOCATION [Macro]
The C++ compiler represents a pointer-to-member-function with a struct that looks
like:
struct {
union {
void (*fn)();
ptrdiff_t vtable_index;
};
ptrdiff_t delta;
};
The C++ compiler must use one bit to indicate whether the function that will be
called through a pointer-to-member-function is virtual. Normally, we assume that
the low-order bit of a function pointer must always be zero. Then, by ensuring that
the vtable index is odd, we can distinguish which variant of the union is in use. But,
on some platforms function pointers can be odd, and so this doesn’t work. In that
case, we use the low-order bit of the delta field, and shift the remainder of the delta
field to the left.
GCC will automatically make the right selection about where to store this bit using
the FUNCTION_BOUNDARY setting for your platform. However, some platforms such as
ARM/Thumb have FUNCTION_BOUNDARY set such that functions always start at even
addresses, but the lowest bit of pointers to functions indicate whether the function at
that address is in ARM or Thumb mode. If this is the case of your architecture, you
should define this macro to ptrmemfunc_vbit_in_delta.
In general, you should not have to define this macro. On architectures in which
function addresses are always even, according to FUNCTION_BOUNDARY, GCC will au-
tomatically define this macro to ptrmemfunc_vbit_in_pfn.
TARGET_VTABLE_USES_DESCRIPTORS [Macro]
Normally, the C++ compiler uses function pointers in vtables. This macro allows the
target to change to use “function descriptors” instead. Function descriptors are found
on targets for whom a function pointer is actually a small data structure. Normally
the data structure consists of the actual code address plus a data pointer to which
the function’s data is relative.
If vtables are used, the value of this macro should be the number of words that the
function descriptor occupies.
TARGET_VTABLE_ENTRY_ALIGN [Macro]
By default, the vtable entries are void pointers, the so the alignment is the same as
pointer alignment. The value of this macro specifies the alignment of the vtable entry
in bits. It should be defined only when special alignment is necessary. */
TARGET_VTABLE_DATA_ENTRY_DISTANCE [Macro]
There are a few non-descriptor entries in the vtable at offsets below zero. If these
entries must be padded (say, to preserve the alignment specified by TARGET_VTABLE_
ENTRY_ALIGN), set this to the number of words in each data entry.
546 GNU Compiler Collection (GCC) Internals
FIRST_PSEUDO_REGISTER [Macro]
Number of hardware registers known to the compiler. They receive numbers 0 through
FIRST_PSEUDO_REGISTER-1; thus, the first pseudo register’s number really is assigned
the number FIRST_PSEUDO_REGISTER.
FIXED_REGISTERS [Macro]
An initializer that says which registers are used for fixed purposes all throughout the
compiled code and are therefore not available for general allocation. These would
include the stack pointer, the frame pointer (except on machines where that can be
used as a general register when no frame pointer is needed), the program counter
on machines where that is considered one of the addressable registers, and any other
numbered register with a standard use.
This information is expressed as a sequence of numbers, separated by commas and
surrounded by braces. The nth number is 1 if register n is fixed, 0 otherwise.
The table initialized from this macro, and the table initialized by the following one,
may be overridden at run time either automatically, by the actions of the macro
CONDITIONAL_REGISTER_USAGE, or by the user with the command options -ffixed-
reg, -fcall-used-reg and -fcall-saved-reg.
CALL_USED_REGISTERS [Macro]
Like FIXED_REGISTERS but has 1 for each register that is clobbered (in general) by
function calls as well as for fixed registers. This macro therefore identifies the registers
that are not available for general allocation of values that must live across function
calls.
If a register has 0 in CALL_USED_REGISTERS, the compiler automatically saves it on
function entry and restores it on function exit, if the register is used within the
function.
Exactly one of CALL_USED_REGISTERS and CALL_REALLY_USED_REGISTERS must be
defined. Modern ports should define CALL_REALLY_USED_REGISTERS.
CALL_REALLY_USED_REGISTERS [Macro]
Like CALL_USED_REGISTERS except this macro doesn’t require that the entire set of
FIXED_REGISTERS be included. (CALL_USED_REGISTERS must be a superset of FIXED_
REGISTERS).
Chapter 18: Target Description Macros and Functions 547
If the usage of an entire class of registers depends on the target flags, you may indicate
this to GCC by using this macro to modify fixed_regs and call_used_regs to 1
for each of the registers in the classes which should not be used by GCC. Also
make define_register_constraints return NO_REGS for constraints that shouldn’t
be used.
(However, if this class is not included in GENERAL_REGS and all of the insn patterns
whose constraints permit this class are controlled by target switches, then GCC will
automatically avoid using these registers when the target switches are opposed to
them.)
INCOMING_REGNO (out) [Macro]
Define this macro if the target machine has register windows. This C expression
returns the register number as seen by the called function corresponding to the register
number out as seen by the calling function. Return out if register number out is not
an outbound register.
OUTGOING_REGNO (in) [Macro]
Define this macro if the target machine has register windows. This C expression
returns the register number as seen by the calling function corresponding to the
register number in as seen by the called function. Return in if register number in is
not an inbound register.
LOCAL_REGNO (regno) [Macro]
Define this macro if the target machine has register windows. This C expression
returns true if the register is call-saved but is in the register window. Unlike most
call-saved registers, such registers need not be explicitly restored on function exit or
during non-local gotos.
PC_REGNUM [Macro]
If the program counter has a register number, define this as that register number.
Otherwise, do not define it.
Store the desired register order in the array reg_alloc_order. Element 0 should be
the register to allocate first; element 1, the next register; and so on.
The macro body should not assume anything about the contents of reg_alloc_order
before execution of the macro.
On most machines, it is not necessary to define this macro.
HONOR_REG_ALLOC_ORDER [Macro]
Normally, IRA tries to estimate the costs for saving a register in the prologue and
restoring it in the epilogue. This discourages it from using call-saved registers.
If a machine wants to ensure that IRA allocates registers in the order given by
REG ALLOC ORDER even if some call-saved registers appear earlier than call-used
ones, then define this macro as a C expression to nonzero. Default is 0.
On some machines, the floating registers are especially slow to access, so that it
is better to store a value in a stack frame than in such a register if floating point
arithmetic is not being done. As long as the floating registers are not in class GENERAL_
REGS, they will not be used unless some pattern’s constraint asks for one.
AVOID_CCMODE_COPIES [Macro]
Define this macro if the compiler should avoid copies to/from CCmode registers. You
should only define this macro if support for copying to/from CCmode is incomplete.
GCC assigns register numbers before it knows whether the function is suitable for leaf
function treatment. So it needs to renumber the registers in order to output a leaf function.
The following macros accomplish this.
LEAF_REGISTERS [Macro]
Name of a char vector, indexed by hard register number, which contains 1 for a
register that is allowable in a candidate for leaf function treatment.
If leaf function treatment involves renumbering the registers, then the registers marked
here should be the ones before renumbering—those that GCC would ordinarily allo-
cate. The registers which will actually be used in the assembler code, after renum-
bering, should not be marked with 1 in this vector.
Define this macro only if the target machine offers a way to optimize the treatment
of leaf functions.
STACK_REGS [Macro]
Define this if the machine has any stack-like registers.
STACK_REG_COVER_CLASS [Macro]
This is a cover class containing the stack registers. Define this if the machine has any
stack-like registers.
Chapter 18: Target Description Macros and Functions 553
FIRST_STACK_REG [Macro]
The number of the first stack-like register. This one is the top of the stack.
LAST_STACK_REG [Macro]
The number of the last stack-like register. This one is the bottom of the stack.
Register classes used for input-operands of bitwise-and or shift instructions have a special
requirement: each such class must have, for each fixed-point machine mode, a subclass whose
registers can transfer that mode to or from memory. For example, on some machines, the
operations for single-byte values (QImode) are limited to certain registers. When this is so,
each register class that is used in a bitwise-and or shift instruction must have a subclass
consisting of registers from which single-byte values can be loaded or stored. This is so that
PREFERRED_RELOAD_CLASS can always have a possible value to return.
enum reg_class [Data type]
An enumerated type that must be defined with all the register class names as enu-
merated values. NO_REGS must be first. ALL_REGS must be the last register class,
followed by one more enumerated value, LIM_REG_CLASSES, which is not a register
class but rather tells how many classes there are.
Each register class has a number, which is the value of casting the class name to type
int. The number serves as an index in many of the tables described below.
N_REG_CLASSES [Macro]
The number of distinct register classes, defined as follows:
#define N_REG_CLASSES (int) LIM_REG_CLASSES
REG_CLASS_NAMES [Macro]
An initializer containing the names of the register classes as C string constants. These
names are used in writing some of the debugging dumps.
REG_CLASS_CONTENTS [Macro]
An initializer containing the contents of the register classes, as integers which are bit
masks. The nth integer specifies the contents of class n. The way the integer mask is
interpreted is that register r is in the class if mask & (1 << r) is 1.
When the machine has more than 32 registers, an integer does not suffice. Then the
integers are replaced by sub-initializers, braced groupings containing several integers.
Each sub-initializer must be suitable as an initializer for the type HARD_REG_SET which
is defined in hard-reg-set.h. In this situation, the first integer in each sub-initializer
corresponds to registers 0 through 31, the second integer to registers 32 through 63,
and so on.
REGNO_REG_CLASS (regno) [Macro]
A C expression whose value is a register class containing hard register regno. In
general there is more than one such class; choose a class which is minimal, meaning
that no smaller class also contains the register.
BASE_REG_CLASS [Macro]
A macro whose definition is the name of the class to which a valid base register must
belong. A base register is one used in an address which is the register value plus a
displacement.
MODE_BASE_REG_CLASS (mode) [Macro]
This is a variation of the BASE_REG_CLASS macro which allows the selection of a base
register in a mode dependent manner. If mode is VOIDmode then it should return
the same value as BASE_REG_CLASS.
Chapter 18: Target Description Macros and Functions 555
INDEX_REG_CLASS [Macro]
A macro whose definition is the name of the class to which a valid index register must
belong. An index register is one used in an address where its value is either multiplied
by a scale factor or added to another register (as well as added to a displacement).
may be either a suitable hard register or a pseudo register that has been allocated
such a hard register. You should define this macro if base plus index addresses have
different requirements than other base register uses.
Use of this macro is deprecated; please use the more general REGNO_MODE_CODE_OK_
FOR_BASE_P.
NO_REGS, in this case, makes reload add a ! in front of the constraint: the x86 back-
end uses this feature to discourage usage of 387 registers when math is done in the
SSE registers (and vice versa).
reloads, this target hook is called with zero in p, and a register of class reload class
needs to be copied to rtx x in reload mode.
If copying a register of reload class from/to x requires an intermediate register, the
hook secondary_reload should return the register class required for this intermediate
register. If no intermediate register is required, it should return NO REGS. If more
than one intermediate register is required, describe the one that is closest in the copy
chain to the reload register.
If scratch registers are needed, you also have to describe how to perform the copy
from/to the reload register to/from this closest intermediate register. Or if no inter-
mediate register is required, but still a scratch register is needed, describe the copy
from/to the reload register to/from the reload operand x.
You do this by setting sri->icode to the instruction code of a pattern in the md
file which performs the move. Operands 0 and 1 are the output and input of this
copy, respectively. Operands from operand 2 onward are for scratch operands. These
scratch operands must have a mode, and a single-register-class output constraint.
When an intermediate register is used, the secondary_reload hook will be called
again to determine how to copy the intermediate register to/from the reload operand
x, so your hook must also have code to handle the register class of the intermediate
operand.
x might be a pseudo-register or a subreg of a pseudo-register, which could either be
in a hard register or in memory. Use true_regnum to find out; it will return −1 if
the pseudo is in memory and the hard register number if it is in a register.
Scratch operands in memory (constraint "=m" / "=&m") are currently not supported.
For the time being, you will have to continue to use TARGET_SECONDARY_MEMORY_
NEEDED for that purpose.
copy_cost also uses this target hook to find out how values are copied. If you want
it to include some extra cost for the need to allocate (a) scratch register(s), set sri-
>extra_cost to the additional cost. Or if two dependent moves are supposed to have a
lower cost than the sum of the individual moves due to expected fortuitous scheduling
and/or special forwarding logic, you can set sri->extra_cost to a negative amount.
register class required. If the requirements for input and output reloads were the same,
the macro SECONDARY_RELOAD_CLASS should have been used instead of defining both
macros identically.
The values returned by these macros are often GENERAL_REGS. Return NO_REGS if no
spare register is needed; i.e., if x can be directly copied to or from a register of class
in mode without requiring a scratch register. Do not define this macro if it would
always return NO_REGS.
If a scratch register is required (either with or without an intermediate register), you
were supposed to define patterns for ‘reload_inm’ or ‘reload_outm’, as required (see
Section 17.10 [Standard Names], page 420. These patterns, which were normally
implemented with a define_expand, should be similar to the ‘movm’ patterns, except
that operand 2 is the scratch register.
These patterns need constraints for the reload register and scratch register that con-
tain a single register class. If the original reload register (whose class is class) can
meet the constraint given in the pattern, the value returned by these macros is used
for the class of the scratch register. Otherwise, two additional reload registers are
required. Their classes are obtained from the constraints in the insn pattern.
x might be a pseudo-register or a subreg of a pseudo-register, which could either be
in a hard register or in memory. Use true_regnum to find out; it will return −1 if
the pseudo is in memory and the hard register number if it is in a register.
These macros should not be used in the case where a particular class of registers
can only be copied to memory and not to another class of registers. In that case,
secondary reload registers are not needed and would not be helpful. Instead, a stack
location must be used to perform the copy and the movm pattern should use memory
as an intermediate storage. This case often occurs between floating-point and general
registers.
The default depends on TARGET_LRA_P. Without LRA, the default is to use a word-
sized mode for integral modes that are smaller than a a word. This is right thing to
do on most machines because it ensures that all bits of the register are copied and
prevents accesses to the registers in a narrower mode, which some machines prohibit
for floating-point registers.
However, this default behavior is not correct on some machines, such as the DEC
Alpha, that store short integers in floating-point registers differently than in integer
registers. On those machines, the default widening will not work correctly and you
must define this hook to suppress that widening in some cases. See the file alpha.cc
for details.
With LRA, the default is to use mode unmodified.
performed. Not definiting this hook is the same as accepting the mode encoded into
operand 0 of the cstore expander patterns.
int TARGET_COMPUTE_PRESSURE_CLASSES (enum reg_class [Target Hook]
*pressure_classes)
A target hook which lets a backend compute the set of pressure classes to be used
by those optimization passes which take register pressure into account, as opposed
to letting IRA compute them. It returns the number of register classes stored in the
array pressure classes.
STACK_POINTER_OFFSET [Macro]
Offset from the stack pointer register to the first location at which outgoing arguments
are placed. If not specified, the default value of zero is used. This is the proper value
for most machines.
If ARGS_GROW_DOWNWARD, this is the offset to the location above the first location at
which outgoing arguments are placed.
INITIAL_FRAME_ADDRESS_RTX [Macro]
A C expression whose value is RTL representing the address of the initial stack frame.
This address is passed to RETURN_ADDR_RTX and DYNAMIC_CHAIN_ADDRESS. If you
don’t define this macro, a reasonable default value will be used. Define this macro in
order to make frame pointer elimination work in the presence of __builtin_frame_
address (count) and __builtin_return_address (count) for count not equal to
zero.
SETUP_FRAME_ADDRESSES [Macro]
A C expression that produces the machine-specific code to setup the stack so that
arbitrary frames can be accessed. For example, on the SPARC, we must flush all of
the register windows to the stack before we can access arbitrary stack frames. You
will seldom need to define this macro. The default is to do nothing.
RETURN_ADDR_IN_PREVIOUS_FRAME [Macro]
Define this macro to nonzero value if the return address of a particular stack frame
is accessed from the frame pointer of the previous stack frame. The zero default for
this macro is suitable for most ports.
INCOMING_RETURN_ADDR_RTX [Macro]
A C expression whose value is RTL representing the location of the incoming return
address at the beginning of any function, before the prologue. This RTL is either a
REG, indicating that the return value is saved in ‘REG’, or a MEM representing a location
in the stack.
You only need to define this macro if you want to support call frame debugging
information like that provided by DWARF 2.
If this RTL is a REG, you should also define DWARF_FRAME_RETURN_COLUMN to DWARF_
FRAME_REGNUM (REGNO).
DWARF_ALT_FRAME_RETURN_COLUMN [Macro]
A C expression whose value is an integer giving a DWARF 2 column number that
may be used as an alternative return column. The column must not correspond to
any gcc hard register (that is, it must not be in the range of DWARF_FRAME_REGNUM).
This macro can be useful if DWARF_FRAME_RETURN_COLUMN is set to a general register,
but an alternative column needs to be used for signal frames. Some targets have also
used different frame return columns over time.
DWARF_ZERO_REG [Macro]
A C expression whose value is an integer giving a DWARF 2 register number that is
considered to always have the value zero. This should only be defined if the target
has an architected zero register, and someone decided it was a good idea to use that
register number to terminate the stack backtrace. New ports should avoid this.
DWARF_VERSION_DEFAULT [Macro]
A C expression whose value is the default dwarf standard version we’ll honor and ad-
vertise when generating dwarf debug information, in absence of an explicit -gdwarf-
version option on the command line.
Chapter 18: Target Description Macros and Functions 567
STACK_ADDRESS_OFFSET [Macro]
Offset from the stack pointer register to the boundary address between the stack area
claimed by an active function, and stack ranges that could get clobbered if it called
another function. It should NOT encompass any stack red zone, that is used in leaf
functions.
This value is added to the stack pointer register to compute the address returned by
__builtin_stack_address, and this is its only use. If this macro is not defined, no
offset is added. Defining it like STACK_POINTER_OFFSET may be appropriate for many
machines, but not all.
On SPARC, for example, the register save area is *not* considered active or used by
the active function, but rather as akin to the area in which call-preserved registers are
saved by callees, so the stack address is above that area, even though the (unbiased)
stack pointer points below it. This enables __strub_leave to clear what would
otherwise overlap with its own register save area.
On PowerPC, STACK_POINTER_OFFSET also reserves space for a save area, but that
area is used by the caller rather than the callee, so the boundary address is below it.
If the address is computed too high or too low, parts of a stack range that should be
scrubbed may be left unscrubbed, scrubbing may corrupt active portions of the stack
frame, and stack ranges may be doubly-scrubbed by caller and callee.
TARGET_STRUB_USE_DYNAMIC_ARRAY [Macro]
If defined to nonzero, __strub_leave will allocate a dynamic array covering the
stack range that needs scrubbing before clearing it. Allocating the array tends to
make scrubbing slower, but it enables the scrubbing to be safely implemented with a
memset call, which could make up for the difference.
Chapter 18: Target Description Macros and Functions 569
TARGET_STRUB_MAY_USE_MEMSET [Macro]
If defined to nonzero, enable __strub_leave to be optimized so as to call memset
for stack scrubbing. This is only enabled by default if TARGET_STRUB_USE_DYNAMIC_
ARRAY is enabled; it’s not advisable to enable it otherwise, since memset would then
likely overwrite its own stack frame, but it might work if the target ABI enables
memset to not use the stack at all, not even for arguments or its return address, and
its implementation is trivial enough that it doesn’t use a stack frame.
EH_RETURN_STACKADJ_RTX [Macro]
A C expression whose value is RTL representing a location in which to store a stack
adjustment to be applied before function return. This is used to unwind the stack to
an exception handler’s call frame. It will be assigned zero on code paths that return
normally.
Typically this is a call-clobbered hard register that is otherwise untouched by the
epilogue, but could also be a stack slot.
Do not define this macro if the stack pointer is saved and restored by the regular
prolog and epilog code in the call frame itself; in this case, the exception handling
library routines will update the stack location to be restored in place. Otherwise, you
must define this macro if you want to support call frame exception handling like that
provided by DWARF 2.
EH_RETURN_HANDLER_RTX [Macro]
A C expression whose value is RTL representing a location in which to store the
address of an exception handler to which we should return. It will not be assigned on
code paths that return normally.
Typically this is the location in the call frame at which the normal return address is
stored. For targets that return by popping an address off the stack, this might be a
memory address just below the target call frame rather than inside the current call
frame. If defined, EH_RETURN_STACKADJ_RTX will have already been assigned, so it
may be used to calculate the location of the target call frame.
Some targets have more complex requirements than storing to an address calculable
during initial code generation. In that case the eh_return instruction pattern should
be used instead.
570 GNU Compiler Collection (GCC) Internals
If you want to support call frame exception handling, you must define either this
macro or the eh_return instruction pattern.
EH_RETURN_TAKEN_RTX [Macro]
A C expression whose value is RTL representing a location in which to store if the EH
return path was taken instead of a normal return. This macro allows conditionally
executing different code in the epilogue for the EH and normal return cases.
When this macro is defined, the macros EH_RETURN_STACKADJ_RTX and EH_RETURN_
HANDLER_RTX are only meaningful in the epilogue when 1 is stored to the specified
location. The value 0 means normal return.
RETURN_ADDR_OFFSET [Macro]
If defined, an integer-valued C expression for which rtl will be generated to add it to
the exception handler address before it is searched in the exception handling tables,
and to subtract it again from the address before using it to return to the exception
handler.
TARGET_USES_WEAK_UNWIND_INFO [Macro]
A C expression that evaluates to true if the target requires unwind info to be given
comdat linkage. Define it to be 1 if comdat linkage is necessary. The default is 0.
STACK_CHECK_BUILTIN [Macro]
A nonzero value if stack checking is done by the configuration files in a machine-
dependent manner. You should define this macro if stack checking is required by the
ABI of your machine or if you would like to do stack checking in some more efficient
way than the generic approach. The default value of this macro is zero.
STACK_CHECK_STATIC_BUILTIN [Macro]
A nonzero value if static stack checking is done by the configuration files in a machine-
dependent manner. You should define this macro if you would like to do static stack
checking in some more efficient way than the generic approach. The default value of
this macro is zero.
572 GNU Compiler Collection (GCC) Internals
STACK_CHECK_PROBE_INTERVAL_EXP [Macro]
An integer specifying the interval at which GCC must generate stack probe instruc-
tions, defined as 2 raised to this integer. You will normally define this macro so that
the interval be no larger than the size of the “guard pages” at the end of a stack area.
The default value of 12 (4096-byte interval) is suitable for most systems.
STACK_CHECK_MOVING_SP [Macro]
An integer which is nonzero if GCC should move the stack pointer page by page when
doing probes. This can be necessary on systems where the stack pointer contains the
bottom address of the memory area accessible to the executing thread at any point
in time. In this situation an alternate signal stack is required in order to be able to
recover from a stack overflow. The default value of this macro is zero.
STACK_CHECK_PROTECT [Macro]
The number of bytes of stack needed to recover from a stack overflow, for lan-
guages where such a recovery is supported. The default value of 4KB/8KB with the
setjmp/longjmp-based exception handling mechanism and 8KB/12KB with other ex-
ception handling mechanisms should be adequate for most architectures and operating
systems.
The following macros are relevant only if neither STACK CHECK BUILTIN nor
STACK CHECK STATIC BUILTIN is defined; you can omit them altogether in the
opposite case.
STACK_CHECK_MAX_FRAME_SIZE [Macro]
The maximum size of a stack frame, in bytes. GCC will generate probe instructions
in non-leaf functions to ensure at least this many bytes of stack are available. If a
stack frame is larger than this size, stack checking will not be reliable and GCC will
issue a warning. The default is chosen so that GCC only generates one instruction
on most systems. You should normally not change the default value of this macro.
STACK_CHECK_FIXED_FRAME_SIZE [Macro]
GCC uses this value to generate the above warning message. It represents the amount
of fixed frame used by a function, not including space for any callee-saved registers,
temporaries and user variables. You need only specify an upper bound for this amount
and will normally use the default of four words.
STACK_CHECK_MAX_VAR_SIZE [Macro]
The maximum size, in bytes, of an object that GCC will place in the fixed area of
the stack frame when the user specifies -fstack-check. GCC computed the default
from the values of the above macros and you will normally not need to override that
default.
such a probe range is required or zero otherwise. Defining this hook also requires your
functions which make use of alloca to have at least 8 byes of outgoing arguments. If
this is not the case the stack will be corrupted. You need not define this macro if it
would always have the value zero.
STACK_POINTER_REGNUM [Macro]
The register number of the stack pointer register, which must also be a fixed register
according to FIXED_REGISTERS. On most machines, the hardware determines which
register this is.
FRAME_POINTER_REGNUM [Macro]
The register number of the frame pointer register, which is used to access automatic
variables in the stack frame. On some machines, the hardware determines which
register this is. On other machines, you can choose any register you wish for this
purpose.
HARD_FRAME_POINTER_REGNUM [Macro]
On some machines the offset between the frame pointer and starting offset of the
automatic variables is not known until after register allocation has been done (for
example, because the saved registers are between these two locations). On those
machines, define FRAME_POINTER_REGNUM the number of a special, fixed register to be
used internally until the offset is known, and define HARD_FRAME_POINTER_REGNUM to
be the actual hard register number used for the frame pointer.
You should define this macro only in the very rare circumstances when it is not possi-
ble to calculate the offset between the frame pointer and the automatic variables until
after register allocation has been completed. When this macro is defined, you must
also indicate in your definition of ELIMINABLE_REGS how to eliminate FRAME_POINTER_
REGNUM into either HARD_FRAME_POINTER_REGNUM or STACK_POINTER_REGNUM.
Do not define this macro if it would be the same as FRAME_POINTER_REGNUM.
ARG_POINTER_REGNUM [Macro]
The register number of the arg pointer register, which is used to access the function’s
argument list. On some machines, this is the same as the frame pointer register.
On some machines, the hardware determines which register this is. On other ma-
chines, you can choose any register you wish for this purpose. If this is not the same
register as the frame pointer register, then you must mark it as a fixed register ac-
cording to FIXED_REGISTERS, or arrange to be able to eliminate it (see Section 18.9.5
[Elimination], page 575).
HARD_FRAME_POINTER_IS_FRAME_POINTER [Macro]
Define this to a preprocessor constant that is nonzero if hard_frame_pointer_
rtx and frame_pointer_rtx should be the same. The default definition is
‘(HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM)’; you only need to
define this macro if that definition is not suitable for use in preprocessor conditionals.
574 GNU Compiler Collection (GCC) Internals
HARD_FRAME_POINTER_IS_ARG_POINTER [Macro]
Define this to a preprocessor constant that is nonzero if hard_frame_pointer_
rtx and arg_pointer_rtx should be the same. The default definition is
‘(HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM)’; you only need to define
this macro if that definition is not suitable for use in preprocessor conditionals.
RETURN_ADDRESS_POINTER_REGNUM [Macro]
The register number of the return address pointer register, which is used to access
the current function’s return address from the stack. On some machines, the return
address is not at a fixed offset from the frame pointer or stack pointer or argument
pointer. This register can be defined to point to the return address on the stack, and
then be converted by ELIMINABLE_REGS into either the frame pointer or stack pointer.
Do not define this macro unless there is no other way to get the return address from
the stack.
STATIC_CHAIN_REGNUM [Macro]
STATIC_CHAIN_INCOMING_REGNUM [Macro]
Register numbers used for passing a function’s static chain pointer. If register
windows are used, the register number as seen by the called function is
STATIC_CHAIN_INCOMING_REGNUM, while the register number as seen by the
calling function is STATIC_CHAIN_REGNUM. If these registers are the same,
STATIC_CHAIN_INCOMING_REGNUM need not be defined.
The static chain register need not be a fixed register.
If the static chain is passed in memory, these macros should not be defined; instead,
the TARGET_STATIC_CHAIN hook should be used.
DWARF_FRAME_REGISTERS [Macro]
This macro specifies the maximum number of hard registers that can be saved in a
call frame. This is used to size data structures used in DWARF2 exception handling.
Prior to GCC 3.0, this macro was needed in order to establish a stable exception
handling ABI in the face of adding new hard registers for ISA extensions. In GCC
3.0 and later, the EH ABI is insulated from changes in the number of hard registers.
Nevertheless, this macro can still be used to reduce the runtime memory requirements
Chapter 18: Target Description Macros and Functions 575
of the exception handling routines, which can be substantial if the ISA contains a lot
of registers that are not call-saved.
If this macro is not defined, it defaults to FIRST_PSEUDO_REGISTER.
PRE_GCC3_DWARF_FRAME_REGISTERS [Macro]
This macro is similar to DWARF_FRAME_REGISTERS, but is provided for backward com-
patibility in pre GCC 3.0 compiled code.
If this macro is not defined, it defaults to DWARF_FRAME_REGISTERS.
REG_VALUE_IN_UNWIND_CONTEXT [Macro]
Define this macro if the target stores register values as _Unwind_Word type in unwind
context. It should be defined if target register size is larger than the size of void *.
The default is to store register values as void * type.
ASSUME_EXTENDED_UNWIND_CONTEXT [Macro]
Define this macro to be 1 if the target always uses extended unwind context with
version, args size and by value fields. If it is undefined, it will be defined to 1 when
REG_VALUE_IN_UNWIND_CONTEXT is defined and 0 otherwise.
This target hook can in principle examine the current function and decide according
to the facts, but on most machines the constant false or the constant true suffices.
Use false when the machine allows code to be generated with no frame pointer, and
doing so saves some time or space. Use true when there is no possible advantage to
avoiding a frame pointer.
In certain cases, the compiler does not know how to produce valid code without a
frame pointer. The compiler recognizes those cases and automatically gives the func-
tion a frame pointer regardless of what targetm.frame_pointer_required returns.
You don’t need to worry about them.
In a function that does not require a frame pointer, the frame pointer register can
be allocated for ordinary usage, unless you mark it as a fixed register. See FIXED_
REGISTERS for more information.
Default return value is false.
ELIMINABLE_REGS [Macro]
This macro specifies a table of register pairs used to eliminate unneeded registers that
point into the stack frame.
The definition of this macro is a list of structure initializations, each of which specifies
an original and replacement register.
On some machines, the position of the argument pointer is not known until the
compilation is completed. In such a case, a separate hard register must be used for
the argument pointer. This register can be eliminated by replacing it with either
the frame pointer or the argument pointer, depending on whether or not the frame
pointer has been eliminated.
In this case, you might specify:
#define ELIMINABLE_REGS \
{{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
{ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
{FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}
Note that the elimination of the argument pointer with the stack pointer is specified
first since that is the preferred elimination.
PUSH_ARGS_REVERSED [Macro]
A C expression. If nonzero, function arguments will be evaluated from last to first,
rather than from first to last. If this macro is not defined, it defaults to PUSH_ARGS
on targets where the stack and args grow in opposite directions, and 0 otherwise.
ACCUMULATE_OUTGOING_ARGS [Macro]
A C expression. If nonzero, the maximum amount of space required for outgoing
arguments will be computed and placed into crtl->outgoing_args_size. No space
will be pushed onto the stack for each call; instead, the function prologue should
increase the stack frame size by this amount.
Setting both PUSH_ARGS and ACCUMULATE_OUTGOING_ARGS is not proper.
578 GNU Compiler Collection (GCC) Internals
STACK_PARMS_IN_REG_PARM_AREA [Macro]
Define this macro if REG_PARM_STACK_SPACE is defined, but the stack parameters
don’t skip the area specified by it.
Normally, when a parameter is not passed in registers, it is placed on the stack beyond
the REG_PARM_STACK_SPACE area. Defining this macro suppresses this behavior and
causes the parameter to be passed on the stack in its natural location.
size is the number of bytes of arguments passed on the stack. If a variable number of
bytes is passed, it is zero, and argument popping will always be the responsibility of
the calling function.
On the VAX, all functions always pop their arguments, so the definition of this macro
is size. On the 68000, using the standard calling convention, no functions pop their
arguments, so the value of the macro is always 0 in this case. But an alternative calling
convention is available in which functions that take a fixed number of arguments pop
them but other functions (such as printf) pop nothing (the caller pops all). When
this convention is in use, funtype is examined to determine whether a function takes
a fixed number of arguments.
TARGET_FUNCTION_ARG for these arguments should return the first register to be used
by the caller for this argument; likewise TARGET_FUNCTION_INCOMING_ARG, for the
called function.
bool TARGET_PASS_BY_REFERENCE (cumulative_args_t cum, [Target Hook]
const function_arg_info &arg)
This target hook should return true if argument arg at the position indicated by
cum should be passed by reference. This predicate is queried after target independent
reasons for being passed by reference, such as TREE_ADDRESSABLE (arg.type).
If the hook returns true, a copy of that argument is made in memory and a pointer
to the argument is passed instead of the argument itself. The pointer is passed in
whatever way is appropriate for passing a pointer to that type.
bool TARGET_CALLEE_COPIES (cumulative_args_t cum, const [Target Hook]
function_arg_info &arg)
The function argument described by the parameters to this hook is known to be
passed by reference. The hook should return true if the function argument should be
copied by the callee instead of copied by the caller.
For any argument for which the hook returns true, if it can be determined that the
argument is not modified, then a copy need not be generated.
The default version of this hook always returns false.
CUMULATIVE_ARGS [Macro]
A C type for declaring a variable that is used as the first argument of TARGET_
FUNCTION_ARG and other related values. For some target machines, the type int
suffices and can hold the number of bytes of argument so far.
There is no need to record in CUMULATIVE_ARGS anything about the arguments that
have been passed on the stack. The compiler has other variables to keep track of that.
For target machines on which all arguments are passed on the stack, there is no need
to store anything in CUMULATIVE_ARGS; however, the data structure must exist and
should not be empty, so use int.
OVERRIDE_ABI_FORMAT (fndecl) [Macro]
If defined, this macro is called before generating any code for a function, but after the
cfun descriptor for the function has been created. The back end may use this macro
to update cfun to reflect an ABI other than that which would normally be used by
default. If the compiler is generating code for a compiler-generated function, fndecl
may be NULL.
INIT_CUMULATIVE_ARGS (cum, fntype, libname, fndecl, [Macro]
n_named_args)
A C statement (sans semicolon) for initializing the variable cum for the state at the
beginning of the argument list. The variable has type CUMULATIVE_ARGS. The value
of fntype is the tree node for the data type of the function which will receive the args,
or 0 if the args are to a compiler support library function. For direct calls that are not
libcalls, fndecl contain the declaration node of the function. fndecl is also set when
INIT_CUMULATIVE_ARGS is used to find arguments for the function being compiled.
n named args is set to the number of named arguments, including a structure return
582 GNU Compiler Collection (GCC) Internals
This hook has a default definition that is right for most systems. For little-endian
machines, the default is to pad upward. For big-endian machines, the default is to
pad downward for an argument of constant size shorter than an int, and upward
otherwise.
PAD_VARARGS_DOWN [Macro]
If defined, a C expression which determines whether the default implementation of
va arg will attempt to pad down before reading the next argument, if that argument
is smaller than its aligned space as controlled by PARM_BOUNDARY. If this macro is not
defined, all such arguments are padded down if BYTES_BIG_ENDIAN is true.
Passes before reload do not know which hard registers will be used in an instruction,
but the machine modes of the registers set or used in the instruction are already
known. And for some machines, register classes are small for, say, integer registers but
not for floating point registers. For example, the AMD x86-64 architecture requires
specific registers for the legacy x86 integer instructions, but there are many SSE
registers for floating point operations. On such targets, a good strategy may be to
return nonzero from this hook for INTEGRAL_MODE_P machine modes but zero for the
SSE register classes.
The default version of this hook returns false for any mode. It is always safe to
redefine this hook to return with a nonzero value. But if you unnecessarily define it,
you will reduce the amount of optimizations that can be performed in some cases. If
you do not define this hook to return a nonzero value when it is required, the compiler
will run out of spill registers and print a fatal error message.
DEFAULT_PCC_STRUCT_RETURN [Macro]
Define this macro to be 1 if all structure and union return values must be in memory.
Since this results in slower code, this should be defined only if needed for compatibility
with other compilers or with an ABI. If you define this macro to be 0, then the
conventions used for structure and union return values are decided by the TARGET_
RETURN_IN_MEMORY target hook.
If not defined, this defaults to the value 1.
fndecl may be NULL, for libcalls. You do not need to define this target hook if the
address is always passed as an “invisible” first argument.
On some architectures the place where the structure value address is found by the
called function is not the same place that the caller put it. This can be due to register
windows, or it could be because the function prologue moves it to a different place.
incoming is 1 or 2 when the location is needed in the context of the called function,
and 0 in the context of the caller.
If incoming is nonzero and the address is to be found on the stack, return a mem which
refers to the frame pointer. If incoming is 2, the result is being used to fetch the
structure value address at the beginning of a function. If you need to emit adjusting
code, you should do it at this point.
PCC_STATIC_STRUCT_RETURN [Macro]
Define this macro if the usual system convention on the target machine for returning
structures and unions is for the called function to return the address of a static variable
containing the value.
Do not define this if the usual system convention is for the caller to pass an address
to the subroutine.
This macro has effect in -fpcc-struct-return mode, but it does nothing when you
use -freg-struct-return mode.
fixed_size_mode TARGET_GET_RAW_RESULT_MODE (int regno) [Target Hook]
This target hook returns the mode to be used when accessing raw return registers in
__builtin_return. Define this macro if the value in reg raw mode is not correct.
Use VOIDmode if a register should be ignored for __builtin_return purposes.
fixed_size_mode TARGET_GET_RAW_ARG_MODE (int regno) [Target Hook]
This target hook returns the mode to be used when accessing raw argument registers
in __builtin_apply_args. Define this macro if the value in reg raw mode is not
correct. Use VOIDmode if a register should be ignored for __builtin_apply_args
purposes.
bool TARGET_EMPTY_RECORD_P (const_tree type) [Target Hook]
This target hook returns true if the type is an empty record. The default is to return
false.
void TARGET_WARN_PARAMETER_PASSING_ABI [Target Hook]
(cumulative_args_t ca, tree type)
This target hook warns about the change in empty class parameter passing ABI.
some extra assembler that needs to be emitted. See [prologue instruction pattern],
page 463.
void TARGET_ASM_FUNCTION_BEGIN_EPILOGUE (FILE *file) [Target Hook]
If defined, a function that outputs assembler code at the start of an epilogue. This
should be used when the function epilogue is being emitted as RTL, and you have
some extra assembler that needs to be emitted. See [epilogue instruction pattern],
page 463.
void TARGET_ASM_FUNCTION_EPILOGUE (FILE *file) [Target Hook]
If defined, a function that outputs the assembler code for exit from a function. The
epilogue is responsible for restoring the saved registers and stack pointer to their
values when the function was called, and returning control to the caller. This macro
takes the same argument as the macro TARGET_ASM_FUNCTION_PROLOGUE, and the
registers to restore are determined from regs_ever_live and CALL_USED_REGISTERS
in the same way.
On some machines, there is a single instruction that does all the work of returning
from the function. On these machines, give that instruction the name ‘return’ and
do not define the macro TARGET_ASM_FUNCTION_EPILOGUE at all.
Do not define a pattern named ‘return’ if you want the TARGET_ASM_FUNCTION_
EPILOGUE to be used. If you want the target switches to control whether return
instructions or epilogues are used, define a ‘return’ pattern with a validity condi-
tion that tests the target switches appropriately. If the ‘return’ pattern’s validity
condition is false, epilogues will be used.
On machines where functions may or may not have frame-pointers, the function exit
code must vary accordingly. Sometimes the code for these two cases is completely
different. To determine whether a frame pointer is wanted, the macro can refer to
the variable frame_pointer_needed. The variable’s value will be 1 when compiling
a function that needs a frame pointer.
Normally, TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE
must treat leaf functions specially. The C variable current_function_is_leaf is
nonzero for such a function. See Section 18.7.4 [Leaf Functions], page 551.
On some machines, some functions pop their arguments on exit while others leave
that for the caller to do. For example, the 68020 when given -mrtd pops arguments
in functions that take a fixed number of arguments.
Your definition of the macro RETURN_POPS_ARGS decides which functions pop their
own arguments. TARGET_ASM_FUNCTION_EPILOGUE needs to know what was decided.
The number of bytes of the current function’s arguments that this function should pop
is available in crtl->args.pops_args. See Section 18.9.8 [Scalar Return], page 587.
• A region of crtl->args.pretend_args_size bytes of uninitialized space just under-
neath the first argument arriving on the stack. (This may not be at the very start of
the allocated stack region if the calling sequence has pushed anything else since push-
ing the stack arguments. But usually, on such machines, nothing else has been pushed
yet, because the function prologue itself does all the pushing.) This region is used on
machines where an argument may be passed partly in registers and partly in memory,
and, in some cases to support the features in <stdarg.h>.
Chapter 18: Target Description Macros and Functions 593
• An area of memory used to save certain registers used by the function. The size of this
area, which may also include space for such things as the return address and pointers
to previous stack frames, is machine-specific and usually depends on which registers
have been used in the function. Machines with register windows often do not require a
save area.
• A region of at least size bytes, possibly rounded up to an allocation boundary, to
contain the local variables of the function. On some machines, this region and the save
area may occur in the opposite order, with the save area closer to the top of the stack.
• Optionally, when ACCUMULATE_OUTGOING_ARGS is defined, a region of crtl->outgoing_
args_size bytes to be used for outgoing argument lists of the function. See Sec-
tion 18.9.6 [Stack Arguments], page 577.
EXIT_IGNORE_STACK [Macro]
Define this macro as a C expression that is nonzero if the return instruction or the
function epilogue ignores the value of the stack pointer; in other words, if it is safe
to delete an instruction to adjust the stack pointer before a return from the function.
The default is 0.
Note that this macro’s value is relevant only for functions for which frame pointers
are maintained. It is never safe to delete a final stack adjustment in a function that
has no frame pointer, and the compiler knows this regardless of EXIT_IGNORE_STACK.
After the additions, emit code to jump to function, which is a FUNCTION_DECL. This is
a direct pure jump, not a call, and does not touch the return address. Hence returning
from FUNCTION will return to whoever called the current ‘thunk’.
The effect must be as if function had been called directly with the adjusted first ar-
gument. This macro is responsible for emitting all of the code for a thunk function;
TARGET_ASM_FUNCTION_PROLOGUE and TARGET_ASM_FUNCTION_EPILOGUE are not in-
voked.
The thunk fndecl is redundant. (delta and function have already been extracted from
it.) It might possibly be useful on some targets, but probably not.
If you do not define this macro, the target-independent code in the C++ front end will
generate a less efficient heavyweight thunk that calls function instead of jumping to
it. The generic approach does not support varargs.
bool TARGET_ASM_CAN_OUTPUT_MI_THUNK (const_tree [Target Hook]
thunk_fndecl, HOST_WIDE_INT delta, HOST_WIDE_INT
vcall_offset, const_tree function)
A function that returns true if TARGET ASM OUTPUT MI THUNK would be able
to output the assembler code for the thunk function specified by the arguments it is
passed, and false otherwise. In the latter case, the generic approach will be used by
the C++ front end, with the limitations previously exposed.
What exactly those components are is up to the target code; the generic code treats them
abstractly, as a bit in an sbitmap. These sbitmaps are allocated by the shrink_wrap.get_
separate_components and shrink_wrap.components_for_bb hooks, and deallocated by
the generic code.
However, va_start should not use this argument. The way to find the end of the named
arguments is with the built-in functions described below.
__builtin_saveregs () [Macro]
Use this built-in function to save the argument registers in memory so that the varargs
mechanism can access them. Both ISO and traditional versions of va_start must use
__builtin_saveregs, unless you use TARGET_SETUP_INCOMING_VARARGS (see below)
instead.
On some machines, __builtin_saveregs is open-coded under the control of the tar-
get hook TARGET_EXPAND_BUILTIN_SAVEREGS. On other machines, it calls a routine
written in assembler language, found in libgcc2.c.
Code generated for the call to __builtin_saveregs appears at the beginning of the
function, as opposed to where the call to __builtin_saveregs is written, regardless
of what the code is. This is because the registers must be saved before the function
starts to use them for its own purposes.
arguments into the stack so that all the arguments appear to have been passed con-
secutively on the stack. Once this is done, you can use the standard implementation
of varargs that works for machines that pass all their arguments on the stack.
The argument args so far points to the CUMULATIVE_ARGS data structure, containing
the values that are obtained after processing the named arguments. The argument
arg describes the last of these named arguments. The argument arg should not be
used if the function type satisfies TYPE_NO_NAMED_ARGS_STDARG_P, since in that case
there are no named arguments and all arguments are accessed with va_arg.
The target hook should do two things: first, push onto the stack all the argument
registers not used for the named arguments, and second, store the size of the data
thus pushed into the int-valued variable pointed to by pretend args size. The value
that you store here will serve as additional offset for setting up the stack frame.
Because you must generate code to push the anonymous arguments at compile time
without knowing their data types, TARGET_SETUP_INCOMING_VARARGS is only useful
on machines that have just a single category of argument register and use it uniformly
for all data types.
If the argument second time is nonzero, it means that the arguments of the function
are being analyzed for the second time. This happens for an inline function, which
is not actually compiled until the end of the source file. The hook TARGET_SETUP_
INCOMING_VARARGS should not generate any instructions in this case.
bool TARGET_STRICT_ARGUMENT_NAMING (cumulative_args_t [Target Hook]
ca)
Define this hook to return true if the location where a function argument is passed
depends on whether or not it is a named argument.
This hook controls how the named argument to TARGET_FUNCTION_ARG is set for
varargs and stdarg functions. If this hook returns true, the named argument is always
true for named arguments, and false for unnamed arguments. If it returns false,
but TARGET_PRETEND_OUTGOING_VARARGS_NAMED returns true, then all arguments
are treated as named. Otherwise, all named arguments except the last are treated as
named.
You need not define this hook if it always returns false.
void TARGET_START_CALL_ARGS (cumulative_args_t [Target Hook]
complete_args)
This target hook is invoked while generating RTL for a function call, after the ar-
gument values have been computed, and after stack arguments have been initialized,
but before register arguments have been moved into their ABI-defined hard register
locations. It precedes calls to the related hooks TARGET_CALL_ARGS and TARGET_END_
CALL_ARGS. The significance of this position in the call expansion is that:
• No argument registers are live.
• Although a call sequence can in general involve subcalls (such as using memcpy to
copy large arguments), no such subcall will occur between the call to this hook
and the generation of the main call instruction.
The single argument complete args is the state of the target function’s cumulative
argument information after the final call to TARGET_FUNCTION_ARG.
600 GNU Compiler Collection (GCC) Internals
The hook can be used for things like switching processor mode, in cases where different
calls need different processor modes. Most ports do not need to implement anything
for this hook.
Under this model, taking the address of a nested function results in a pointer to a non-
executable function descriptor object. Initializing the static chain from the descriptor is
handled at indirect call sites.
On some targets, including HPPA and IA-64, function descriptors may be mandated
by the ABI or be otherwise handled in a target-specific way by the back end in its code
generation strategy for indirect calls. GCC also provides its own generic descriptor im-
plementation to support the -fno-trampolines option. In this case runtime detection of
function descriptors at indirect call sites relies on descriptor pointers being tagged with a
bit that is never set in bare function addresses. Since GCC’s generic function descriptors
are not ABI-compliant, this option is typically used only on a per-language basis (notably
by Ada) or when it can otherwise be applied to the whole program.
For languages other than Ada, the -ftrampolines and -fno-trampolines options cur-
rently have no effect, and trampolines are always generated on platforms that need them
for nested functions.
Define the following hook if your backend either implements ABI-specified descriptor
support, or can use GCC’s generic descriptor implementation for nested functions.
The following macros tell GCC how to generate code to allocate and initialize an exe-
cutable trampoline. You can also use this interface if your back end needs to create ABI-
specified non-executable descriptors; in this case the "trampoline" created is the descriptor
containing data only.
The instructions in an executable trampoline must do two things: load a constant address
into the static chain register, and jump to the real address of the nested function. On CISC
machines such as the m68k, this requires two instructions, a move immediate and a jump.
Then the two addresses exist in the trampoline as word-long immediate operands. On RISC
machines, it is often necessary to load each address into a register in two parts. Then pieces
of each address form separate immediate operands.
The code generated to initialize the trampoline must store the variable parts—the static
chain value and the function address—into the immediate operands of the instructions. On
a CISC machine, this is simply a matter of copying each address to a memory reference at
the proper offset from the start of the trampoline. On a RISC machine, it may be necessary
to take out pieces of the address and store them separately.
602 GNU Compiler Collection (GCC) Internals
be different from the address at which the template was stored, the different address
should be returned; otherwise addr should be returned unchanged. If this hook is not
defined, addr will be used for function calls.
Implementing trampolines is difficult on many machines because they have separate in-
struction and data caches. Writing into a stack location fails to clear the memory in the
instruction cache, so when the program jumps to that location, it executes the old contents.
Here are two possible solutions. One is to clear the relevant parts of the instruction cache
whenever a trampoline is set up. The other is to make all trampolines identical, by having
them jump to a standard subroutine. The former technique makes trampoline execution
faster; the latter makes initialization faster.
To clear the instruction cache when a trampoline is initialized, define the following macro.
To use a standard subroutine, define the following macro. In addition, you must make
sure that the instructions in a trampoline fill an entire cache line with identical instructions,
or else ensure that the beginning of the trampoline code is always aligned at the same point
in its cache line. Look in m68k.h as a guide.
TRANSFER_FROM_TRAMPOLINE [Macro]
Define this macro if trampolines need a special subroutine to do their work. The
macro should expand to a series of asm statements which will be compiled with GCC.
They go in a library function named __transfer_from_trampoline.
If you need to avoid executing the ordinary prologue code of a compiled C function
when you jump to the subroutine, you can do so by placing a special label of your
own in the assembler code. Use one asm statement to generate an assembler label,
and another to make the label global. Then trampolines can use that label to jump
directly to your special assembler code.
DECLARE_LIBRARY_RENAMES [Macro]
This macro, if defined, should expand to a piece of C code that will get expanded
when compiling functions for libgcc.a. It can be used to provide alternate names for
GCC’s internal library functions if there are ABI-mandated names that the compiler
should provide.
TARGET_LIB_INT_CMP_BIASED [Macro]
This macro should evaluate to true if the integer comparison functions (like __
cmpdi2) return 0 to indicate that the first operand is smaller than the second, 1
to indicate that they are equal, and 2 to indicate that the first operand is greater
than the second. If this macro evaluates to false the comparison functions return
−1, 0, and 1 instead of 0, 1, and 2. If the target uses the routines in libgcc.a, you
do not need to define this macro.
TARGET_HAS_NO_HW_DIVIDE [Macro]
This macro should be defined if the target has no hardware divide instructions. If
this macro is defined, GCC will use an algorithm which make use of simple logical
and arithmetic operations for 64-bit division. If the macro is not defined, GCC will
use an algorithm which make use of a 64-bit by 32-bit divide primitive.
TARGET_EDOM [Macro]
The value of EDOM on the target machine, as a C integer constant expression. If you
don’t define this macro, GCC does not attempt to deposit the value of EDOM into
errno directly. Look in /usr/include/errno.h to find the value of EDOM on your
system.
If you do not define TARGET_EDOM, then compiled code reports domain errors by
calling the library function and letting it report the error. If mathematical functions
on your system use matherr when there is an error, then you should leave TARGET_
EDOM undefined so that matherr is used normally.
GEN_ERRNO_RTX [Macro]
Define this macro as a C expression to create an rtl expression that refers to the
global “variable” errno. (On certain systems, errno may not actually be a variable.)
If you don’t define this macro, a reasonable default is used.
HAVE_PRE_MODIFY_REG [Macro]
HAVE_POST_MODIFY_REG [Macro]
A C expression that is nonzero if the machine supports pre- or post-address side-effect
generation involving a register displacement.
MAX_REGS_PER_ADDRESS [Macro]
A number, the maximum number of registers that can appear in a valid memory
address. Note that it is up to you to specify a value equal to the maximum number
that TARGET_LEGITIMATE_ADDRESS_P would ever accept.
you must reject such naked constant sums as illegitimate addresses, so that none of
them will be given to PRINT_OPERAND_ADDRESS.
On some machines, whether a symbolic address is legitimate depends on the section
that the address refers to. On these machines, define the target hook TARGET_ENCODE_
SECTION_INFO to store the information into the symbol_ref, and then check for it
here. When you see a const, you will have to look inside it to find the symbol_ref
in order to determine the section. See Section 18.20 [Assembler Format], page 640.
Some ports are still using a deprecated legacy substitute for this hook, the GO_IF_
LEGITIMATE_ADDRESS macro. This macro has this syntax:
#define GO_IF_LEGITIMATE_ADDRESS (mode, x, label)
and should goto label if the address x is a valid address on the target machine for
a memory operand of mode mode.
Compiler source files that want to use the strict variant of this macro define the macro
REG_OK_STRICT. You should use an #ifdef REG_OK_STRICT conditional to define the
strict variant in that case and the non-strict variant otherwise.
Using the hook is usually simpler because it limits the number of files that are re-
compiled when changes are made.
TARGET_MEM_CONSTRAINT [Macro]
A single character to be used instead of the default 'm' character for general memory
addresses. This defines the constraint letter which matches the memory addresses
accepted by TARGET_LEGITIMATE_ADDRESS_P. Define this macro if you want to sup-
port new address formats in your back end without changing the semantics of the
'm' constraint. This is necessary in order to preserve functionality of inline assembly
constructs using the 'm' constraint.
compiler has standard ways of doing so in all cases. In fact, if the target supports
only emulated TLS, it is safe to omit this hook or make it return x if it cannot find
a valid way to legitimize the address. But often a machine-dependent strategy can
generate better code.
LEGITIMIZE_RELOAD_ADDRESS (x, mode, opnum, type, ind_levels, win) [Macro]
A C compound statement that attempts to replace x, which is an address that needs
reloading, with a valid memory address for an operand of mode mode. win will be a
C statement label elsewhere in the code. It is not necessary to define this macro, but
it might be useful for performance reasons.
For example, on the i386, it is sometimes possible to use a single reload register instead
of two by reloading a sum of two pseudo registers into a register. On the other hand,
for number of RISC processors offsets are limited so that often an intermediate address
needs to be generated in order to address a stack slot. By defining LEGITIMIZE_
RELOAD_ADDRESS appropriately, the intermediate addresses generated for adjacent
some stack slots can be made identical, and thus be shared.
Note: This macro should be used with caution. It is necessary to know something
of how reload works in order to effectively use this, and it is quite easy to produce
macros that build in too much knowledge of reload internals.
Note: This macro must be able to reload an address created by a previous invocation
of this macro. If it fails to handle such addresses then the compiler may generate
incorrect code or abort.
The macro definition should use push_reload to indicate parts that need reloading;
opnum, type and ind levels are usually suitable to be passed unaltered to push_
reload.
The code generated by this macro must not alter the substructure of x. If it transforms
x into a more legitimate form, it should assign x (which will always be a C variable)
a new value. This also applies to parts that you change indirectly by calling push_
reload.
The macro definition may use strict_memory_address_p to test if the address has
become legitimate.
If you want to change only a part of x, one standard way of doing this is to use
copy_rtx. Note, however, that it unshares only a single level of rtl. Thus, if the
part to be changed is not at the top level, you’ll need to replace first the top level.
It is not necessary for this macro to come up with a legitimate address; but often a
machine-dependent strategy can generate better code.
bool TARGET_MODE_DEPENDENT_ADDRESS_P (const_rtx addr, [Target Hook]
addr_space_t addrspace)
This hook returns true if memory address addr in address space addrspace can have
different meanings depending on the machine mode of the memory reference it is used
for or if the address is valid for some modes but not others.
Autoincrement and autodecrement addresses typically have mode-dependent effects
because the amount of the increment or decrement is the size of the operand be-
ing addressed. Some machines have other mode-dependent addresses. Many RISC
machines have no mode-dependent addresses.
Chapter 18: Target Description Macros and Functions 609
You may assume that addr is a valid address for the machine.
The default version of this hook returns false.
choice if the target has a fixed vector size. Another option is to choose a vector mode
with the same number of elements as vector mode; this is the natural choice if the
target has a fixed number of elements. Alternatively, the hook might choose a middle
ground, such as trying to keep the number of elements as similar as possible while
applying maximum and minimum vector sizes.
The default implementation uses mode_for_vector to find the requested mode, re-
turning a mode with the same size as vector mode when nunits is zero. This is the
correct behavior for most targets.
The default version is correct for most targets, but you might need to intercept this
hook to handle things like target-specific attributes or target-specific sections.
(mode) is nonzero. Define this macro in case machine has some non-standard way
how to reverse certain conditionals. For instance in case all floating point conditions
are non-trapping, compiler may freely convert unordered compares to ordered ones.
Then definition may look like:
#define REVERSE_CONDITION(CODE, MODE) \
((MODE) != CCFPmode ? reverse_condition (CODE) \
: reverse_condition_maybe_unordered (CODE))
2 will allow reload to verify that the constraints are met. You should do this if the
‘movm’ pattern’s constraints do not allow such copying.
These macros are obsolete, new ports should use the target hook TARGET_REGISTER_
MOVE_COST instead.
int TARGET_REGISTER_MOVE_COST (machine_mode mode, [Target Hook]
reg_class_t from, reg_class_t to)
This target hook should return the cost of moving data of mode mode from a register
in class from to one in class to. The classes are expressed using the enumeration
values such as GENERAL_REGS. A value of 2 is the default; other values are interpreted
relative to that.
It is not required that the cost always equal 2 when from is the same as to; on some
machines it is expensive to move between registers if they are not general registers.
If reload sees an insn consisting of a single set between two hard registers, and if
TARGET_REGISTER_MOVE_COST applied to their classes returns a value of 2, reload
does not check to ensure that the constraints of the insn are met. Setting a cost of
other than 2 will allow reload to verify that the constraints are met. You should do
this if the ‘movm’ pattern’s constraints do not allow such copying.
The default version of this function returns 2.
MEMORY_MOVE_COST (mode, class, in) [Macro]
A C expression for the cost of moving data of mode mode between a register of class
class and memory; in is zero if the value is to be written to memory, nonzero if it is to
be read in. This cost is relative to those in REGISTER_MOVE_COST. If moving between
registers and memory is more expensive than between two registers, you should define
this macro to express the relative cost.
If you do not define this macro, GCC uses a default cost of 4 plus the cost of copying
via a secondary reload register, if one is needed. If your machine requires a secondary
reload register to copy between memory and a register of class but the reload mech-
anism is more complex than copying via an intermediate, define this macro to reflect
the actual cost of the move.
GCC defines the function memory_move_secondary_cost if secondary reloads are
needed. It computes the costs due to copying via a secondary register. If your
machine copies from memory using a secondary register in the conventional way but
the default base value of 4 is not correct for your machine, define this macro to add
some other value to the result of that function. The arguments to that function are
the same as to this macro.
These macros are obsolete, new ports should use the target hook TARGET_MEMORY_
MOVE_COST instead.
int TARGET_MEMORY_MOVE_COST (machine_mode mode, [Target Hook]
reg_class_t rclass, bool in)
This target hook should return the cost of moving data of mode mode between a
register of class rclass and memory; in is false if the value is to be written to memory,
true if it is to be read in. This cost is relative to those in TARGET_REGISTER_MOVE_
COST. If moving between registers and memory is more expensive than between two
registers, you should add this target hook to express the relative cost.
Chapter 18: Target Description Macros and Functions 621
If you do not add this target hook, GCC uses a default cost of 4 plus the cost of
copying via a secondary reload register, if one is needed. If your machine requires a
secondary reload register to copy between memory and a register of rclass but the
reload mechanism is more complex than copying via an intermediate, use this target
hook to reflect the actual cost of the move.
GCC defines the function memory_move_secondary_cost if secondary reloads are
needed. It computes the costs due to copying via a secondary register. If your
machine copies from memory using a secondary register in the conventional way but
the default base value of 4 is not correct for your machine, use this target hook to
add some other value to the result of that function. The arguments to that function
are the same as to this target hook.
Here are additional macros which do not specify precise relative costs, but only that
certain actions are more expensive than GCC would ordinarily expect.
SLOW_BYTE_ACCESS [Macro]
Define this macro as a C expression which is nonzero if accessing less than a word of
memory (i.e. a char or a short) is no faster than accessing a word of memory, i.e.,
if such access require more than one instruction or if there is no difference in cost
between byte and (aligned) word loads.
When this macro is not defined, the compiler will access a field by finding the smallest
containing object; when it is defined, a fullword load will be used if alignment permits.
Unless bytes accesses are faster than word accesses, using word accesses is preferable
since it may eliminate subsequent memory access if subsequent accesses occur to other
fields in the same word of the structure, but to different bytes.
to override the default choice. It should return the factor by which branches should
be reduced over the plain expansion with one comparison per mode-sized piece. A
port can also prevent a particular mode from being used for block comparisons by
returning a negative number from this hook.
MOVE_MAX_PIECES [Macro]
A C expression used by move_by_pieces to determine the largest unit a load or store
used to copy memory is. Defaults to MOVE_MAX.
STORE_MAX_PIECES [Macro]
A C expression used by store_by_pieces to determine the largest unit a store used
to memory is. Defaults to MOVE_MAX_PIECES, or two times the size of HOST_WIDE_INT,
whichever is smaller.
COMPARE_MAX_PIECES [Macro]
A C expression used by compare_by_pieces to determine the largest unit a load or
store used to compare memory is. Defaults to MOVE_MAX_PIECES.
In implementing this hook, you can use the construct COSTS_N_INSNS (n) to specify
a cost equal to n fast instructions.
On entry to the hook, *total contains a default estimate for the cost of the expression.
The hook should modify this value as necessary. Traditionally, the default costs are
COSTS_N_INSNS (5) for multiplications, COSTS_N_INSNS (7) for division and modulus
operations, and COSTS_N_INSNS (1) for all other operations.
When optimizing for code size, i.e. when speed is false, this target hook should be used
to estimate the relative size cost of an expression, again relative to COSTS_N_INSNS.
The hook returns true when all subexpressions of x have been processed, and false
when rtx_cost should recurse.
reads the ready list in reverse order, starting with ready[*n readyp − 1] and going to
ready[0]. clock is the timer tick of the scheduler. You may modify the ready list and
the number of ready insns. The return value is the number of insns that can issue
this cycle; normally this is just issue_rate. See also ‘TARGET_SCHED_REORDER2’.
ready insns to choose an insn whose issue will result in maximal number of issued
insns on the same cycle. For the VLIW processor, the code could actually solve the
problem of packing simple insns into the VLIW insn. Of course, if the rules of VLIW
packing are described in the automaton.
This code also could be used for superscalar RISC processors. Let us consider a
superscalar RISC processor with 3 pipelines. Some insns can be executed in pipelines
A or B, some insns can be executed only in pipelines B or C, and one insn can be
executed in pipeline B. The processor may issue the 1st insn into A and the 2nd one
into B. In this case, the 3rd insn will wait for freeing B until the next cycle. If the
scheduler issues the 3rd insn the first, the processor could issue all 3 insns per cycle.
Actually this code demonstrates advantages of the automaton based pipeline hazard
recognizer. We try quickly and easy many insn schedules to choose the best one.
The default is no multipass scheduling.
All the other varasm.cc sections are optional, and are null if the target does not provide
them.
TEXT_SECTION_ASM_OP [Macro]
A C expression whose value is a string, including spacing, containing the assembler
operation that should precede instructions and read-only data. Normally "\t.text"
is right.
HOT_TEXT_SECTION_NAME [Macro]
If defined, a C string constant for the name of the section containing most frequently
executed functions of the program. If not defined, GCC will provide a default defini-
tion if the target supports named sections.
UNLIKELY_EXECUTED_TEXT_SECTION_NAME [Macro]
If defined, a C string constant for the name of the section containing unlikely executed
functions in the program.
DATA_SECTION_ASM_OP [Macro]
A C expression whose value is a string, including spacing, containing the assem-
bler operation to identify the following data as writable initialized data. Normally
"\t.data" is right.
SDATA_SECTION_ASM_OP [Macro]
If defined, a C expression whose value is a string, including spacing, containing the
assembler operation to identify the following data as initialized, writable small data.
READONLY_DATA_SECTION_ASM_OP [Macro]
A C expression whose value is a string, including spacing, containing the assembler
operation to identify the following data as read-only initialized data.
BSS_SECTION_ASM_OP [Macro]
If defined, a C expression whose value is a string, including spacing, containing the
assembler operation to identify the following data as uninitialized global data. If not
defined, and ASM_OUTPUT_ALIGNED_BSS not defined, uninitialized global data will be
output in the data section if -fno-common is passed, otherwise ASM_OUTPUT_COMMON
will be used.
SBSS_SECTION_ASM_OP [Macro]
If defined, a C expression whose value is a string, including spacing, containing the
assembler operation to identify the following data as uninitialized, writable small
data.
TLS_COMMON_ASM_OP [Macro]
If defined, a C expression whose value is a string containing the assembler operation
to identify the following data as thread-local common data. The default is ".tls_
common".
TLS_SECTION_ASM_FLAG [Macro]
If defined, a C expression whose value is a character constant containing the flag used
to mark a section as a TLS section. The default is 'T'.
636 GNU Compiler Collection (GCC) Internals
INIT_SECTION_ASM_OP [Macro]
If defined, a C expression whose value is a string, including spacing, containing the
assembler operation to identify the following data as initialization code. If not defined,
GCC will assume such a section does not exist. This section has no corresponding
init_section variable; it is used entirely in runtime code.
FINI_SECTION_ASM_OP [Macro]
If defined, a C expression whose value is a string, including spacing, containing the
assembler operation to identify the following data as finalization code. If not defined,
GCC will assume such a section does not exist. This section has no corresponding
fini_section variable; it is used entirely in runtime code.
INIT_ARRAY_SECTION_ASM_OP [Macro]
If defined, a C expression whose value is a string, including spacing, containing the
assembler operation to identify the following data as part of the .init_array (or
equivalent) section. If not defined, GCC will assume such a section does not exist.
Do not define both this macro and INIT_SECTION_ASM_OP.
FINI_ARRAY_SECTION_ASM_OP [Macro]
If defined, a C expression whose value is a string, including spacing, containing the
assembler operation to identify the following data as part of the .fini_array (or
equivalent) section. If not defined, GCC will assume such a section does not exist.
Do not define both this macro and FINI_SECTION_ASM_OP.
MACH_DEP_SECTION_ASM_FLAG [Macro]
If defined, a C expression whose value is a character constant containing the flag used
to mark a machine-dependent section. This corresponds to the SECTION_MACH_DEP
section flag.
TARGET_LIBGCC_SDATA_SECTION [Macro]
If defined, a string which names the section into which small variables defined in
crtstuff and libgcc should go. This is useful when the target has options for optimizing
access to small data, and you want the crtstuff and libgcc routines to be conservative
in what they expect of your application yet liberal in what your application expects.
For example, for targets with a .sdata section (like MIPS), you could compile crtstuff
with -G 0 so that it doesn’t require small data support from your application, but use
this macro to put small data into .sdata so that your application can access these
variables whether it uses small data or not.
Chapter 18: Target Description Macros and Functions 637
FORCE_CODE_SECTION_ALIGN [Macro]
If defined, an ASM statement that aligns a code section to some arbitrary boundary.
This is used to force all fragments of the .init and .fini sections to have to same
alignment and thus prevent the linker from having to add any padding.
JUMP_TABLES_IN_TEXT_SECTION [Macro]
Define this macro to be an expression with a nonzero value if jump tables (for
tablejump insns) should be output in the text section, along with the assembler
instructions. Otherwise, the readonly data section is used.
This macro is irrelevant if there is no separate readonly data section.
USE_SELECT_SECTION_FOR_FUNCTIONS [Macro]
Define this macro if you wish TARGET ASM SELECT SECTION to be called for
FUNCTION_DECLs as well as for variables and constants.
In the case of a FUNCTION_DECL, reloc will be zero if the function has been determined
to be likely to be called, and nonzero if it is unlikely to be called.
638 GNU Compiler Collection (GCC) Internals
The hook is executed immediately after rtl has been created for decl, which may be
a variable or function declaration or an entry in the constant pool. In either case, rtl
is the rtl in question. Do not use DECL_RTL (decl) in this hook; that field may not
have been initialized yet.
In the case of a constant, it is safe to assume that the rtl is a mem whose address is a
symbol_ref. Most decls will also have this form, but that is not guaranteed. Global
register variables, for instance, will have a reg for their rtl. (Normally the right thing
to do with such unusual rtl is leave it alone.)
The new decl p argument will be true if this is the first time that TARGET_ENCODE_
SECTION_INFO has been invoked on this decl. It will be false for subsequent invoca-
tions, which will happen for duplicate declarations. Whether or not anything must
be done for the duplicate declaration depends on whether the hook examines DECL_
ATTRIBUTES. new decl p is always true when the hook is called for a constant.
The usual thing for this hook to do is to record flags in the symbol_ref, using
SYMBOL_REF_FLAG or SYMBOL_REF_FLAGS. Historically, the name string was modified
if it was necessary to encode more than one bit of information, but this practice is
now discouraged; use SYMBOL_REF_FLAGS.
The default definition of this hook, default_encode_section_info in varasm.cc,
sets a number of commonly-useful bits in SYMBOL_REF_FLAGS. Check whether the
default does what you need before overriding it.
const char * TARGET_STRIP_NAME_ENCODING (const char [Target Hook]
*name)
Decode name and return the real name part, sans the characters that TARGET_ENCODE_
SECTION_INFO may have added.
bool TARGET_IN_SMALL_DATA_P (const_tree exp) [Target Hook]
Returns true if exp should be placed into a “small data” section. The default version
of this hook always returns false.
bool TARGET_HAVE_SRODATA_SECTION [Target Hook]
Contains the value true if the target places read-only “small data” into a separate
section. The default value is false.
bool TARGET_PROFILE_BEFORE_PROLOGUE (void) [Target Hook]
It returns true if target wants profile code emitted before prologue.
The default version of this hook use the target macro PROFILE_BEFORE_PROLOGUE.
bool TARGET_BINDS_LOCAL_P (const_tree exp) [Target Hook]
Returns true if exp names an object for which name resolution rules must resolve to
the current “module” (dynamic shared library or executable image).
The default version of this hook implements the name resolution rules for ELF, which
has a looser model of global name binding than other currently supported object file
formats.
bool TARGET_HAVE_TLS [Target Hook]
Contains the value true if the target supports thread-local storage. The default value
is false.
640 GNU Compiler Collection (GCC) Internals
PIC_OFFSET_TABLE_REGNUM [Macro]
The register number of the register used to address a table of static data addresses
in memory. In some cases this register is defined by a processor’s “application binary
interface” (ABI). When this macro is defined, RTL is generated for this register once,
as with the stack pointer and frame pointer registers. If this macro is not defined, it
is up to the machine-dependent files to allocate such a register (if necessary). Note
that this register must be fixed when in use (e.g. when flag_pic is true).
PIC_OFFSET_TABLE_REG_CALL_CLOBBERED [Macro]
A C expression that is nonzero if the register defined by PIC_OFFSET_TABLE_REGNUM
is clobbered by calls. If not defined, the default is zero. Do not define this macro if
PIC_OFFSET_TABLE_REGNUM is not defined.
stripping comments or extra whitespace from its input. This allows it to work a bit
faster.
The default is false. You should not set it to true unless you have verified that your
port does not generate any extra whitespace or comments that will cause GAS to
issue errors in NO APP mode.
ASM_COMMENT_START [Macro]
A C string constant describing how to begin a comment in the target assembler
language. The compiler assumes that the comment will end at the end of the line.
ASM_APP_ON [Macro]
A C string constant for text to be output before each asm statement or group of
consecutive ones. Normally this is "#APP", which is a comment that has no effect on
most assemblers but tells the GNU assembler that it must check the lines that follow
for all valid assembler constructs.
ASM_APP_OFF [Macro]
A C string constant for text to be output after each asm statement or group of con-
secutive ones. Normally this is "#NO_APP", which tells the GNU assembler to resume
making the time-saving assumptions that are valid for ordinary compiler output.
642 GNU Compiler Collection (GCC) Internals
CONSTANT_POOL_BEFORE_FUNCTION [Macro]
You may define this macro as a C expression. You should define the expression to
have a nonzero value if GCC should output the constant pool for a function before
the code for the function, or a zero value if GCC should output the constant pool
after the function. If you do not define this macro, the usual case, GCC will output
the constant pool before the function.
type of the function be required, you can obtain it via fundecl. size is the size, in
bytes, of the constant pool that GCC wrote immediately before this call.
If no constant-pool epilogue is required, the usual case, you need not define this macro.
IS_ASM_LOGICAL_LINE_SEPARATOR (C, STR) [Macro]
Define this macro as a C expression which is nonzero if C is used as a logical line
separator by the assembler. STR points to the position in the string where C was
found; this can be used if a line separator uses multiple characters.
If you do not define this macro, the default is that only the character ‘;’ is treated as
a logical line separator.
const char * TARGET_ASM_OPEN_PAREN [Target Hook]
const char * TARGET_ASM_CLOSE_PAREN [Target Hook]
These target hooks are C string constants, describing the syntax in the assembler for
grouping arithmetic expressions. If not overridden, they default to normal parenthe-
ses, which is correct for most assemblers.
These macros are provided by real.h for writing the definitions of ASM_OUTPUT_DOUBLE
and the like:
REAL_VALUE_TO_TARGET_SINGLE (x, l) [Macro]
REAL_VALUE_TO_TARGET_DOUBLE (x, l) [Macro]
REAL_VALUE_TO_TARGET_LONG_DOUBLE (x, l) [Macro]
REAL_VALUE_TO_TARGET_DECIMAL32 (x, l) [Macro]
REAL_VALUE_TO_TARGET_DECIMAL64 (x, l) [Macro]
REAL_VALUE_TO_TARGET_DECIMAL128 (x, l) [Macro]
These translate x, of type REAL_VALUE_TYPE, to the target’s floating point representa-
tion, and store its bit pattern in the variable l. For REAL_VALUE_TO_TARGET_SINGLE
and REAL_VALUE_TO_TARGET_DECIMAL32, this variable should be a simple long int.
For the others, it should be an array of long int. The number of elements in this
array is determined by the size of the desired target floating point data type: 32 bits
of it go in each long int array element. Each array element holds 32 bits of the
result, even if long int is wider than 32 bits on the host machine.
The array element values are designed so that you can print them out using fprintf
in the order they should appear in the target machine’s memory.
the concept of a zero-sized common symbol, as that is how they represent an ordinary
undefined external.
Use the expression assemble_name (stream, name) to output the name itself; before
and after that, output the additional assembler syntax for defining the name, and a
newline.
This macro controls how the assembler definitions of uninitialized common global
variables are output.
ASM_OUTPUT_ALIGNED_COMMON (stream, name, size, alignment) [Macro]
Like ASM_OUTPUT_COMMON except takes the required alignment as a separate, explicit
argument. If you define this macro, it is used in place of ASM_OUTPUT_COMMON, and
gives you more flexibility in handling the required alignment of the variable. The
alignment is specified as the number of bits.
ASM_OUTPUT_ALIGNED_DECL_COMMON (stream, decl, name, size, [Macro]
alignment)
Like ASM_OUTPUT_ALIGNED_COMMON except that decl of the variable to be output,
if there is one, or NULL_TREE if there is no corresponding variable. If you define
this macro, GCC will use it in place of both ASM_OUTPUT_COMMON and ASM_OUTPUT_
ALIGNED_COMMON. Define this macro when you need to see the variable’s decl in order
to chose what to output.
ASM_OUTPUT_ALIGNED_BSS (stream, decl, name, size, alignment) [Macro]
A C statement (sans semicolon) to output to the stdio stream stream the assembler
definition of uninitialized global decl named name whose size is size bytes. The
variable alignment is the alignment specified as the number of bits.
Try to use function asm_output_aligned_bss defined in file varasm.cc when defining
this macro. If unable, use the expression assemble_name (stream, name) to output
the name itself; before and after that, output the additional assembler syntax for
defining the name, and a newline.
There are two ways of handling global BSS. One is to define this macro. The other
is to have TARGET_ASM_SELECT_SECTION return a switchable BSS section (see [TAR-
GET HAVE SWITCHABLE BSS SECTIONS], page 643). You do not need to do
both.
Some languages do not have common data, and require a non-common form of global
BSS in order to handle uninitialized globals efficiently. C++ is one example of this.
However, if the target does not support global BSS, the front end may choose to make
globals common in order to save space in the object file.
ASM_OUTPUT_LOCAL (stream, name, size, rounded) [Macro]
A C statement (sans semicolon) to output to the stdio stream stream the assembler
definition of a local-common-label named name whose size is size bytes. The variable
rounded is the size rounded up to whatever alignment the caller wants.
Use the expression assemble_name (stream, name) to output the name itself; before
and after that, output the additional assembler syntax for defining the name, and a
newline.
This macro controls how the assembler definitions of uninitialized static variables are
output.
648 GNU Compiler Collection (GCC) Internals
SIZE_ASM_OP [Macro]
A C string containing the appropriate assembler directive to specify the size of
a symbol, without any arguments. On systems that use ELF, the default (in
config/elfos.h) is ‘"\t.size\t"’; on other systems, the default is not to define
this macro.
Define this macro only if it is correct to use the default definitions of ASM_OUTPUT_
SIZE_DIRECTIVE and ASM_OUTPUT_MEASURED_SIZE for your system. If you need your
own custom definitions of those macros, or if you do not need explicit symbol sizes at
all, do not define this macro.
Chapter 18: Target Description Macros and Functions 649
but only used if no other definition is available. Use the expression assemble_name
(stream, name) to output the name itself; before and after that, output the additional
assembler syntax for making that name weak, and a newline.
If you don’t define this macro or ASM_WEAKEN_DECL, GCC will not support weak
symbols and you should not define the SUPPORTS_WEAK macro.
ASM_WEAKEN_DECL (stream, decl, name, value) [Macro]
Combines (and replaces) the function of ASM_WEAKEN_LABEL and ASM_OUTPUT_WEAK_
ALIAS, allowing access to the associated function or variable decl. If value is not
NULL, this C statement should output to the stdio stream stream assembler code
which defines (equates) the weak symbol name to have the value value. If value is
NULL, it should output commands to make name weak.
ASM_OUTPUT_WEAKREF (stream, decl, name, value) [Macro]
Outputs a directive that enables name to be used to refer to symbol value with
weak-symbol semantics. decl is the declaration of name.
SUPPORTS_WEAK [Macro]
A preprocessor constant expression which evaluates to true if the target supports
weak symbols.
If you don’t define this macro, defaults.h provides a default definition. If either ASM_
WEAKEN_LABEL or ASM_WEAKEN_DECL is defined, the default definition is ‘1’; otherwise,
it is ‘0’.
TARGET_SUPPORTS_WEAK [Macro]
A C expression which evaluates to true if the target supports weak symbols.
If you don’t define this macro, defaults.h provides a default definition. The default
definition is ‘(SUPPORTS_WEAK)’. Define this macro if you want to control weak symbol
support with a compiler flag such as -melf.
MAKE_DECL_ONE_ONLY (decl) [Macro]
A C statement (sans semicolon) to mark decl to be emitted as a public symbol such
that extra copies in multiple translation units will be discarded by the linker. Define
this macro if your object file format provides support for this concept, such as the
‘COMDAT’ section flags in the Microsoft Windows PE/COFF format, and this support
requires changes to decl, such as putting it in a separate section.
SUPPORTS_ONE_ONLY [Macro]
A C expression which evaluates to true if the target supports one-only semantics.
If you don’t define this macro, varasm.cc provides a default definition. If MAKE_
DECL_ONE_ONLY is defined, the default definition is ‘1’; otherwise, it is ‘0’. Define
this macro if you want to control one-only symbol support with a compiler flag, or
if setting the DECL_ONE_ONLY flag is enough to mark a declaration to be emitted as
one-only.
void TARGET_ASM_ASSEMBLE_VISIBILITY (tree decl, int [Target Hook]
visibility)
This target hook is a function to output to asm out file some commands that will
make the symbol(s) associated with decl have hidden, protected or internal visibility
as specified by visibility.
Chapter 18: Target Description Macros and Functions 653
TARGET_WEAK_NOT_IN_ARCHIVE_TOC [Macro]
A C expression that evaluates to true if the target’s linker expects that weak symbols
do not appear in a static archive’s table of contents. The default is 0.
Leaving weak symbols out of an archive’s table of contents means that, if a symbol
will only have a definition in one translation unit and will have undefined references
from other translation units, that symbol should not be weak. Defining this macro to
be nonzero will thus have the effect that certain symbols that would normally be weak
(explicit template instantiations, and vtables for polymorphic classes with noninline
key methods) will instead be nonweak.
The C++ ABI requires this macro to be zero. Define this macro for targets where full
C++ ABI compliance is impossible and where linker restrictions require weak symbols
to be left out of a static archive’s table of contents.
different each time this macro is executed; it prevents conflicts between similarly-
named internal static variables in different scopes.
Ideally this string should not be a valid C identifier, to prevent any conflict with
the user’s own symbols. Most assemblers allow periods or percent signs in assembler
symbols; putting at least one of these between the name and the number will suffice.
If this macro is not defined, a default definition will be provided which is correct for
most systems.
buf is an expression of type char * which gives you a buffer in which to store the
name; its length is as long as class name, cat name and sel name put together, plus
50 characters extra.
The argument is inst specifies whether the method is an instance method or a class
method; class name is the name of the class; cat name is the name of the category
(or NULL if the method is not in a category); and sel name is the name of the selector.
On systems where the assembler can handle quoted names, you can use this macro
to provide more human-readable names.
at program startup, parts of crtstuff.c are compiled into that section. The program is
linked by the gcc driver like this:
ld -o output_file crti.o crtbegin.o ... -lgcc crtend.o crtn.o
The prologue of a function (__init) appears in the .init section of crti.o; the epilogue
appears in crtn.o. Likewise for the function __fini in the .fini section. Normally these
files are provided by the operating system or by the GNU C library, but are provided by
GCC for a few targets.
The objects crtbegin.o and crtend.o are (for most targets) compiled from crtstuff.c.
They contain, among other things, code fragments within the .init and .fini sections that
branch to routines in the .text section. The linker will pull all parts of a section together,
which results in a complete __init function that invokes the routines we need at startup.
To use this variant, you must define the INIT_SECTION_ASM_OP macro properly.
If no init section is available, when GCC compiles any function called main (or more
accurately, any function designated as a program entry point by the language front end
calling expand_main_function), it inserts a procedure call to __main as the first executable
code after the function prologue. The __main function is defined in libgcc2.c and runs
the global constructors.
In file formats that don’t support arbitrary sections, there are again two variants. In
the simplest variant, the GNU linker (GNU ld) and an ‘a.out’ format must be used. In
this case, TARGET_ASM_CONSTRUCTOR is defined to produce a .stabs entry of type ‘N_SETT’,
referencing the name __CTOR_LIST__, and with the address of the void function containing
the initialization code as its value. The GNU linker recognizes this as a request to add the
value to a set; the values are accumulated, and are eventually placed in the executable as
a vector in the format described above, with a leading (ignored) count and a trailing zero
element. TARGET_ASM_DESTRUCTOR is handled similarly. Since no init section is available,
the absence of INIT_SECTION_ASM_OP causes the compilation of main to call __main as
above, starting the initialization process.
The last variant uses neither arbitrary sections nor the GNU linker. This is preferable
when you want to do dynamic linking and when using file formats which the GNU linker
does not support, such as ‘ECOFF’. In this case, TARGET_HAVE_CTORS_DTORS is false,
initialization and termination functions are recognized simply by their names. This requires
an extra program in the linkage step, called collect2. This program pretends to be the
linker, for use with GCC; it does its job by running the ordinary linker, but also arranges to
include the vectors of initialization and termination functions. These functions are called
via __main as described above. In order to use this method, use_collect2 must be defined
in the target in config.gcc.
INIT_SECTION_ASM_OP [Macro]
If defined, a C string constant, including spacing, for the assembler operation to
identify the following data as initialization code. If not defined, GCC will assume
such a section does not exist. When you are using special sections for initialization
658 GNU Compiler Collection (GCC) Internals
and termination functions, this macro also controls how crtstuff.c and libgcc2.c
arrange to run the initialization functions.
HAS_INIT_SECTION [Macro]
If defined, main will not call __main as described above. This macro should be defined
for systems that control start-up code on a symbol-by-symbol basis, such as OSF/1,
and should not be defined explicitly for systems that support INIT_SECTION_ASM_OP.
LD_INIT_SWITCH [Macro]
If defined, a C string constant for a switch that tells the linker that the following
symbol is an initialization routine.
LD_FINI_SWITCH [Macro]
If defined, a C string constant for a switch that tells the linker that the following
symbol is a finalization routine.
COLLECT_SHARED_INIT_FUNC (stream, func) [Macro]
If defined, a C statement that will write a function that can be automatically called
when a shared library is loaded. The function should call func, which takes no ar-
guments. If not defined, and the object format requires an explicit initialization
function, then a function called _GLOBAL__DI will be generated.
This function and the following one are used by collect2 when linking a shared library
that needs constructors or destructors, or has DWARF2 exception tables embedded
in the code.
COLLECT_SHARED_FINI_FUNC (stream, func) [Macro]
If defined, a C statement that will write a function that can be automatically called
when a shared library is unloaded. The function should call func, which takes no
arguments. If not defined, and the object format requires an explicit finalization
function, then a function called _GLOBAL__DD will be generated.
INVOKE__main [Macro]
If defined, main will call __main despite the presence of INIT_SECTION_ASM_OP. This
macro should be defined for systems where the init section is not actually run auto-
matically, but is still useful for collecting the lists of constructors and destructors.
SUPPORTS_INIT_PRIORITY [Macro]
If nonzero, the C++ init_priority attribute is supported and the compiler should
emit instructions to control the order of initialization of objects. If zero, the compiler
will issue an error message upon encountering an init_priority attribute.
bool TARGET_HAVE_CTORS_DTORS [Target Hook]
This value is true if the target supports some “native” method of collecting con-
structors and destructors to be run at startup and exit. It is false if we must use
collect2.
bool TARGET_DTORS_FROM_CXA_ATEXIT [Target Hook]
This value is true if the target wants destructors to be queued to be run from
cxa atexit. If this is the case then, for each priority level, a new constructor will be
entered that registers the destructors for that level with cxa atexit (and there will
Chapter 18: Target Description Macros and Functions 659
OBJECT_FORMAT_COFF [Macro]
Define this macro if the system uses COFF (Common Object File Format) object files,
so that collect2 can assume this format and scan object files directly for dynamic
constructor/destructor functions.
This macro is effective only in a native compiler; collect2 as part of a cross compiler
always uses nm for the target machine.
REAL_NM_FILE_NAME [Macro]
Define this macro as a C string constant containing the file name to use to execute
nm. The default is to search the path normally for nm.
NM_FLAGS [Macro]
collect2 calls nm to scan object files for static constructors and destructors and LTO
info. By default, -n is passed. Define NM_FLAGS to a C string constant if other options
are needed to get the same output format as GNU nm -n produces.
If your system supports shared libraries and has a program to list the dynamic depen-
dencies of a given library or executable, you can define these macros to enable support for
running initialization and termination functions in shared libraries:
LDD_SUFFIX [Macro]
Define this macro to a C string constant containing the name of the program which
lists dynamic dependencies, like ldd under SunOS 4.
660 GNU Compiler Collection (GCC) Internals
SHLIB_SUFFIX [Macro]
Define this macro to a C string constant containing the default shared library exten-
sion of the target (e.g., ‘".so"’). collect2 strips version information after this suffix
when generating global constructor and destructor names. This define is only needed
on targets that use collect2 to process constructors and destructors.
REGISTER_NAMES [Macro]
A C initializer containing the assembler’s names for the machine registers, each one
as a C string constant. This is what translates register numbers in the compiler into
assembler language.
ADDITIONAL_REGISTER_NAMES [Macro]
If defined, a C initializer for an array of structures containing a name and a register
number. This macro defines additional names for hard registers, thus allowing the
asm option in declarations to refer to registers using alternate names.
OVERLAPPING_REGISTER_NAMES [Macro]
If defined, a C initializer for an array of structures containing a name, a register
number and a count of the number of consecutive machine registers the name over-
laps. This macro defines additional names for hard registers, thus allowing the asm
option in declarations to refer to registers using alternate names. Unlike ADDITIONAL_
REGISTER_NAMES, this macro should be used when the register name implies multiple
underlying registers.
This macro should be used when it is important that a clobber in an asm statement
clobbers all the underlying values implied by the register name. For example, on
ARM, clobbering the double-precision VFP register “d0” implies clobbering both
single-precision registers “s0” and “s1”.
In fact, your macro definition may process less than the entire opcode name, or more
than the opcode name; but if you want to process text that includes ‘%’-sequences to
substitute operands, you must take care of the substitution yourself. Just be sure to
increment ptr over whatever text should not be output normally.
If you need to look at the operand values, they can be found as the elements of
recog_data.operand.
If the macro definition does nothing, the instruction is output in the usual way.
FINAL_PRESCAN_INSN (insn, opvec, noperands) [Macro]
If defined, a C statement to be executed just prior to the output of assembler code
for insn, to modify the extracted operands so they will be output differently.
Here the argument opvec is the vector containing the operands extracted from insn,
and noperands is the number of elements of the vector which contain meaningful data
for this insn. The contents of this vector are what will be used to convert the insn
template into assembler code, so you can change the assembler output by changing
the contents of the vector.
This macro is useful when various assembler syntaxes share a single file of instruction
patterns; by defining this macro differently, you can cause a large class of instructions
to be output differently (such as with rearranged operands). Naturally, variations in
assembler syntax affecting individual insn patterns ought to be handled by writing
conditional output routines in those patterns.
If this macro is not defined, it is equivalent to a null statement.
void TARGET_ASM_FINAL_POSTSCAN_INSN (FILE *file, [Target Hook]
rtx_insn *insn, rtx *opvec, int noperands)
If defined, this target hook is a function which is executed just after the output of
assembler code for insn, to change the mode of the assembler if necessary.
Here the argument opvec is the vector containing the operands extracted from insn,
and noperands is the number of elements of the vector which contain meaningful
data for this insn. The contents of this vector are what was used to convert the insn
template into assembler code, so you can change the assembler mode by checking the
contents of the vector.
PRINT_OPERAND (stream, x, code) [Macro]
A C compound statement to output to stdio stream stream the assembler syntax for
an instruction operand x. x is an RTL expression.
code is a value that can be used to specify one of several ways of printing the operand.
It is used when identical operands must be printed differently depending on the con-
text. code comes from the ‘%’ specification that was used to request printing of the
operand. If the specification was just ‘%digit’ then code is 0; if the specification was
‘%ltr digit’ then code is the ASCII code for ltr.
If x is a register, this macro should print the register’s name. The names can be
found in an array reg_names whose type is char *[]. reg_names is initialized from
REGISTER_NAMES.
When the machine description has a specification ‘%punct’ (a ‘%’ followed by a punc-
tuation character), this macro is called with a null pointer for x and the punctuation
character for code.
662 GNU Compiler Collection (GCC) Internals
Note that output routines for instructions with delay slots must be prepared to deal with
not being output as part of a sequence (i.e. when the scheduling pass is not run, or when
no slot fillers could be found.) The variable final_sequence is null when not processing a
sequence, otherwise it contains the sequence rtx being output.
REGISTER_PREFIX [Macro]
LOCAL_LABEL_PREFIX [Macro]
USER_LABEL_PREFIX [Macro]
IMMEDIATE_PREFIX [Macro]
If defined, C string expressions to be used for the ‘%R’, ‘%L’, ‘%U’, and ‘%I’ options of
asm_fprintf (see final.cc). These are useful when a single md file must support
multiple assembler formats. In that case, the various tm.h files can define these
macros differently.
ASSEMBLER_DIALECT [Macro]
If your target supports multiple dialects of assembler language (such as different
opcodes), define this macro as a C expression that gives the numeric index of the
assembler language dialect to use, with zero as the first variant.
If this macro is defined, you may use constructs of the form
‘{option0|option1|option2...}’
in the output templates of patterns (see Section 17.5 [Output Template], page 369) or
in the first argument of asm_fprintf. This construct outputs ‘option0’, ‘option1’,
‘option2’, etc., if the value of ASSEMBLER_DIALECT is zero, one, two, etc. Any spe-
cial characters within these strings retain their usual meaning. If there are fewer
alternatives within the braces than the value of ASSEMBLER_DIALECT, the construct
outputs nothing. If it’s needed to print curly braces or ‘|’ character in assembler
output directly, ‘%{’, ‘%}’ and ‘%|’ can be used.
If you do not define this macro, the characters ‘{’, ‘|’ and ‘}’ do not have any special
meaning when used in templates or operands to asm_fprintf.
Define the macros REGISTER_PREFIX, LOCAL_LABEL_PREFIX, USER_LABEL_PREFIX
and IMMEDIATE_PREFIX if you can express the variations in assembler language syntax
with that mechanism. Define ASSEMBLER_DIALECT and use the ‘{option0|option1}’
syntax if the syntax variant are larger and involve such things as different opcodes
or operand order.
EH_FRAME_SECTION_NAME [Macro]
If defined, a C string constant for the name of the section containing exception han-
dling frame unwind information. If not defined, GCC will provide a default definition
if the target supports named sections. crtstuff.c uses this macro to switch to the
appropriate section.
You should define this symbol if your target supports DWARF 2 frame unwind infor-
mation and the default definition does not work.
EH_FRAME_THROUGH_COLLECT2 [Macro]
If defined, DWARF 2 frame unwind information will identified by specially named
labels. The collect2 process will locate these labels and generate code to register the
frames.
This might be necessary, for instance, if the system linker will not place the eh frames
in-between the sentinals from crtstuff.c, or if the system linker does garbage col-
lection and sections cannot be marked as not to be collected.
666 GNU Compiler Collection (GCC) Internals
EH_TABLES_CAN_BE_READ_ONLY [Macro]
Define this macro to 1 if your target is such that no frame unwind information en-
coding used with non-PIC code will ever require a runtime relocation, but the linker
may not support merging read-only and read-write sections into a single read-write
section.
MASK_RETURN_ADDR [Macro]
An rtx used to mask the return address found via RETURN_ADDR_RTX, so that it does
not contain any extraneous set bits in it.
DWARF2_UNWIND_INFO [Macro]
Define this macro to 0 if your target supports DWARF 2 frame unwind information,
but it does not yet work with exception handling. Otherwise, if your target supports
this information (if it defines INCOMING_RETURN_ADDR_RTX and OBJECT_FORMAT_ELF),
GCC will provide a default definition of 1.
DONT_USE_BUILTIN_SETJMP [Macro]
Define this macro to 1 if the setjmp/longjmp-based scheme should use the
setjmp/longjmp functions from the C library instead of the __builtin_setjmp/__
builtin_longjmp machinery.
JMP_BUF_SIZE [Macro]
This macro has no effect unless DONT_USE_BUILTIN_SETJMP is also defined. Define this
macro if the default size of jmp_buf buffer for the setjmp/longjmp-based exception
Chapter 18: Target Description Macros and Functions 667
handling mechanism is not large enough, or if it is much too large. The default size
is FIRST_PSEUDO_REGISTER * sizeof(void *).
DWARF_CIE_DATA_ALIGNMENT [Macro]
This macro need only be defined if the target might save registers in the function
prologue at an offset to the stack pointer that is not aligned to UNITS_PER_WORD. The
definition should be the negative minimum alignment if STACK_GROWS_DOWNWARD is
true, and the positive minimum alignment otherwise. See Section 18.21.2 [DWARF],
page 670. Only applicable if the target supports DWARF 2 frame unwind information.
bool TARGET_TERMINATE_DW2_EH_FRAME_INFO [Target Hook]
Contains the value true if the target should add a zero word onto the end of a Dwarf-2
frame info section when used for exception handling. Default value is false if EH_
FRAME_SECTION_NAME is defined, and true otherwise.
rtx TARGET_DWARF_REGISTER_SPAN (rtx reg) [Target Hook]
Given a register, this hook should return a parallel of registers to represent where to
find the register pieces. Define this hook if the register and its mode are represented
in Dwarf in non-contiguous locations, or if the register should be represented in more
than one register in Dwarf. Otherwise, this hook should return NULL_RTX. If not
defined, the default is to return NULL_RTX.
machine_mode TARGET_DWARF_FRAME_REG_MODE (int regno) [Target Hook]
Given a register, this hook should return the mode which the corresponding Dwarf
frame register should have. This is normally used to return a smaller mode than the
raw mode to prevent call clobbered parts of a register altering the frame register size
void TARGET_INIT_DWARF_REG_SIZES_EXTRA (tree address) [Target Hook]
If some registers are represented in Dwarf-2 unwind information in multiple pieces,
define this hook to fill in information about the sizes of those pieces in the table used
by the unwinder at runtime. It will be called by expand_builtin_init_dwarf_reg_
sizes after filling in a single size corresponding to each hard register; address is the
address of the table.
bool TARGET_ASM_TTYPE (rtx sym) [Target Hook]
This hook is used to output a reference from a frame unwinding table to the type info
object identified by sym. It should return true if the reference was output. Returning
false will cause the reference to be output using the normal Dwarf2 routines.
bool TARGET_ARM_EABI_UNWINDER [Target Hook]
This flag should be set to true on targets that use an ARM EABI based unwinding
library, and false on other targets. This effects the format of unwinding tables, and
how the unwinder in entered after running a cleanup. The default is false.
This macro need not be defined if you don’t want any special alignment to be done
at such a time. Most machine descriptions do not currently define the macro.
Unless it’s necessary to inspect the label parameter, it is better to set the variable
align jumps in the target’s TARGET_OPTION_OVERRIDE. Otherwise, you should try to
honor the user’s selection in align jumps in a JUMP_ALIGN implementation.
ASM_NO_SKIP_IN_TEXT [Macro]
Define this macro if ASM_OUTPUT_SKIP should not be used in the text section because
it fails to put zeros in the bytes that are skipped. This is true on many Unix systems,
where the pseudo–op to skip bytes produces no-op instructions rather than zeros when
used in the text section.
PREFERRED_DEBUGGING_TYPE [Macro]
A C expression that returns the type of debugging output GCC should produce when
the user specifies just -g. Define this if you have arranged for GCC to support more
than one format of debugging output. Currently, the allowable values are DWARF2_
DEBUG, VMS_DEBUG, and VMS_AND_DWARF2_DEBUG.
When the user specifies -ggdb, GCC normally also uses the value of this macro to
select the debugging output format, but with two exceptions. If DWARF2_DEBUGGING_
INFO is defined, GCC uses the value DWARF2_DEBUG.
The value of this macro only affects the default debugging output; the user can always
get a specific type of output by using -gdwarf-2, or -gvms.
670 GNU Compiler Collection (GCC) Internals
DEFAULT_GDB_EXTENSIONS [Macro]
Define this macro to control whether GCC should by default generate GDB’s extended
version of debugging information. If you don’t define the macro, the default is 1:
always generate the extended information if there is any occasion to.
DWARF2_DEBUGGING_INFO [Macro]
Define this macro if GCC should produce dwarf version 2 format debugging output
in response to the -g option.
To support optional call frame debugging information, you must also define
INCOMING_RETURN_ADDR_RTX and either set RTX_FRAME_RELATED_P on the
prologue insns if you use RTL for the prologue, or call dwarf2out_def_cfa and
dwarf2out_reg_save as appropriate from TARGET_ASM_FUNCTION_PROLOGUE if you
don’t.
DWARF2_FRAME_INFO [Macro]
Define this macro to a nonzero value if GCC should always output Dwarf 2 frame
information. If TARGET_EXCEPT_UNWIND_INFO (see Section 18.20.9 [Exception Region
Output], page 665) returns UI_DWARF2, and exceptions are enabled, GCC will output
this information not matter how you define DWARF2_FRAME_INFO.
DWARF2_ASM_LINE_DEBUG_INFO [Macro]
Define this macro to be a nonzero value if the assembler can generate Dwarf 2 line
debug info sections. This will result in much more compact line number tables, and
hence is desirable if it works.
DWARF2_ASM_VIEW_DEBUG_INFO [Macro]
Define this macro to be a nonzero value if the assembler supports view assignment and
verification in .loc. If it does not, but the user enables location views, the compiler
may have to fallback to internal line number tables.
Chapter 18: Target Description Macros and Functions 671
REAL_VALUE_TYPE [Macro]
The C data type to be used to hold a floating point value in the target machine’s
format. Typically this is a struct containing an array of HOST_WIDE_INT, but all
code should treat it as an opaque quantity.
HOST_WIDE_INT REAL_VALUE_FIX (REAL_VALUE_TYPE x) [Macro]
Truncates x to a signed integer, rounding toward zero.
unsigned HOST_WIDE_INT REAL_VALUE_UNSIGNED_FIX [Macro]
(REAL_VALUE_TYPE x)
Truncates x to an unsigned integer, rounding toward zero. If x is negative, returns
zero.
REAL_VALUE_TYPE REAL_VALUE_ATOF (const char *string, [Macro]
machine_mode mode)
Converts string into a floating point number in the target machine’s representation
for mode mode. This routine can handle both decimal and hexadecimal floating point
constants, using the syntax defined by the C language for both.
int REAL_VALUE_NEGATIVE (REAL_VALUE_TYPE x) [Macro]
Returns 1 if x is negative (including negative zero), 0 otherwise.
int REAL_VALUE_ISINF (REAL_VALUE_TYPE x) [Macro]
Determines whether x represents infinity (positive or negative).
int REAL_VALUE_ISNAN (REAL_VALUE_TYPE x) [Macro]
Determines whether x represents a “NaN” (not-a-number).
REAL_VALUE_TYPE REAL_VALUE_NEGATE (REAL_VALUE_TYPE x) [Macro]
Returns the negative of the floating point value x.
REAL_VALUE_TYPE REAL_VALUE_ABS (REAL_VALUE_TYPE x) [Macro]
Returns the absolute value of x.
OPTIMIZE_MODE_SWITCHING should return nonzero for any entity that needs mode-
switching.
If you define this macro, you also have to define NUM_MODES_FOR_MODE_SWITCHING,
TARGET_MODE_NEEDED, TARGET_MODE_PRIORITY and TARGET_MODE_EMIT. The other
macros in this section are optional.
NUM_MODES_FOR_MODE_SWITCHING [Macro]
If you define OPTIMIZE_MODE_SWITCHING, you have to define this as initializer for
an array of integers. Each initializer element N refers to an entity that needs mode
switching, and specifies the number of different modes that are defined for that entity.
The position of the element in the initializer—starting counting at zero—determines
the integer that is used to refer to the mode-switched entity in question. Modes are
represented as numbers 0 . . . N − 1. In mode arguments and return values, N either
represents an unknown mode or “no mode”, depending on context.
an integer designating a mode for entity. For any fixed entity, mode_priority (entity,
n) shall be a bijection in 0 . . . num_modes_for_mode_switching[entity] - 1.
are the same as those which are passed to attribute handlers. So far this only affects
the noinit and section attribute.
d = cp0count + 3;
(“c0r1” is the default name of register 1 in coprocessor 0; alternate names may be
added as described below, or the default names may be overridden entirely in SUBTARGET_
CONDITIONAL_REGISTER_USAGE.)
Coprocessor registers are assumed to be epilogue-used; sets to them will be preserved
even if it does not appear that the register is used again later in the function.
Another note: according to the MIPS spec, coprocessor 1 (if present) is the FPU. One
accesses COP1 registers through standard mips floating-point support; they are not included
in this mechanism.
data is the data that was returned by TARGET_GET_PCH_VALIDITY when the PCH file
was created and sz is the size of that data in bytes. It’s safe to assume that the data
was created by the same version of the compiler, so no format checking is needed.
The default definition of default_pch_valid_p should be suitable for most targets.
const char * TARGET_CHECK_PCH_TARGET_FLAGS (int [Target Hook]
pch_flags)
If this hook is nonnull, the default implementation of TARGET_PCH_VALID_P will use
it to check for compatible values of target_flags. pch flags specifies the value that
target_flags had when the PCH file was created. The return value is the same as
for TARGET_PCH_VALID_P.
void TARGET_PREPARE_PCH_SAVE (void) [Target Hook]
Called before writing out a PCH file. If the target has some garbage-collected data
that needs to be in a particular state on PCH loads, it can use this hook to enforce
that state. Very few targets need to do anything here.
HAS_LONG_COND_BRANCH [Macro]
Define this boolean macro to indicate whether or not your architecture has conditional
branches that can span all of memory. It is used in conjunction with an optimization
that partitions hot and cold basic blocks into separate sections of the executable. If
this macro is set to false, gcc will convert any conditional branches that attempt to
cross between sections into unconditional branches or indirect jumps.
HAS_LONG_UNCOND_BRANCH [Macro]
Define this boolean macro to indicate whether or not your architecture has uncon-
ditional branches that can span all of memory. It is used in conjunction with an
optimization that partitions hot and cold basic blocks into separate sections of the
executable. If this macro is set to false, gcc will convert any unconditional branches
that attempt to cross between sections into indirect jumps.
CASE_VECTOR_MODE [Macro]
An alias for a machine mode name. This is the machine mode that elements of a
jump-table should have.
CASE_VECTOR_PC_RELATIVE [Macro]
Define this macro to be a C expression to indicate when jump-tables should contain
relative addresses. You need not define this macro if jump-tables never contain relative
addresses, or jump-tables should contain relative addresses only when -fPIC or -fPIC
is in effect.
688 GNU Compiler Collection (GCC) Internals
WORD_REGISTER_OPERATIONS [Macro]
Define this macro to 1 if operations between registers with integral mode smaller
than a word are always performed on the entire register. To be more explicit, if you
start with a pair of word_mode registers with known values and you do a subword,
for example QImode, addition on the low part of the registers, then the compiler may
consider that the result has a known value in word_mode too if the macro is defined
to 1. Most RISC machines have this property and most CISC machines do not.
SHORT_IMMEDIATES_SIGN_EXTEND [Macro]
Define this macro to 1 if loading short immediate values into registers sign extends.
Chapter 18: Target Description Macros and Functions 689
is true. This description must apply to all the ‘cstoremode4’ patterns and all the
comparison operators whose results have a MODE_INT mode.
A value of 1 or −1 means that the instruction implementing the comparison operator
returns exactly 1 or −1 when the comparison is true and 0 when the comparison is
false. Otherwise, the value indicates which bits of the result are guaranteed to be 1
when the comparison is true. This value is interpreted in the mode of the comparison
operation, which is given by the mode of the first operand in the ‘cstoremode4’
pattern. Either the low bit or the sign bit of STORE_FLAG_VALUE be on. Presently,
only those bits are used by the compiler.
If STORE_FLAG_VALUE is neither 1 or −1, the compiler will generate code that depends
only on the specified bits. It can also replace comparison operators with equivalent
operations if they cause the required bits to be set, even if the remaining bits are
undefined. For example, on a machine whose comparison operators return an SImode
value and where STORE_FLAG_VALUE is defined as ‘0x80000000’, saying that just the
sign bit is relevant, the expression
(ne:SI (and:SI x (const_int power-of-2)) (const_int 0))
can be converted to
(ashift:SI x (const_int n))
where n is the appropriate shift count to move the bit being tested into the sign bit.
There is no way to describe a machine that always sets the low-order bit for a true
value, but does not guarantee the value of any other bits, but we do not know of
any machine that has such an instruction. If you are trying to port GCC to such a
machine, include an instruction to perform a logical-and of the result with 1 in the
pattern for the comparison operators and let us know at gcc@gcc.gnu.org.
Often, a machine will have multiple instructions that obtain a value from a comparison
(or the condition codes). Here are rules to guide the choice of value for STORE_FLAG_
VALUE, and hence the instructions to be used:
• Use the shortest sequence that yields a valid definition for STORE_FLAG_VALUE. It
is more efficient for the compiler to “normalize” the value (convert it to, e.g., 1 or
0) than for the comparison operators to do so because there may be opportunities
to combine the normalization with other operations.
• For equal-length sequences, use a value of 1 or −1, with −1 being slightly pre-
ferred on machines with expensive jumps and 1 preferred on other machines.
• As a second choice, choose a value of ‘0x80000001’ if instructions exist that set
both the sign and low-order bits but do not define the others.
• Otherwise, use a value of ‘0x80000000’.
Many machines can produce both the value chosen for STORE_FLAG_VALUE and its
negation in the same number of instructions. On those machines, you should also
define a pattern for those cases, e.g., one matching
(set A (neg:m (ne:m B C)))
Some machines can also perform and or plus operations on condition code values
with less instructions than the corresponding ‘cstoremode4’ insn followed by and or
plus. On those machines, define the appropriate patterns. Use the names incscc
and decscc, respectively, for the patterns which perform plus or minus operations on
692 GNU Compiler Collection (GCC) Internals
condition code values. See rs6000.md for some examples. The GNU Superoptimizer
can be used to find such instruction sequences on other machines.
If this macro is not defined, the default value, 1, is used. You need not define STORE_
FLAG_VALUE if the machine has no store-flag instructions, or if the value generated by
these instructions is 1.
Pmode [Macro]
An alias for the machine mode for pointers. On most machines, define this to be the
integer mode corresponding to the width of a hardware pointer; SImode on 32-bit
machine or DImode on 64-bit machines. On some machines you must define this to
be one of the partial integer modes, such as PSImode.
The width of Pmode must be at least as large as the value of POINTER_SIZE. If it
is not equal, you must define the macro POINTERS_EXTEND_UNSIGNED to specify how
pointers are extended to Pmode.
Chapter 18: Target Description Macros and Functions 693
FUNCTION_MODE [Macro]
An alias for the machine mode used for memory references to functions being called,
in call RTL expressions. On most CISC machines, where an instruction can begin
at any byte address, this should be QImode. On most RISC machines, where all
instructions have fixed size and alignment, this should be a mode with the same size
and alignment as the machine instruction words - typically SImode or HImode.
STDC_0_IN_SYSTEM_HEADERS [Macro]
In normal operation, the preprocessor expands __STDC__ to the constant 1, to signify
that GCC conforms to ISO Standard C. On some hosts, like Solaris, the system
compiler uses a different convention, where __STDC__ is normally 0, but is 1 if the
user specifies strict conformance to the C Standard.
Defining STDC_0_IN_SYSTEM_HEADERS makes GNU CPP follows the host convention
when processing system header files, but when processing user files __STDC__ will
always expand to 1.
SYSTEM_IMPLICIT_EXTERN_C [Macro]
Define this macro if the system header files do not support C++. This macro handles
system header files by pretending that system header files are enclosed in ‘extern
"C" {...}’.
REGISTER_TARGET_PRAGMAS () [Macro]
Define this macro if you want to implement any target-specific pragmas. If defined, it
is a C expression which makes a series of calls to c_register_pragma or c_register_
pragma_with_expansion for each pragma. The macro may also do any setup required
for the pragmas.
The primary reason to define this macro is to provide compatibility with other compil-
ers for the same target. In general, we discourage definition of target-specific pragmas
for GCC.
If the pragma can be implemented by attributes then you should consider defining
the target hook ‘TARGET_INSERT_ATTRIBUTES’ as well.
694 GNU Compiler Collection (GCC) Internals
Preprocessor macros that appear on pragma lines are not expanded. All ‘#pragma’
directives that do not match any registered pragma are silently ignored, unless the
user specifies -Wunknown-pragmas.
HANDLE_PRAGMA_PACK_WITH_EXPANSION [Macro]
Define this macro if macros should be expanded in the arguments of ‘#pragma pack’.
TARGET_DEFAULT_PACK_STRUCT [Macro]
If your target requires a structure packing default other than 0 (meaning the machine
default), define this macro to the necessary value (in bytes). This must be a value
that would also be valid to use with ‘#pragma pack()’ (that is, a small power of two).
DOLLARS_IN_IDENTIFIERS [Macro]
Define this macro to control use of the character ‘$’ in identifier names for the C
family of languages. 0 means ‘$’ is not allowed by default; 1 means it is allowed. 1 is
the default; there is no need to define this macro in that case.
jump_insn is really a function call and hence has this behavior, you should define
this macro.
You need not define this macro if it would always return zero.
MULTIPLE_SYMBOL_SPACES [Macro]
Define this macro as a C expression that is nonzero if, in some cases, global symbols
from one translation unit may not be bound to undefined symbols in another transla-
tion unit without user intervention. For instance, under Microsoft Windows symbols
must be explicitly imported from shared libraries (DLLs).
You need not define this macro if it would always evaluate to zero.
MATH_LIBRARY [Macro]
Define this macro as a C string constant for the linker argument to link in the system
math library, minus the initial ‘"-l"’, or ‘""’ if the target does not have a separate
math library.
You need only define this macro if the default of ‘"m"’ is wrong.
LIBRARY_PATH_ENV [Macro]
Define this macro as a C string constant for the environment variable that specifies
where the linker should look for libraries.
You need only define this macro if the default of ‘"LIBRARY_PATH"’ is wrong.
696 GNU Compiler Collection (GCC) Internals
TARGET_POSIX_IO [Macro]
Define this macro if the target supports the following POSIX file functions, access,
mkdir and file locking with fcntl / F SETLKW. Defining TARGET_POSIX_IO will
enable the test coverage code to use file locking when exiting a program, which avoids
race conditions if the program has forked. It will also create directories at run-time
for cross-profiling.
MAX_CONDITIONAL_EXECUTE [Macro]
A C expression for the maximum number of instructions to execute via conditional
execution instructions instead of a branch. A value of BRANCH_COST+1 is the default.
IFCVT_MODIFY_TESTS (ce_info, true_expr, false_expr) [Macro]
Used if the target needs to perform machine-dependent modifications on the condi-
tionals used for turning basic blocks into conditionally executed code. ce info points
to a data structure, struct ce_if_block, which contains information about the cur-
rently processed blocks. true expr and false expr are the tests that are used for
converting the then-block and the else-block, respectively. Set either true expr or
false expr to a null pointer if the tests cannot be converted.
IFCVT_MODIFY_MULTIPLE_TESTS (ce_info, bb, true_expr, [Macro]
false_expr)
Like IFCVT_MODIFY_TESTS, but used when converting more complicated if-statements
into conditions combined by and and or operations. bb contains the basic block that
contains the test that is currently being processed and about to be turned into a
condition.
IFCVT_MODIFY_INSN (ce_info, pattern, insn) [Macro]
A C expression to modify the PATTERN of an INSN that is to be converted to
conditional execution format. ce info points to a data structure, struct ce_if_
block, which contains information about the currently processed blocks.
IFCVT_MODIFY_FINAL (ce_info) [Macro]
A C expression to perform any final machine dependent modifications in converting
code to conditional execution. The involved basic blocks can be found in the struct
ce_if_block structure that is pointed to by ce info.
IFCVT_MODIFY_CANCEL (ce_info) [Macro]
A C expression to cancel any machine dependent modifications in converting code to
conditional execution. The involved basic blocks can be found in the struct ce_if_
block structure that is pointed to by ce info.
IFCVT_MACHDEP_INIT (ce_info) [Macro]
A C expression to initialize any machine specific data for if-conversion of the if-block
in the struct ce_if_block structure that is pointed to by ce info.
bool TARGET_USE_LATE_PROLOGUE_EPILOGUE () [Target Hook]
Return true if the current function’s prologue and epilogue should be emitted late in
the pass pipeline, instead of at the usual point.
Normally, the prologue and epilogue sequences are introduced soon after register al-
location is complete. The advantage of this approach is that it allows the prologue
Chapter 18: Target Description Macros and Functions 697
and epilogue instructions to be optimized and scheduled with other code in the func-
tion. However, some targets require the prologue and epilogue to be the first and
last sequences executed by the function, with no variation allowed. This hook should
return true on such targets.
The default implementation returns false, which is correct for most targets. The hook
should only return true if there is a specific target limitation that cannot be described
in RTL. For example, the hook might return true if the prologue and epilogue need
to switch between instruction sets.
to figure out the order in which two versions must be dispatched. A function version
with a higher priority is checked for dispatching earlier. decl1 and decl2 are the two
function decls that will be compared.
known. loop depth is the nesting depth of the loop, with 1 for innermost loops, 2 for
loops that contain innermost loops, and so on. entered at top is true if the loop is
only entered from the top.
This hook is only used if doloop_end is available. The default implementation returns
true. You can use can_use_doloop_if_innermost if the loop must be the innermost,
and if there are no other restrictions.
const char * TARGET_INVALID_WITHIN_DOLOOP (const [Target Hook]
rtx_insn *insn)
Take an instruction in insn and return NULL if it is valid within a low-overhead loop,
otherwise return a string explaining why doloop could not be applied.
Many targets use special registers for low-overhead looping. For any instruction that
clobbers these this function should return a string indicating the reason why the
doloop could not be applied. By default, the RTL loop optimizer does not use a
present doloop pattern for loops containing function calls or branch on table instruc-
tions.
machine_mode TARGET_PREFERRED_DOLOOP_MODE (machine_mode [Target Hook]
mode)
This hook takes a mode for a doloop IV, where mode is the original mode for the oper-
ation. If the target prefers an alternate mode for the operation, then this hook should
return that mode; otherwise the original mode should be returned. For example, on
a 64-bit target, DImode might be preferred over SImode. Both the original and the
returned modes should be MODE_INT.
bool TARGET_LEGITIMATE_COMBINED_INSN (rtx_insn *insn) [Target Hook]
Take an instruction in insn and return false if the instruction is not appropriate as
a combination of two or more instructions. The default is to accept all instructions.
bool TARGET_CAN_FOLLOW_JUMP (const rtx_insn *follower, [Target Hook]
const rtx_insn *followee)
FOLLOWER and FOLLOWEE are JUMP INSN instructions; return true if FOL-
LOWER may be modified to follow FOLLOWEE; false, if it can’t. For example, on
some targets, certain kinds of branches can’t be made to follow through a hot/cold
partitioning.
bool TARGET_COMMUTATIVE_P (const_rtx x, int outer_code) [Target Hook]
This target hook returns true if x is considered to be commutative. Usually, this
is just COMMUTATIVE P (x), but the HP PA doesn’t consider PLUS to be com-
mutative inside a MEM. outer code is the rtx code of the enclosing rtl, if known,
otherwise it is UNKNOWN.
rtx TARGET_ALLOCATE_INITIAL_VALUE (rtx hard_reg) [Target Hook]
When the initial value of a hard register has been copied in a pseudo register, it
is often not necessary to actually allocate another register to this pseudo register,
because the original hard register or a stack slot it has been saved into can be used.
TARGET_ALLOCATE_INITIAL_VALUE is called at the start of register allocation once
for each hard register that had its initial value copied by using get_func_hard_reg_
initial_val or get_hard_reg_initial_val. Possible values are NULL_RTX, if you
Chapter 18: Target Description Macros and Functions 701
don’t want to do any special allocation, a REG rtx—that would typically be the hard
register itself, if it is known not to be clobbered—or a MEM. If you are returning a MEM,
this is only a hint for the allocator; it might decide to use another register anyways.
You may use current_function_is_leaf or REG_N_SETS in the hook to determine
if the hard register in question will not be clobbered. The default value of this hook
is NULL, which disables any special allocation.
int TARGET_UNSPEC_MAY_TRAP_P (const_rtx x, unsigned [Target Hook]
flags)
This target hook returns nonzero if x, an unspec or unspec_volatile operation,
might cause a trap. Targets can use this hook to enhance precision of analysis for
unspec and unspec_volatile operations. You may call may_trap_p_1 to analyze
inner elements of x in which case flags should be passed along.
void TARGET_SET_CURRENT_FUNCTION (tree decl) [Target Hook]
The compiler invokes this hook whenever it changes its current function context
(cfun). You can define this function if the back end needs to perform any initial-
ization or reset actions on a per-function basis. For example, it may be used to
implement function attributes that affect register usage or code generation patterns.
The argument decl is the declaration for the new function context, and may be null
to indicate that the compiler has left a function context and is returning to processing
at the top level. The default hook function does nothing.
GCC sets cfun to a dummy function context during initialization of some parts of
the back end. The hook function is not invoked in this situation; you need not worry
about the hook being invoked recursively, or when the back end is in a partially-
initialized state. cfun might be NULL to indicate processing at top level, outside of
any function scope.
TARGET_OBJECT_SUFFIX [Macro]
Define this macro to be a C string representing the suffix for object files on your
target machine. If you do not define this macro, GCC will use ‘.o’ as the suffix for
object files.
TARGET_EXECUTABLE_SUFFIX [Macro]
Define this macro to be a C string representing the suffix to be automatically added
to executable files on your target machine. If you do not define this macro, GCC will
use the null string as the suffix for executable files.
COLLECT_EXPORT_LIST [Macro]
If defined, collect2 will scan the individual object files specified on its command line
and create an export list for the linker. Define this macro for systems like AIX, where
the linker discards object files that are not referenced from main and uses export lists.
bool TARGET_CANNOT_MODIFY_JUMPS_P (void) [Target Hook]
This target hook returns true past the point in which new jump instructions could
be created. On machines that require a register for every jump such as the SHmedia
ISA of SH5, this point would typically be reload, so this target hook should be defined
to a function such as:
static bool
702 GNU Compiler Collection (GCC) Internals
cannot_modify_jumps_past_reload_p ()
{
return (reload_completed || reload_in_progress);
}
POWI_MAX_MULTS [Macro]
If defined, this macro is interpreted as a signed integer C expression that specifies
the maximum number of floating point multiplications that should be emitted when
expanding exponentiation by an integer constant inline. When this value is defined,
exponentiation requiring more than this number of multiplications is implemented by
calling the system library’s pow, powf or powl routines. The default value places no
upper bound on the multiplication count.
Chapter 18: Target Description Macros and Functions 703
TARGET_FORMAT_TYPES [Macro]
If defined, this macro is the name of a global variable containing target-specific format
checking information for the -Wformat option. The default is to have no target-specific
format checks.
TARGET_N_FORMAT_TYPES [Macro]
If defined, this macro is the number of entries in TARGET_FORMAT_TYPES.
TARGET_OVERRIDES_FORMAT_ATTRIBUTES [Macro]
If defined, this macro is the name of a global variable containing target-specific for-
mat overrides for the -Wformat option. The default is to have no target-specific
format overrides. If defined, TARGET_FORMAT_TYPES and TARGET_OVERRIDES_FORMAT_
ATTRIBUTES_COUNT must be defined, too.
TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT [Macro]
If defined, this macro specifies the number of entries in TARGET_OVERRIDES_FORMAT_
ATTRIBUTES.
TARGET_OVERRIDES_FORMAT_INIT [Macro]
If defined, this macro specifies the optional initialization routine for target specific
customizations of the system printf and scanf formatter settings.
OBJC_JBLEN [Macro]
This macro determines the size of the objective C jump buffer for the NeXT runtime.
By default, OBJC JBLEN is defined to an innocuous value.
LIBGCC2_UNWIND_ATTRIBUTE [Macro]
Define this macro if any target-specific attributes need to be attached to the functions
in libgcc that provide low-level support for call stack unwinding. It is used in
declarations in unwind-generic.h and the associated definitions of those functions.
Chapter 18: Target Description Macros and Functions 705
must always return val in result in mode mode when the cpu is not executing spec-
ulatively, but must never return that when speculating until it is known that the
speculation will not be unwound. The hook supports two primary mechanisms for
implementing the requirements. The first is to emit a speculation barrier which forces
the processor to wait until all prior speculative operations have been resolved; the sec-
ond is to use a target-specific mechanism that can track the speculation state and to
return failval if it can determine that speculation must be unwound at a later time.
The default implementation simply copies val to result and emits a speculation_
barrier instruction if that is defined.
void TARGET_RUN_TARGET_SELFTESTS (void) [Target Hook]
If selftests are enabled, run any selftests for this target.
bool TARGET_MEMTAG_CAN_TAG_ADDRESSES () [Target Hook]
True if the backend architecture naturally supports ignoring some region of pointers.
This feature means that -fsanitize=hwaddress can work.
At preset, this feature does not support address spaces. It also requires Pmode to be
the same as ptr_mode.
uint8_t TARGET_MEMTAG_TAG_SIZE () [Target Hook]
Return the size of a tag (in bits) for this platform.
The default returns 8.
uint8_t TARGET_MEMTAG_GRANULE_SIZE () [Target Hook]
Return the size in real memory that each byte in shadow memory refers to. I.e. if a
variable is X bytes long in memory, then this hook should return the value Y such
that the tag in shadow memory spans X /Y bytes.
Most variables will need to be aligned to this amount since two variables that are
neighbors in memory and share a tag granule would need to share the same tag.
The default returns 16.
rtx TARGET_MEMTAG_INSERT_RANDOM_TAG (rtx untagged, rtx [Target Hook]
target)
Return an RTX representing the value of untagged but with a (possibly) random tag
in it. Put that value into target if it is convenient to do so. This function is used to
generate a tagged base for the current stack frame.
rtx TARGET_MEMTAG_ADD_TAG (rtx base, poly_int64 [Target Hook]
addr_offset, uint8_t tag_offset)
Return an RTX that represents the result of adding addr offset to the address in
pointer base and tag offset to the tag in pointer base. The resulting RTX must either
be a valid memory address or be able to get put into an operand with force_operand.
Unlike other memtag hooks, this must return an expression and not emit any RTL.
rtx TARGET_MEMTAG_SET_TAG (rtx untagged_base, rtx tag, [Target Hook]
rtx target)
Return an RTX representing untagged base but with the tag tag. Try and store this
in target if convenient. untagged base is required to have a zero tag when this hook
is called. The default of this hook is to set the top byte of untagged base to tag.
Chapter 18: Target Description Macros and Functions 709
19 Host Configuration
Most details about the machine and system on which the compiler is actually running are
detected by the configure script. Some things are impossible for configure to detect;
these are described in two ways, either by macros defined in a file named xm-machine.h or
by hook functions in the file specified by the out host hook obj variable in config.gcc.
(The intention is that very few hosts will need a header file but nearly every fully supported
host will need to override some hooks.)
If you need to define only a few macros, and they have simple definitions, consider using
the xm_defines variable in your config.gcc entry instead of creating a host configuration
header. See Section 6.3.2.2 [System Config], page 69.
DUMPFILE_FORMAT
Define this macro to be a C string representing the format to use for constructing
the index part of debugging dump file names. The resultant string must fit in
fifteen bytes. The full filename will be the concatenation of: the prefix of the
assembler file name, the string resulting from applying this format to an index
number, and a string unique to each dump file kind, e.g. ‘rtl’.
If you do not define this macro, GCC will use ‘.%02d.’. You should define this
macro if using the default will create an invalid file name.
DELETE_IF_ORDINARY
Define this macro to be a C statement (sans semicolon) that performs host-
dependent removal of ordinary temp files in the compilation driver.
If you do not define this macro, GCC will use the default version. You should
define this macro if the default version does not reliably remove the temp file
as, for example, on VMS which allows multiple versions of a file.
HOST_LACKS_INODE_NUMBERS
Define this macro if the host filesystem does not report meaningful inode num-
bers in struct stat.
HOST_LONG_LONG_FORMAT
If defined, the string used to indicate an argument of type long long to func-
tions like printf. The default value is "ll".
HOST_LONG_FORMAT
If defined, the string used to indicate an argument of type long to functions
like printf. The default value is "l".
HOST_PTR_PRINTF
If defined, the string used to indicate an argument of type void * to functions
like printf. The default value is "%p".
In addition, if configure generates an incorrect definition of any of the macros in auto-
host.h, you can override that definition in a host configuration header. If you need to do
this, first see if it is possible to fix configure.
715
20 Makefile Fragments
When you configure GCC using the configure script, it will construct the file Makefile
from the template file Makefile.in. When it does this, it can incorporate makefile frag-
ments from the config directory. These are used to set Makefile parameters that are not
amenable to being calculated by autoconf. The list of fragments to incorporate is set by
config.gcc (and occasionally config.build and config.host); See Section 6.3.2.2 [Sys-
tem Config], page 69.
Fragments are named either t-target or x-host, depending on whether they are relevant
to configuring GCC to produce code for a particular target, or to configuring GCC to run on
a particular host. Here target and host are mnemonics which usually have some relationship
to the canonical system name, but no formal connection.
If these files do not exist, it means nothing needs to be added for a given target or host.
Most targets need a few t-target fragments, but needing x-host fragments is rare.
MULTILIB_REQUIRED
Sometimes when there are only a few combinations are required, it would be a
big effort to come up with a MULTILIB_EXCEPTIONS list to cover all undesired
ones. In such a case, just listing all the required combinations in MULTILIB_
REQUIRED would be more straightforward.
The way to specify the entries in MULTILIB_REQUIRED is same with the way
used for MULTILIB_EXCEPTIONS, only this time what are required will be spec-
ified. Suppose there are multiple sets of MULTILIB_OPTIONS and only two com-
binations are required, one for ARMv7-M and one for ARMv7-R with hard
floating-point ABI and FPU, the MULTILIB_REQUIRED can be set to:
MULTILIB_REQUIRED = mthumb/march=armv7-m
MULTILIB_REQUIRED += march=armv7-r/mfloat-abi=hard/mfpu=vfpv3-d16
Chapter 20: Makefile Fragments 717
libraries and crt files twice; the first time it will add multilib to each directory
in the search path, the second it will not.
For configurations that support both multilib and multiarch, MULTILIB_
OSDIRNAMES also encodes the multiarch name, thus subsuming
MULTIARCH_DIRNAME. The multiarch name is appended to each directory
name, separated by a colon (e.g. ‘../lib32:i386-linux-gnu’).
Each multiarch subdirectory will be searched before the corresponding OS mul-
tilib directory, for example ‘/lib/i386-linux-gnu’ before ‘/lib/../lib32’.
The multiarch name will also be used to modify the system header search path,
as explained for MULTIARCH_DIRNAME.
MULTIARCH_DIRNAME
This variable specifies the multiarch name for configurations that are multiarch-
enabled but not multilibbed configurations.
The multiarch name is used to augment the search path for libraries, crt
files and system header files with additional locations. The compiler will
add a multiarch subdirectory of the form prefix/multiarch before each
directory in the library and crt search path. It will also add two directories
LOCAL_INCLUDE_DIR/multiarch and NATIVE_SYSTEM_HEADER_DIR/multiarch)
to the system header search path, respectively before LOCAL_INCLUDE_DIR and
NATIVE_SYSTEM_HEADER_DIR.
MULTIARCH_DIRNAME is not used for configurations that support both multi-
lib and multiarch. In that case, multiarch names are encoded in MULTILIB_
OSDIRNAMES instead.
More documentation about multiarch can be found at https://wiki.debian.
org/Multiarch.
SPECS Unfortunately, setting MULTILIB_EXTRA_OPTS is not enough, since it does not
affect the build of target libraries, at least not the build of the default multilib.
One possible work-around is to use DRIVER_SELF_SPECS to bring options from
the specs file as if they had been passed in the compiler driver command
line. However, you don’t want to be adding these options after the toolchain is
installed, so you can instead tweak the specs file that will be used during the
toolchain build, while you still install the original, built-in specs. The trick is
to set SPECS to some other filename (say specs.install), that will then be
created out of the built-in specs, and introduce a Makefile rule to generate the
specs file that’s going to be used at build time out of your specs.install.
T_CFLAGS These are extra flags to pass to the C compiler. They are used both when build-
ing GCC, and when compiling things with the just-built GCC. This variable is
deprecated and should not be used.
21 collect2
GCC uses a utility called collect2 on nearly all systems to arrange to call various initial-
ization functions at start time.
The program collect2 works by linking the program once and looking through the linker
output file for symbols with particular names indicating they are constructor functions. If
it finds any, it creates a new temporary ‘.c’ file containing a table of them, compiles it, and
links the program a second time including that file.
The actual calls to the constructors are carried out by a subroutine called __main, which
is called (automatically) at the beginning of the body of main (provided main was compiled
with GNU CC). Calling __main is necessary, even when compiling C code, to allow linking
C and C++ object code together. (If you use -nostdlib, you get an unresolved reference to
__main, since it’s defined in the standard GCC library. Include -lgcc at the end of your
compiler command line to resolve this reference.)
The program collect2 is installed as ld in the directory where the passes of the compiler
are installed. When collect2 needs to find the real ld, it tries the following file names:
• a hard coded linker file name, if GCC was configured with the --with-ld option.
• real-ld in the directories listed in the compiler’s search directories.
• real-ld in the directories listed in the environment variable PATH.
• The file specified in the REAL_LD_FILE_NAME configuration macro, if specified.
• ld in the compiler’s search directories, except that collect2 will not execute itself
recursively.
• ld in PATH.
“The compiler’s search directories” means all the directories where gcc searches for passes
of the compiler. This includes directories that you specify with -B.
Cross-compilers search a little differently:
• real-ld in the compiler’s search directories.
• target-real-ld in PATH.
• The file specified in the REAL_LD_FILE_NAME configuration macro, if specified.
• ld in the compiler’s search directories.
• target-ld in PATH.
collect2 explicitly avoids running ld using the file name under which collect2 itself
was invoked. In fact, it remembers up a list of such names—in case one copy of collect2
finds another copy (or version) of collect2 installed as ld in a second place in the search
path.
collect2 searches for the utilities nm and strip using the same algorithm as above for
ld.
721
If you have a class or structure using any of the above constructs, you need to mark that
class as GTY ((user)) and provide your own marking routines (see section Section 23.3
[User GC], page 729, for details).
It is always valid to include function definitions inside classes. Those are always ignored
by gengtype, as it only cares about data members.
In this case, the length option is used to override the specified array length
(which should usually be 1). The parameter of the option is a fragment of C
code that calculates the length.
The second case is when a structure or a global variable contains a pointer to
an array, like this:
struct gimple_omp_for_iter * GTY((length ("%h.collapse"))) iter;
In this case, iter has been allocated by writing something like
x->iter = ggc_alloc_cleared_vec_gimple_omp_for_iter (collapse);
and the collapse provides the length of the field.
This second use of length also works on global variables, like:
static GTY((length("reg_known_value_size"))) rtx *reg_known_value;
Note that the length option is only meant for use with arrays of non-atomic
objects, that is, objects that contain pointers pointing to other GTY-managed
objects. For other GC-allocated arrays and strings you should use atomic or
string_length.
string_length ("expression")
In order to simplify production of PCH, a structure member that is a plain array
of bytes (an optionally const and/or unsigned char *) is treated specially
by the infrastructure. Even if such an array has not been allocated in GC-
controlled memory, it will still be written properly into a PCH. The machinery
responsible for this needs to know the length of the data; by default, the length
is determined by calling strlen on the pointer. The string_length option
specifies an alternate way to determine the length, such as by inspecting another
struct member:
struct GTY(()) non_terminated_string {
size_t sz;
const char * GTY((string_length ("%h.sz"))) data;
};
Similarly, this is useful for (regular NUL-terminated) strings with NUL charac-
ters embedded (that the default strlen use would run afoul of):
struct GTY(()) multi_string {
const char * GTY((string_length ("%h.len + 1"))) str;
size_t len;
};
The string_length option currently is not supported for (fields in) global
variables.
skip
If skip is applied to a field, the type machinery will ignore it. This is somewhat
dangerous; the only safe use is in a union when one field really isn’t ever used.
callback
callback should be applied to fields with pointer to function type and causes
the field to be ignored similarly to skip, except when writing PCH and the
field is non-NULL it will remember the field’s address for relocation purposes if
the process writing PCH has different load base from a process reading PCH.
726 GNU Compiler Collection (GCC) Internals
for_user
Use this to mark types that need to be marked by user gc routines, but are not
refered to in a template argument. So if you have some user gc type T1 and a
non user gc type T2 you can give T2 the for user option so that the marking
functions for T1 can call non mangled functions to mark T2.
desc ("expression")
tag ("constant")
default
The type machinery needs to be told which field of a union is currently active.
This is done by giving each field a constant tag value, and then specifying a
discriminator using desc. The value of the expression given by desc is compared
against each tag value, each of which should be different. If no tag is matched,
the field marked with default is used if there is one, otherwise no field in the
union will be marked.
In the desc option, the “current structure” is the union that it discriminates.
Use %1 to mean the structure containing it. There are no escapes available to
the tag option, since it is a constant.
For example,
struct GTY(()) tree_binding
{
struct tree_common common;
union tree_binding_u {
tree GTY ((tag ("0"))) scope;
struct cp_binding_level * GTY ((tag ("1"))) level;
} GTY ((desc ("BINDING_HAS_LEVEL_P ((tree)&%0)"))) xscope;
tree value;
};
In this example, the value of BINDING HAS LEVEL P when applied to a
struct tree_binding * is presumed to be 0 or 1. If 1, the type mechanism
will treat the field level as being present and if 0, will treat the field scope as
being present.
The desc and tag options can also be used for inheritance to denote which
subclass an instance is. See Section 23.2 [Inheritance and GTY], page 728, for
more information.
cache
When the cache option is applied to a global variable gt cleare cache is called
on that variable between the mark and sweep phases of garbage collection. The
gt clear cache function is free to mark blocks as used, or to clear pointers in
the variable.
In a hash table, the ‘gt_cleare_cache’ function discards entries if the key is
not marked, or marks the value if the key is marked.
Note that caches should generally use deletable instead; cache is only prefer-
able if the value is impractical to recompute from the key when needed.
deletable
deletable, when applied to a global variable, indicates that when garbage
collection runs, there’s no need to mark anything pointed to by this variable,
Chapter 23: Memory Management and Type Information 727
it can just be set to NULL instead. This is used to keep a list of free structures
around for re-use.
maybe_undef
When applied to a field, maybe_undef indicates that it’s OK if the structure
that this fields points to is never defined, so long as this field is always NULL.
This is used to avoid requiring backends to define certain optional structures.
It doesn’t work with language frontends.
nested_ptr (type, "to expression", "from expression")
The type machinery expects all pointers to point to the start of an object.
Sometimes for abstraction purposes it’s convenient to have a pointer which
points inside an object. So long as it’s possible to convert the original object
to and from the pointer, such pointers can still be used. type is the type of the
original object, the to expression returns the pointer given the original object,
and the from expression returns the original object given the pointer. The
pointer will be available using the %h escape.
chain_next ("expression")
chain_prev ("expression")
chain_circular ("expression")
It’s helpful for the type machinery to know if objects are often chained together
in long lists; this lets it generate code that uses less stack space by iterating
along the list instead of recursing down it. chain_next is an expression for the
next item in the list, chain_prev is an expression for the previous item. For
singly linked lists, use only chain_next; for doubly linked lists, use both. The
machinery requires that taking the next item of the previous item gives the
original item. chain_circular is similar to chain_next, but can be used for
circular single linked lists.
reorder ("function name")
Some data structures depend on the relative ordering of pointers. If
the precompiled header machinery needs to change that ordering, it
will call the function referenced by the reorder option, before changing
the pointers in the object that’s pointed to by the field the option
applies to. The function must take four arguments, with the signature
‘void *, void *, gt_pointer_operator, void *’. The first parameter is a
pointer to the structure that contains the object being updated, or the object
itself if there is no containing structure. The second parameter is a cookie that
should be ignored. The third parameter is a routine that, given a pointer, will
update it to its correct new value. The fourth parameter is a cookie that must
be passed to the second parameter.
PCH cannot handle data structures that depend on the absolute values of point-
ers. reorder functions can be expensive. When possible, it is better to depend
on properties of the data, like an ID number or the hash of a string instead.
atomic
The atomic option can only be used with pointers. It informs the GC machinery
that the memory that the pointer points to does not contain any pointers, and
728 GNU Compiler Collection (GCC) Internals
1
Classes lacking such a marker will not be identified as being part of the hierarchy, and so the marking
routines will not handle them, leading to a assertion failure within the marking routines due to an unknown
tag value (assuming that assertions are enabled).
730 GNU Compiler Collection (GCC) Internals
template<typename T>
void gt_pch_nx (TP<T> *tp)
{
extern void gt_pch_nx (T&);
template<typename T>
void gt_pch_nx (TP<T *> *tp, gt_pointer_operator op, void *cookie)
{
/* For every field 'fld' of 'tp' with type 'T *', call the given
pointer operator. */
op (&(tp->fld), NULL, cookie);
}
template<typename T>
void gt_pch_nx (TP<T> *tp, gt_pointer_operator, void *cookie)
{
Chapter 23: Memory Management and Type Information 731
/* For every field 'fld' of 'tp' with type 'T', call the pointer
walker for all the fields of T. */
gt_pch_nx (&(tp->fld), op, cookie);
}
Support for user-defined types is currently limited. The following restrictions apply:
1. Type TP and all the argument types T must be marked with GTY.
2. Type TP can only have type names in its argument list.
3. The pointer walker functions are different for TP<T> and TP<T *>. In the case of TP<T>,
references to T must be handled by calling gt_pch_nx (which will, in turn, walk all the
pointers inside fields of T). In the case of TP<T *>, references to T * must be handled
by calling the op function on the address of the pointer (see the code snippets above).
For language frontends, there is another file that needs to be included somewhere. It
will be called gtype-lang.h, where lang is the name of the subdirectory the language is
contained in.
Plugins can add additional root tables. Run the gengtype utility in plugin mode as
gengtype -P pluginout.h source-dir file-list plugin*.c with your plugin files plu-
gin*.c using GTY to generate the pluginout.h file. The GCC build tree is needed to be
present in that mode.
24 Plugins
GCC plugins are loadable modules that provide extra features to the compiler. Like GCC
itself they can be distributed in source and binary forms.
GCC plugins provide developers with a rich subset of the GCC API to allow them to
extend GCC as they see fit. Whether it is writing an additional optimization pass, trans-
forming code, or analyzing information, plugins can be quite useful.
int
plugin_init (struct plugin_name_args *plugin_info,
struct plugin_gcc_version *version)
{
if (!plugin_default_version_check (version, &gcc_version))
return 1;
}
but you can also check the individual fields if you want a less strict check.
Chapter 24: Plugins 737
In addition, plugins can also look up the enumerator of a named event, and / or generate
new events dynamically, by calling the function get_named_event_id.
To register a callback, the plugin calls register_callback with the arguments:
• char *name: Plugin name.
• int event: The event code.
• plugin_callback_func callback: The function that handles event.
• void *user_data: Pointer to plugin-specific data.
For the PLUGIN PASS MANAGER SETUP, PLUGIN INFO, and PLU-
GIN REGISTER GGC ROOTS pseudo-events the callback should be null, and the
user_data is specific.
When the PLUGIN PRAGMAS event is triggered (with a null pointer as data from
GCC), plugins may register their own pragmas. Notice that pragmas are not available from
lto1, so plugins used with -flto option to GCC during link-time optimization cannot use
pragmas and do not even see functions like c_register_pragma or pragma_lex.
The PLUGIN INCLUDE FILE event, with a const char* file path as GCC data, is
triggered for processing of #include or #line directives.
The PLUGIN FINISH event is the last time that plugins can call GCC functions, notably
emit diagnostics with warning, error etc.
struct register_pass_info
{
struct opt_pass *pass; /* New pass provided by the plugin. */
const char *reference_pass_name; /* Name of the reference pass for hooking
up the new pass. */
int ref_pass_instance_number; /* Insert the pass at the specified
instance number of the reference pass. */
/* Do it for every instance if it is 0. */
enum pass_positioning_ops pos_op; /* how to insert the new pass. */
};
...
...
...
}
/* Attribute definition */
static struct attribute_spec user_attr =
{ "user", 1, 1, false, false, false, false, handle_user_attribute, NULL };
The PLUGIN PRAGMAS callback is called once during pragmas registration. Use
the c_register_pragma, c_register_pragma_with_data, c_register_pragma_with_
expansion, c_register_pragma_with_expansion_and_data functions to register
custom pragmas and their handlers (which often want to call pragma_lex) from
c-family/c-pragma.h.
/* Plugin callback called during pragmas registration. Registered with
register_callback (plugin_name, PLUGIN_PRAGMAS,
register_my_pragma, NULL);
*/
static void
register_my_pragma (void *event_data, void *data)
{
warning (0, G_("Callback to register pragmas"));
c_register_pragma ("GCCPLUGIN", "sayhello", handle_pragma_sayhello);
}
It is suggested to pass "GCCPLUGIN" (or a short name identifying your plugin) as the
“space” argument of your pragma.
Pragmas registered with c_register_pragma_with_expansion or c_register_pragma_
with_expansion_and_data support preprocessor expansions. For example:
#define NUMBER 10
#pragma GCCPLUGIN foothreshold (NUMBER)
about which function this pass is executed for. Note that this event will only be invoked
if the gate check (if applicable, modified by PLUGIN OVERRIDE GATE) succeeds.
You can use other hooks, like PLUGIN_ALL_PASSES_START, PLUGIN_ALL_PASSES_END,
PLUGIN_ALL_IPA_PASSES_START, PLUGIN_ALL_IPA_PASSES_END, PLUGIN_EARLY_GIMPLE_
PASSES_START, and/or PLUGIN_EARLY_GIMPLE_PASSES_END to manipulate global state in
your plugin(s) in order to get context for the pass execution.
plugin.so: $(PLUGIN_SOURCE_FILES)
$(HOST_GCC) -shared $(CXXFLAGS) $^ -o $@
742 GNU Compiler Collection (GCC) Internals
A single source file plugin may be built with g++ -I`gcc -print-file-
name=plugin`/include -fPIC -shared -fno-rtti -O2 plugin.cc -o plugin.so, using
backquote shell syntax to query the plugin directory.
Plugin support on Windows/MinGW has a number of limitations and additional require-
ments. When building a plugin on Windows we have to link an import library for the
corresponding backend executable, for example, cc1.exe, cc1plus.exe, etc., in order to
gain access to the symbols provided by GCC. This means that on Windows a plugin is
language-specific, for example, for C, C++, etc. If you wish to use your plugin with mul-
tiple languages, then you will need to build multiple plugin libraries and either instruct
your users on how to load the correct version or provide a compiler wrapper that does this
automatically.
Additionally, on Windows the plugin library has to export the plugin_is_GPL_
compatible and plugin_init symbols. If you do not wish to modify the source code
of your plugin, then you can use the -Wl,--export-all-symbols option or provide a
suitable DEF file. Alternatively, you can export just these two symbols by decorating
them with __declspec(dllexport), for example:
#ifdef _WIN32
__declspec(dllexport)
#endif
int plugin_is_GPL_compatible;
#ifdef _WIN32
__declspec(dllexport)
#endif
int plugin_init (plugin_name_args *, plugin_gcc_version *)
The import libraries are installed into the plugin directory and their names are derived
by appending the .a extension to the backend executable names, for example, cc1.exe.a,
cc1plus.exe.a, etc. The following command line shows how to build the single source file
plugin on Windows to be used with the C++ compiler:
g++ -I`gcc -print-file-name=plugin`/include -shared -Wl,--export-all-symbols \
-o plugin.dll plugin.cc `gcc -print-file-name=plugin`/cc1plus.exe.a
When a plugin needs to use gengtype, be sure that both gengtype and gtype.state
have the same version as the GCC for which the plugin is built.
743
The implementation of the inter-procedural passes are shared between LTO, WHOPR
and classic non-LTO compilation.
• During the traditional file-by-file mode every pass executes its own Generate summary,
Execute, and Transform stages within the single execution context of the compiler.
• In LTO compilation mode, every pass uses Generate summary and Write summary
stages at compilation time, while the Read summary, Execute, and Transform stages
are executed at link time.
• In WHOPR mode all stages are used.
To simplify development, the GCC pass manager differentiates between normal inter-
procedural passes (see Section 9.4.2 [Regular IPA passes], page 146), small inter-procedural
passes (see Section 9.4.1 [Small IPA passes], page 145) and late inter-procedural passes
(see Section 9.4.3 [Late IPA passes], page 148). A small or late IPA pass (SIMPLE_IPA_
PASS) does everything at once and thus cannot be executed during WPA in WHOPR
mode. It defines only the Execute stage and during this stage it accesses and modifies the
function bodies. Such passes are useful for optimization at LGEN or LTRANS time and are
used, for example, to implement early optimization before writing object files. The simple
inter-procedural passes can also be used for easier prototyping and development of a new
inter-procedural pass.
It is also possible to redirect any edge of the callgraph from a function to its virtual clone.
This implies updating of the call site to adjust for the new function signature.
Most of the transformations performed by inter-procedural optimizations can be repre-
sented via virtual clones. For instance, a constant propagation pass can produce a virtual
clone of the function which replaces one of its arguments by a constant. The inliner can
represent its decisions by producing a clone of a function whose body will be later integrated
into a given function.
Using virtual clones, the program can be easily updated during the Execute stage, solving
most of pass interactions problems that would otherwise occur during Transform.
Virtual clones are later materialized in the LTRANS stage and turned into real functions.
Passes executed after the virtual clone were introduced also perform their Transform stage
on new functions, so for a pass there is no significant difference between operating on a real
function or a virtual clone introduced before its Execute stage.
Optimization passes then work on virtual clones introduced before their Execute stage
as if they were real functions. The only difference is that clones are not visible during the
Generate Summary stage.
To keep function summaries updated, the callgraph interface allows an optimizer to regis-
ter a callback that is called every time a new clone is introduced as well as when the actual
function or variable is generated or when a function or variable is removed. These hooks
are registered in the Generate summary stage and allow the pass to keep its information
intact until the Execute stage. The same hooks can also be registered during the Execute
stage to keep the optimization summaries updated for the Transform stage.
To make the situation even more difficult, many applications organize themselves as a set
of shared libraries, and the default ELF visibility rules allow one to overwrite any externally
visible symbol with a different symbol at runtime. This basically disables any optimizations
across such functions and variables, because the compiler cannot be sure that the function
body it is seeing is the same function body that will be used at runtime. Any function
or variable not declared static in the sources degrades the quality of inter-procedural
optimization.
To avoid this problem the compiler must assume that it sees the whole program when
doing link-time optimization. Strictly speaking, the whole program is rarely visible even at
link-time. Standard system libraries are usually linked dynamically or not provided with
the link-time information. In GCC, the whole program option (-fwhole-program) asserts
that every function and variable defined in the current compilation unit is static, except
for function main (note: at link time, the current unit is the union of all objects compiled
with LTO). Since some functions and variables need to be referenced externally, for example
by another DSO or from an assembler file, GCC also provides the function and variable
attribute externally_visible which can be used to disable the effect of -fwhole-program
on a specific symbol.
The whole program mode assumptions are slightly more complex in C++, where inline
functions in headers are put into COMDAT sections. COMDAT function and variables can
be defined by multiple object files and their bodies are unified at link-time and dynamic
link-time. COMDAT functions are changed to local only when their address is not taken
and thus un-sharing them with a library is not harmful. COMDAT variables always remain
externally visible, however for readonly variables it is assumed that their initializers cannot
be overwritten by a different value.
GCC provides the function and variable attribute visibility that can be used to specify
the visibility of externally visible symbols (or alternatively an -fdefault-visibility com-
mand line option). ELF defines the default, protected, hidden and internal visibilities.
The most commonly used is visibility is hidden. It specifies that the symbol cannot
be referenced from outside of the current shared library. Unfortunately, this information
cannot be used directly by the link-time optimization in the compiler since the whole shared
library also might contain non-LTO objects and those are not visible to the compiler.
GCC solves this problem using linker plugins. A linker plugin is an interface to the linker
that allows an external program to claim the ownership of a given object file. The linker
then performs the linking procedure by querying the plugin about the symbol table of the
claimed objects and once the linking decisions are complete, the plugin is allowed to provide
the final object file before the actual linking is made. The linker plugin obtains the symbol
resolution information which specifies which symbols provided by the claimed objects are
bound from the rest of a binary being linked.
GCC is designed to be independent of the rest of the toolchain and aims to support linkers
without plugin support. For this reason it does not use the linker plugin by default. Instead,
the object files are examined by collect2 before being passed to the linker and objects
found to have LTO sections are passed to lto1 first. This mode does not work for library
archives. The decision on what object files from the archive are needed depends on the actual
linking and thus GCC would have to implement the linker itself. The resolution information
is missing too and thus GCC needs to make an educated guess based on -fwhole-program.
750 GNU Compiler Collection (GCC) Internals
Without the linker plugin GCC also assumes that symbols are declared hidden and not
referred by non-LTO code by default.
Here @0 captures the first operand of the trunc mod expression which is also predicated
with integer_zerop. Expression operands may be either expressions, predicates or cap-
tures. Captures can be unconstrained or capture expressions or predicates.
This example introduces an optional operand of simplify, the if-expression. This condition
is evaluated after the expression matched in the IL and is required to evaluate to true to
enable the replacement expression in the second operand position. The expression operand
of the if is a standard C expression which may contain references to captures. The if has
an optional third operand which may contain the replacement expression that is enabled
when the condition evaluates to false.
A if expression can be used to specify a common condition for multiple simplify patterns,
avoiding the need to repeat that multiple times:
(if (!TYPE_SATURATING (type)
&& !FLOAT_TYPE_P (type) && !FIXED_POINT_TYPE_P (type))
(simplify
(minus (plus @0 @1) @0)
@1)
(simplify
(minus (minus @0 @1) @0)
(negate @1)))
Note that ifs in outer position do not have the optional else clause but instead have
multiple then clauses.
Ifs can be nested.
There exists a switch expression which can be used to chain conditions avoiding nesting
ifs too much:
(simplify
(simple_comparison @0 REAL_CST@1)
(switch
/* a CMP (-0) -> a CMP 0 */
(if (REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (@1)))
(cmp @0 { build_real (TREE_TYPE (@1), dconst0); }))
/* x != NaN is always true, other ops are always false. */
(if (REAL_VALUE_ISNAN (TREE_REAL_CST (@1))
&& ! HONOR_SNANS (@1))
{ constant_boolean_node (cmp == NE_EXPR, type); })))
Is equal to
(simplify
(simple_comparison @0 REAL_CST@1)
(switch
/* a CMP (-0) -> a CMP 0 */
(if (REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (@1)))
(cmp @0 { build_real (TREE_TYPE (@1), dconst0); })
/* x != NaN is always true, other ops are always false. */
(if (REAL_VALUE_ISNAN (TREE_REAL_CST (@1))
&& ! HONOR_SNANS (@1))
{ constant_boolean_node (cmp == NE_EXPR, type); }))))
which has the second if in the else operand of the first. The switch expression takes
if expressions as operands (which may not have else clauses) and as a last operand a
replacement expression which should be enabled by default if no other condition evaluated
to true.
Captures can also be used for capturing results of sub-expressions.
#if GIMPLE
754 GNU Compiler Collection (GCC) Internals
(simplify
(pointer_plus (addr@2 @0) INTEGER_CST_P@1)
(if (is_gimple_min_invariant (@2)))
{
poly_int64 off;
tree base = get_addr_base_and_unit_offset (@0, &off);
off += tree_to_uhwi (@1);
/* Now with that we should be able to simply write
(addr (mem_ref (addr @base) (plus @off @1))) */
build1 (ADDR_EXPR, type,
build2 (MEM_REF, TREE_TYPE (TREE_TYPE (@2)),
build_fold_addr_expr (base),
build_int_cst (ptr_type_node, off)));
})
#endif
In the above example, @2 captures the result of the expression (addr @0). For the out-
ermost expression only its type can be captured, and the keyword type is reserved for this
purpose. The above example also gives a way to conditionalize patterns to only apply to
GIMPLE or GENERIC by means of using the pre-defined preprocessor macros GIMPLE and
GENERIC and using preprocessor directives.
(simplify
(bit_and:c integral_op_p@0 (bit_ior:c (bit_not @0) @1))
(bit_and @1 @0))
Here we introduce flags on match expressions. The flag used above, c, denotes that the
expression should be also matched commutated. Thus the above match expression is really
the following four match expressions:
(bit_and integral_op_p@0 (bit_ior (bit_not @0) @1))
(bit_and (bit_ior (bit_not @0) @1) integral_op_p@0)
(bit_and integral_op_p@0 (bit_ior @1 (bit_not @0)))
(bit_and (bit_ior @1 (bit_not @0)) integral_op_p@0)
Usual canonicalizations you know from GENERIC expressions are applied before match-
ing, so for example constant operands always come second in commutative expressions.
The second supported flag is s which tells the code generator to fail the pattern if the
expression marked with s does have more than one use and the simplification results in an
expression with more than one operator. For example in
(simplify
(pointer_plus (pointer_plus:s @0 @1) @3)
(pointer_plus @0 (plus @1 @3)))
this avoids the association if (pointer_plus @0 @1) is used outside of the matched ex-
pression and thus it would stay live and not trivially removed by dead code elimination.
Now consider ((x + 3) + -3) with the temporary holding (x + 3) used elsewhere. This
simplifies down to x which is desirable and thus flagging with s does not prevent the trans-
form. Now consider ((x + 3) + 1) which simplifies to (x + 4). Despite being flagged with
s the simplification will be performed. The simplification of ((x + a) + 1) to (x + (a + 1))
will not performed in this case though.
More features exist to avoid too much repetition.
(for op (plus pointer_plus minus bit_ior bit_xor)
(simplify
(op @0 integer_zerop)
@0))
Chapter 26: Match and Simplify 755
A for expression can be used to repeat a pattern for each operator specified, substituting
op. for can be nested and a for can have multiple operators to iterate.
(for opa (plus minus)
opb (minus plus)
(for opc (plus minus)
(simplify...
In this example the pattern will be repeated four times with opa, opb, opc being plus,
minus, plus; plus, minus, minus; minus, plus, plus; minus, plus, minus.
To avoid repeating operator lists in for you can name them via
(define_operator_list pmm plus minus mult)
and use them in for operator lists where they get expanded.
(for opa (pmm trunc_div)
(simplify...
So this example iterates over plus, minus, mult and trunc_div.
Using operator lists can also remove the need to explicitly write a for. All operator list
uses that appear in a simplify or match pattern in operator positions will implicitly be
added to a new for. For example
(define_operator_list SQRT BUILT_IN_SQRTF BUILT_IN_SQRT BUILT_IN_SQRTL)
(define_operator_list POW BUILT_IN_POWF BUILT_IN_POW BUILT_IN_POWL)
(simplify
(SQRT (POW @0 @1))
(POW (abs @0) (mult @1 { built_real (TREE_TYPE (@1), dconsthalf); })))
is the same as
(for SQRT (BUILT_IN_SQRTF BUILT_IN_SQRT BUILT_IN_SQRTL)
POW (BUILT_IN_POWF BUILT_IN_POW BUILT_IN_POWL)
(simplify
(SQRT (POW @0 @1))
(POW (abs @0) (mult @1 { built_real (TREE_TYPE (@1), dconsthalf); }))))
fors and operator lists can include the special identifier null that matches nothing and
can never be generated. This can be used to pad an operator list so that it has a standard
form, even if there isn’t a suitable operator for every form.
Another building block are with expressions in the result expression which nest the
generated code in a new C block followed by its argument:
(simplify
(convert (mult @0 @1))
(with { tree utype = unsigned_type_for (type); }
(convert (mult (convert:utype @0) (convert:utype @1)))))
This allows code nested in the with to refer to the declared variables. In the above case
we use the feature to specify the type of a generated expression with the :type syntax
where type needs to be an identifier that refers to the desired type. Usually the types of
the generated result expressions are determined from the context, but sometimes like in the
above case it is required that you specify them explicitly.
Another modifier for generated expressions is ! which tells the machinery to only consider
the simplification in case the marked expression simplified to a simple operand. Consider
for example
(simplify
(plus (vec_cond:s @0 @1 @2) @3)
(vec_cond @0 (plus! @1 @3) (plus! @2 @3)))
756 GNU Compiler Collection (GCC) Internals
which moves the outer plus operation to the inner arms of the vec_cond expression but
only if the actual plus operations both simplify. Note that on GENERIC a simple operand
means that the result satisfies !EXPR_P which can be limiting if the operation itself simplifies
but the remaining operand is an (unrelated) expression.
As intermediate conversions are often optional there is a way to avoid the need to repeat
patterns both with and without such conversions. Namely you can mark a conversion as
being optional with a ?:
(simplify
(eq (convert@0 @1) (convert? @2))
(eq @1 (convert @2)))
which will match both (eq (convert @1) (convert @2)) and (eq (convert @1) @2).
The optional converts are supposed to be all either present or not, thus (eq (convert?
@1) (convert? @2)) will result in two patterns only. If you want to match all four combi-
nations you have access to two additional conditional converts as in (eq (convert1? @1)
(convert2? @2)).
The support for ? marking extends to all unary operations including predicates you
declare yourself with match.
Predicates available from the GCC middle-end need to be made available explicitly via
define_predicates:
(define_predicates
integer_onep integer_zerop integer_all_onesp)
You can also define predicates using the pattern matching language and the match form:
(match negate_expr_p
INTEGER_CST
(if (TYPE_OVERFLOW_WRAPS (type)
|| may_negate_without_overflow_p (t))))
(match negate_expr_p
(negate @0))
This shows that for match expressions there is t available which captures the outermost
expression (something not possible in the simplify context). As you can see match has
an identifier as first operand which is how you refer to the predicate in patterns. Multiple
match for the same identifier add additional cases where the predicate matches.
Predicates can also match an expression in which case you need to provide a template
specifying the identifier and where to get its operands from:
(match (logical_inverted_value @0)
(eq @0 integer_zerop))
(match (logical_inverted_value @0)
(bit_not truth_valued_p@0))
You can use the above predicate like
(simplify
(bit_and @0 (logical_inverted_value @0))
{ build_zero_cst (type); })
Which will match a bitwise and of an operand with its logical inverted value.
757
27 Static Analyzer
Program points in the analysis are much more fine-grained than in the CFG and su-
pergraph, with points (and thus potentially exploded nodes) for various events, including
before individual statements. By default the exploded graph merges multiple consecutive
statements in a supernode into one exploded edge to minimize the size of the exploded
graph. This can be suppressed via -fanalyzer-fine-grained. The fine-grained approach
seems to make things simpler and more debuggable that other approaches I tried, in that
each point is responsible for one thing.
Program points in the analysis also have a "call string" identifying the stack of callsites
below them, so that paths in the exploded graph correspond to interprocedurally valid paths:
we always return to the correct call site, propagating state information accordingly. We
avoid infinite recursion by stopping the analysis if a callsite appears more than analyzer-
max-recursion-depth in a callstring (defaulting to 2).
27.1.2 Graphs
Nodes and edges in the exploded graph are called “exploded nodes” and “exploded edges”
and often referred to in the code as enodes and eedges (especially when distinguishing
them from the snodes and sedges in the supergraph).
Each graph numbers its nodes, giving unique identifiers - supernodes are referred to
throughout dumps in the form ‘SN': index’ and exploded nodes in the form ‘EN: index’
(e.g. ‘SN: 2’ and ‘EN:29’).
The supergraph can be seen using -fdump-analyzer-supergraph-graph.
The exploded graph can be seen using -fdump-analyzer-exploded-graph and other
dump options. Exploded nodes are color-coded in the .dot output based on state-machine
states to make it easier to see state changes at a glance.
1:A
/ \
/ \
/ \
Chapter 27: Static Analyzer 759
2:B 3:C
| |
4:D 5:D (2 exploded nodes for D)
/ \ / \
6:E 7:F 8:E 9:F
| | | |
10:G 11:G 12:G 13:G (4 exploded nodes for G)
if (condition)
free (ptr);
...etc
then we end up with an exploded graph that looks like this:
if (condition)
/ T \ F
--------- ----------
/ \
ptr = malloc (size) ptr = local_buf
| |
copy of copy of
"do things with 'ptr'" "do things with 'ptr'"
with ptr: heap-allocated with ptr: stack-allocated
| |
760 GNU Compiler Collection (GCC) Internals
if (condition) if (condition)
| known to be T | known to be F
free (ptr); |
\ /
-----------------------------
| ('ptr' is pruned, so states can be merged)
etc
where some duplication has occurred, but only for the places where the the different
paths are worth exploringly separately.
Merging can be disabled via -fno-analyzer-state-merge.
/* etc. */
}
Within the store, there is the cluster for ptr_3 within the frame for test, where the whole
cluster is bound to a pointer value, pointing at HEAP_ALLOCATED_REGION(12). Additionally,
this pointer has the unchecked state for the malloc state machine indicating it hasn’t yet
been checked against NULL since the allocation call.
27.1.6 Limitations
• Only for C so far
• The implementation of call summaries is currently very simplistic.
• Lack of function pointer analysis
• The constraint-handling code assumes reflexivity in some places (that values are equal
to themselves), which is not the case for NaN. As a simple workaround, constraints on
floating-point values are currently ignored.
• There are various other limitations in the region model (grep for TODO/xfail in the
testsuite).
• The constraint manager’s implementation of transitivity is currently too expensive to
enable by default and so must be manually enabled via -fanalyzer-transitivity).
• The checkers are currently hardcoded and don’t allow for user extensibility (e.g. adding
allocate/release pairs).
• Although the analyzer’s test suite has a proof-of-concept test case for LTO, LTO sup-
port hasn’t had extensive testing. There are various lang-specific things in the analyzer
that assume C rather than LTO. For example, SSA names are printed to the user in
“raw” form, rather than printing the underlying variable name.
-wrapper gdb,--args \
-fdump-analyzer-stderr \
-fanalyzer-fine-grained \
-fdump-ipa-analyzer=stderr
where:
• ./xgcc -B. is the usual way to invoke a self-built GCC from within the BUILDDIR/gcc
subdirectory.
• -S so that the driver (./xgcc) invokes cc1, but doesn’t bother running the assembler
or linker (since the analyzer runs inside cc1).
• -fanalyzer enables the analyzer, obviously.
• -wrapper gdb,--args invokes cc1 under the debugger so that I can debug cc1 and
set breakpoints and step through things.
• -fdump-analyzer-stderr so that the logging interface is enabled and goes to stderr,
which often gives valuable context into what’s happening when stepping through the
analyzer
• -fanalyzer-fine-grained which splits the effect of every statement into its own ex-
ploded node, rather than the default (which tries to combine successive stmts to reduce
the size of the exploded graph). This makes it easier to see exactly where a particular
change happens.
• -fdump-ipa-analyzer=stderr which dumps the GIMPLE IR seen by the analyzer
pass to stderr
Other useful options:
• -fdump-analyzer-exploded-graph which dumps a SRC.eg.dot GraphViz file that I
can look at (with python-xdot)
• -fdump-analyzer-exploded-nodes-2 which dumps a SRC.eg.txt file containing the
full exploded_graph.
Assuming that you have the python support scripts for gdb installed (which you should
do, it makes debugging GCC much easier), you can use:
(gdb) break-on-saved-diagnostic
to put a breakpoint at the place where a diagnostic is saved during exploded_graph
exploration, to see where a particular diagnostic is being saved, and:
(gdb) break-on-diagnostic
to put a breakpoint at the place where diagnostics are actually emitted.
to the source being analyzed to trigger a breakpoint in the analyzer when that
source is reached. By putting a series of these in the source, it’s much easier to
effectively step through the program state as it’s analyzed.
__analyzer_describe
The analyzer handles:
__analyzer_describe (0, expr);
by emitting a warning describing the 2nd argument (which can be of any type),
at a verbosity level given by the 1st argument. This is for use when debugging,
and may be of use in DejaGnu tests.
__analyzer_dump
__analyzer_dump ();
will dump the copious information about the analyzer’s state each time it
reaches the call in its traversal of the source.
__analyzer_dump_capacity
extern void __analyzer_dump_capacity (const void *ptr);
will emit a warning describing the capacity of the base region of the region
pointed to by the 1st argument.
__analyzer_dump_escaped
extern void __analyzer_dump_escaped (void);
will emit a warning giving the number of decls that have escaped on this analysis
path, followed by a comma-separated list of their names, in alphabetical order.
__analyzer_dump_path
__analyzer_dump_path ();
will emit a placeholder “note” diagnostic with a path to that call site, if the
analyzer finds a feasible path to it. This can be useful for writing DejaGnu
tests for constraint-tracking and feasibility checking.
__analyzer_dump_exploded_nodes
For every callsite to __analyzer_dump_exploded_nodes the analyzer will emit
a warning after it finished the analysis containing information on all of the
exploded nodes at that program point.
__analyzer_dump_exploded_nodes (0);
will output the number of “processed” nodes, and the IDs of both “processed”
and “merger” nodes, such as:
warning: 2 processed enodes: [EN: 56, EN: 58] merger(s): [EN: 54-55, EN: 57, EN: 59]
With a non-zero argument
__analyzer_dump_exploded_nodes (1);
it will also dump all of the states within the “processed” nodes.
__analyzer_dump_named_constant
When the analyzer sees a call to __analyzer_dump_named_constant it will
emit a warning describing what is known about the value of a given named
constant, for parts of the analyzer that interact with target headers.
For example:
__analyzer_dump_named_constant ("O_RDONLY");
Chapter 27: Static Analyzer 765
__analyzer_dump_region_model
__analyzer_dump_region_model ();
will dump the region model’s state to stderr.
__analyzer_dump_state
__analyzer_dump_state ("malloc", ptr);
will emit a warning describing the state of the 2nd argument (which can be
of any type) with respect to the state machine with a name matching the 1st
argument (which must be a string literal). This is for use when debugging, and
may be of use in DejaGnu tests.
__analyzer_eval
__analyzer_eval (expr);
will emit a warning with text "TRUE", FALSE" or "UNKNOWN" based on
the truthfulness of the argument. This is useful for writing DejaGnu tests.
__analyzer_get_unknown_ptr
__analyzer_get_unknown_ptr ();
will obtain an unknown void *.
__analyzer_get_strlen
__analyzer_get_strlen (buf);
will emit a warning if PTR doesn’t point to a null-terminated string. TODO:
eventually get the strlen of the buffer (without the optimizer touching it).
A good diagnostic provides pertinent information to allow the user to easily answer the
above questions.
| caret
start
Tokens coming out of libcpp have locations of the form caret == start, such as for foo
here:
a = foo && bar;
^~~
| |
| finish
caret == start
Compound expressions should be reported using the location of the expression as a whole,
rather than just of one token within it.
For example, in -Wformat, rather than underlining just the first token of a bad argument:
printf("hello %i %s", (long)0, "world");
~^ ~
%li
the whole of the expression should be underlined, so that the user can easily identify what
is being referred to:
printf("hello %i %s", (long)0, "world");
~^ ~~~~~~~
%li
Avoid using the input_location global, and the diagnostic functions that implicitly use
it—use error_at and warning_at rather than error and warning, and provide the most
appropriate location_t value available at that phase of the compilation. It’s possible to
supply secondary location_t values via rich_location.
For example, in the example of imprecise wording above, generating the diagnostic using
warning:
// BAD: implicitly uses input_location
warning (OPT_Wattributes, "%qE attribute ignored", name);
leads to:
// BAD: uses input_location
demo.c:1:1: warning: 'noinline' attribute ignored [-Wattributes]
1 | int foo __attribute__((noinline));
| ^~~
which thus happened to use the location of the int token, rather than that of the at-
tribute. Using warning_at with the location of the attribute, providing the location of the
declaration in question as a secondary location, and adding a note:
auto_diagnostic_group d;
gcc_rich_location richloc (attrib_loc);
richloc.add_range (decl_loc);
if (warning_at (OPT_Wattributes, &richloc,
"attribute %qE on variable %qE was ignored", name))
inform (attrib_loc, "attribute %qE is only applicable to functions");
would lead to:
// OK: use location of attribute, with a secondary location
demo.c:1:24: warning: attribute 'noinline' on variable 'foo' was
ignored [-Wattributes]
1 | int foo __attribute__((noinline));
| ~~~ ~~~~~~~~~~~~~~~^~~~~~~~~
demo.c:1:24: note: attribute 'noinline' is only applicable to functions
Chapter 28: User Experience Guidelines 771
28.1.11 Quoting
Text should be quoted by either using the ‘q’ modifier in a directive such as ‘%qE’, or by
enclosing the quoted text in a pair of ‘%<’ and ‘%>’ directives, and never by using explicit
quote characters. The directives handle the appropriate quote characters for each language
and apply the correct color or highlighting.
The following elements should be quoted in GCC diagnostics:
• Language keywords.
• Tokens.
• Boolean, numerical, character, and string constants that appear in the source code.
• Identifiers, including function, macro, type, and variable names.
Other elements such as numbers that do not refer to numeric constants that appear in
the source code should not be quoted. For example, in the message:
argument %d of %qE must be a pointer type
since the argument number does not refer to a numerical constant in the source code it
should not be quoted.
772 GNU Compiler Collection (GCC) Internals
int fn ()
{
return std::move (CONFIGURY_GLOBAL /* some comment */);
}
The above implementation erroneously strips out the macro and the comment in the fix-it
hint:
return std::move (CONFIGURY_GLOBAL /* some comment */);
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
global_a
and thus this resulting code:
return global_a;
It’s better to do deletions in terms of deletions; deleting the std::move ( and the trailing
close-paren, leading to this:
return std::move (CONFIGURY_GLOBAL /* some comment */);
774 GNU Compiler Collection (GCC) Internals
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIGURY_GLOBAL /* some comment */
and thus this result:
return CONFIGURY_GLOBAL /* some comment */;
Unfortunately, the pertinent location_t values are not always available.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of
works.
The licenses for most software and other practical works are designed to take away your
freedom to share and change the works. By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change all versions of a program–to make
sure it remains free software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to any other work
released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General
Public Licenses are designed to make sure that you have the freedom to distribute copies
of free software (and charge for them if you wish), that you receive source code or can get
it if you want it, that you can change the software or use pieces of it in new free programs,
and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking
you to surrender the rights. Therefore, you have certain responsibilities if you distribute
copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you
must pass on to the recipients the same freedoms that you received. You must make sure
that they, too, receive or can get the source code. And you must show them these terms so
they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright
on the software, and (2) offer you this License giving you legal permission to copy, distribute
and/or modify it.
For the developers’ and authors’ protection, the GPL clearly explains that there is no
warranty for this free software. For both users’ and authors’ sake, the GPL requires that
modified versions be marked as changed, so that their problems will not be attributed
erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the
software inside them, although the manufacturer can do so. This is fundamentally incom-
patible with the aim of protecting users’ freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to use, which is pre-
cisely where it is most unacceptable. Therefore, we have designed this version of the GPL
to prohibit the practice for those products. If such problems arise substantially in other
domains, we stand ready to extend this provision to those domains in future versions of the
GPL, as needed to protect the freedom of users.
780 GNU Compiler Collection (GCC) Internals
Finally, every program is threatened constantly by software patents. States should not
allow patents to restrict development and use of software on general-purpose computers, but
in those that do, we wish to avoid the special danger that patents applied to a free program
could make it effectively proprietary. To prevent this, the GPL assures that patents cannot
be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
The “System Libraries” of an executable work include anything, other than the work as
a whole, that (a) is included in the normal form of packaging a Major Component, but
which is not part of that Major Component, and (b) serves only to enable use of the
work with that Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A “Major Component”,
in this context, means a major essential component (kernel, window system, and so
on) of the specific operating system (if any) on which the executable work runs, or a
compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code
needed to generate, install, and (for an executable work) run the object code and to
modify the work, including scripts to control those activities. However, it does not
include the work’s System Libraries, or general-purpose tools or generally available
free programs which are used unmodified in performing those activities but which are
not part of the work. For example, Corresponding Source includes interface definition
files associated with source files for the work, and the source code for shared libraries
and dynamically linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those subprograms
and other parts of the work.
The Corresponding Source need not include anything that users can regenerate auto-
matically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the
Program, and are irrevocable provided the stated conditions are met. This License ex-
plicitly affirms your unlimited permission to run the unmodified Program. The output
from running a covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your rights of fair use
or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without
conditions so long as your license otherwise remains in force. You may convey covered
works to others for the sole purpose of having them make modifications exclusively
for you, or provide you with facilities for running those works, provided that you
comply with the terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for you must do
so exclusively on your behalf, under your direction and control, on terms that prohibit
them from making any copies of your copyrighted material outside their relationship
with you.
Conveying under any other circumstances is permitted solely under the conditions
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users’ Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under
any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty
adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention
of such measures.
782 GNU Compiler Collection (GCC) Internals
When you convey a covered work, you waive any legal power to forbid circumvention of
technological measures to the extent such circumvention is effected by exercising rights
under this License with respect to the covered work, and you disclaim any intention
to limit operation or modification of the work as a means of enforcing, against the
work’s users, your or third parties’ legal rights to forbid circumvention of technological
measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program’s source code as you receive it, in any
medium, provided that you conspicuously and appropriately publish on each copy an
appropriate copyright notice; keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code; keep intact all
notices of the absence of any warranty; and give all recipients a copy of this License
along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer
support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from
the Program, in the form of source code under the terms of section 4, provided that
you also meet all of these conditions:
a. The work must carry prominent notices stating that you modified it, and giving a
relevant date.
b. The work must carry prominent notices stating that it is released under this Li-
cense and any conditions added under section 7. This requirement modifies the
requirement in section 4 to “keep intact all notices”.
c. You must license the entire work, as a whole, under this License to anyone who
comes into possession of a copy. This License will therefore apply, along with any
applicable section 7 additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no permission to license
the work in any other way, but it does not invalidate such permission if you have
separately received it.
d. If the work has interactive user interfaces, each must display Appropriate Legal
Notices; however, if the Program has interactive interfaces that do not display
Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which
are not by their nature extensions of the covered work, and which are not combined
with it such as to form a larger program, in or on a volume of a storage or distribution
medium, is called an “aggregate” if the compilation and its resulting copyright are
not used to limit the access or legal rights of the compilation’s users beyond what the
individual works permit. Inclusion of a covered work in an aggregate does not cause
this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and
5, provided that you also convey the machine-readable Corresponding Source under
the terms of this License, in one of these ways:
GNU General Public License 783
a. Convey the object code in, or embodied in, a physical product (including a phys-
ical distribution medium), accompanied by the Corresponding Source fixed on a
durable physical medium customarily used for software interchange.
b. Convey the object code in, or embodied in, a physical product (including a physi-
cal distribution medium), accompanied by a written offer, valid for at least three
years and valid for as long as you offer spare parts or customer support for that
product model, to give anyone who possesses the object code either (1) a copy of
the Corresponding Source for all the software in the product that is covered by this
License, on a durable physical medium customarily used for software interchange,
for a price no more than your reasonable cost of physically performing this con-
veying of source, or (2) access to copy the Corresponding Source from a network
server at no charge.
c. Convey individual copies of the object code with a copy of the written offer to
provide the Corresponding Source. This alternative is allowed only occasionally
and noncommercially, and only if you received the object code with such an offer,
in accord with subsection 6b.
d. Convey the object code by offering access from a designated place (gratis or for
a charge), and offer equivalent access to the Corresponding Source in the same
way through the same place at no further charge. You need not require recipients
to copy the Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source may be on
a different server (operated by you or a third party) that supports equivalent
copying facilities, provided you maintain clear directions next to the object code
saying where to find the Corresponding Source. Regardless of what server hosts
the Corresponding Source, you remain obligated to ensure that it is available for
as long as needed to satisfy these requirements.
e. Convey the object code using peer-to-peer transmission, provided you inform other
peers where the object code and Corresponding Source of the work are being offered
to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Cor-
responding Source as a System Library, need not be included in conveying the object
code work.
A “User Product” is either (1) a “consumer product”, which means any tangible per-
sonal property which is normally used for personal, family, or household purposes, or
(2) anything designed or sold for incorporation into a dwelling. In determining whether
a product is a consumer product, doubtful cases shall be resolved in favor of coverage.
For a particular product received by a particular user, “normally used” refers to a
typical or common use of that class of product, regardless of the status of the par-
ticular user or of the way in which the particular user actually uses, or expects or is
expected to use, the product. A product is a consumer product regardless of whether
the product has substantial commercial, industrial or non-consumer uses, unless such
uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, autho-
rization keys, or other information required to install and execute modified versions of a
covered work in that User Product from a modified version of its Corresponding Source.
784 GNU Compiler Collection (GCC) Internals
The information must suffice to ensure that the continued functioning of the modified
object code is in no case prevented or interfered with solely because modification has
been made.
If you convey an object code work under this section in, or with, or specifically for
use in, a User Product, and the conveying occurs as part of a transaction in which
the right of possession and use of the User Product is transferred to the recipient in
perpetuity or for a fixed term (regardless of how the transaction is characterized),
the Corresponding Source conveyed under this section must be accompanied by the
Installation Information. But this requirement does not apply if neither you nor any
third party retains the ability to install modified object code on the User Product (for
example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement
to continue to provide support service, warranty, or updates for a work that has been
modified or installed by the recipient, or for the User Product in which it has been
modified or installed. Access to a network may be denied when the modification itself
materially and adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with
this section must be in a format that is publicly documented (and with an implementa-
tion available to the public in source code form), and must require no special password
or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by mak-
ing exceptions from one or more of its conditions. Additional permissions that are
applicable to the entire Program shall be treated as though they were included in this
License, to the extent that they are valid under applicable law. If additional permis-
sions apply only to part of the Program, that part may be used separately under those
permissions, but the entire Program remains governed by this License without regard
to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any
additional permissions from that copy, or from any part of it. (Additional permissions
may be written to require their own removal in certain cases when you modify the
work.) You may place additional permissions on material, added by you to a covered
work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered
work, you may (if authorized by the copyright holders of that material) supplement
the terms of this License with terms:
a. Disclaiming warranty or limiting liability differently from the terms of sections 15
and 16 of this License; or
b. Requiring preservation of specified reasonable legal notices or author attributions
in that material or in the Appropriate Legal Notices displayed by works containing
it; or
c. Prohibiting misrepresentation of the origin of that material, or requiring that mod-
ified versions of such material be marked in reasonable ways as different from the
original version; or
GNU General Public License 785
d. Limiting the use for publicity purposes of names of licensors or authors of the
material; or
e. Declining to grant rights under trademark law for use of some trade names, trade-
marks, or service marks; or
f. Requiring indemnification of licensors and authors of that material by anyone who
conveys the material (or modified versions of it) with contractual assumptions
of liability to the recipient, for any liability that these contractual assumptions
directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within
the meaning of section 10. If the Program as you received it, or any part of it, con-
tains a notice stating that it is governed by this License along with a term that is a
further restriction, you may remove that term. If a license document contains a further
restriction but permits relicensing or conveying under this License, you may add to a
covered work material governed by the terms of that license document, provided that
the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the
relevant source files, a statement of the additional terms that apply to those files, or a
notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a sep-
arately written license, or stated as exceptions; the above requirements apply either
way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided un-
der this License. Any attempt otherwise to propagate or modify it is void, and will
automatically terminate your rights under this License (including any patent licenses
granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular
copyright holder is reinstated (a) provisionally, unless and until the copyright holder
explicitly and finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means prior to 60 days
after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if
the copyright holder notifies you of the violation by some reasonable means, this is the
first time you have received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after your receipt of the
notice.
Termination of your rights under this section does not terminate the licenses of parties
who have received copies or rights from you under this License. If your rights have
been terminated and not permanently reinstated, you do not qualify to receive new
licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the
Program. Ancillary propagation of a covered work occurring solely as a consequence of
using peer-to-peer transmission to receive a copy likewise does not require acceptance.
786 GNU Compiler Collection (GCC) Internals
However, nothing other than this License grants you permission to propagate or modify
any covered work. These actions infringe copyright if you do not accept this License.
Therefore, by modifying or propagating a covered work, you indicate your acceptance
of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license
from the original licensors, to run, modify and propagate that work, subject to this
License. You are not responsible for enforcing compliance by third parties with this
License.
An “entity transaction” is a transaction transferring control of an organization, or
substantially all assets of one, or subdividing an organization, or merging organizations.
If propagation of a covered work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever licenses to the work
the party’s predecessor in interest had or could give under the previous paragraph, plus
a right to possession of the Corresponding Source of the work from the predecessor in
interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or
affirmed under this License. For example, you may not impose a license fee, royalty, or
other charge for exercise of rights granted under this License, and you may not initiate
litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent
claim is infringed by making, using, selling, offering for sale, or importing the Program
or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the
Program or a work on which the Program is based. The work thus licensed is called
the contributor’s “contributor version”.
A contributor’s “essential patent claims” are all patent claims owned or controlled by
the contributor, whether already acquired or hereafter acquired, that would be infringed
by some manner, permitted by this License, of making, using, or selling its contributor
version, but do not include claims that would be infringed only as a consequence of
further modification of the contributor version. For purposes of this definition, “con-
trol” includes the right to grant patent sublicenses in a manner consistent with the
requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license
under the contributor’s essential patent claims, to make, use, sell, offer for sale, import
and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or com-
mitment, however denominated, not to enforce a patent (such as an express permission
to practice a patent or covenant not to sue for patent infringement). To “grant” such
a patent license to a party means to make such an agreement or commitment not to
enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corre-
sponding Source of the work is not available for anyone to copy, free of charge and under
the terms of this License, through a publicly available network server or other readily
accessible means, then you must either (1) cause the Corresponding Source to be so
GNU General Public License 787
available, or (2) arrange to deprive yourself of the benefit of the patent license for this
particular work, or (3) arrange, in a manner consistent with the requirements of this
License, to extend the patent license to downstream recipients. “Knowingly relying”
means you have actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient’s use of the covered work in a country,
would infringe one or more identifiable patents in that country that you have reason
to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey,
or propagate by procuring conveyance of, a covered work, and grant a patent license
to some of the parties receiving the covered work authorizing them to use, propagate,
modify or convey a specific copy of the covered work, then the patent license you grant
is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its cover-
age, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the
rights that are specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is in the business of
distributing software, under which you make payment to the third party based on the
extent of your activity of conveying the work, and under which the third party grants,
to any of the parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work conveyed by you (or
copies made from those copies), or (b) primarily for and in connection with specific
products or compilations that contain the covered work, unless you entered into that
arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or
other defenses to infringement that may otherwise be available to you under applicable
patent law.
12. No Surrender of Others’ Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that
contradict the conditions of this License, they do not excuse you from the conditions
of this License. If you cannot convey a covered work so as to satisfy simultaneously
your obligations under this License and any other pertinent obligations, then as a
consequence you may not convey it at all. For example, if you agree to terms that
obligate you to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this License would
be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or
combine any covered work with a work licensed under version 3 of the GNU Affero
General Public License into a single combined work, and to convey the resulting work.
The terms of this License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License, section 13,
concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
788 GNU Compiler Collection (GCC) Internals
The Free Software Foundation may publish revised and/or new versions of the GNU
General Public License from time to time. Such new versions will be similar in spirit
to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that
a certain numbered version of the GNU General Public License “or any later version”
applies to it, you have the option of following the terms and conditions either of that
numbered version or of any later version published by the Free Software Foundation.
If the Program does not specify a version number of the GNU General Public License,
you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU
General Public License can be used, that proxy’s public statement of acceptance of a
version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no
additional obligations are imposed on any author or copyright holder as a result of your
choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PER-
MITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN
WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE
THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EX-
PRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFEC-
TIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO
MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, IN-
CIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUS-
TAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAM-
AGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given
local legal effect according to their terms, reviewing courts shall apply local law that
most closely approximates an absolute waiver of all civil liability in connection with
the Program, unless a warranty or assumption of liability accompanies a copy of the
Program in return for a fee.
GNU General Public License 789
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it
starts in an interactive mode:
program Copyright (C) year name of author
This program comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’.
This is free software, and you are welcome to redistribute it
under certain conditions; type ‘show c’ for details.
The hypothetical commands ‘show w’ and ‘show c’ should show the appropriate parts of
the General Public License. Of course, your program’s commands might be different; for a
GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to
sign a “copyright disclaimer” for the program, if necessary. For more information on this,
and how to apply and follow the GNU GPL, see https://www.gnu.org/licenses/.
The GNU General Public License does not permit incorporating your program into pro-
prietary programs. If your program is a subroutine library, you may consider it more useful
to permit linking proprietary applications with the library. If this is what you want to do,
use the GNU Lesser General Public License instead of this License. But first, please read
https://www.gnu.org/licenses/why-not-lgpl.html.
791
under this License. If a section does not fit the above definition of Secondary then it is
not allowed to be designated as Invariant. The Document may contain zero Invariant
Sections. If the Document does not identify any Invariant Sections then there are none.
The “Cover Texts” are certain short passages of text that are listed, as Front-Cover
Texts or Back-Cover Texts, in the notice that says that the Document is released under
this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may
be at most 25 words.
A “Transparent” copy of the Document means a machine-readable copy, represented
in a format whose specification is available to the general public, that is suitable for
revising the document straightforwardly with generic text editors or (for images com-
posed of pixels) generic paint programs or (for drawings) some widely available drawing
editor, and that is suitable for input to text formatters or for automatic translation to
a variety of formats suitable for input to text formatters. A copy made in an otherwise
Transparent file format whose markup, or absence of markup, has been arranged to
thwart or discourage subsequent modification by readers is not Transparent. An image
format is not Transparent if used for any substantial amount of text. A copy that is
not “Transparent” is called “Opaque”.
Examples of suitable formats for Transparent copies include plain ascii without
markup, Texinfo input format, LaTEX input format, SGML or XML using a publicly
available DTD, and standard-conforming simple HTML, PostScript or PDF designed
for human modification. Examples of transparent image formats include PNG, XCF
and JPG. Opaque formats include proprietary formats that can be read and edited
only by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the machine-generated HTML,
PostScript or PDF produced by some word processors for output purposes only.
The “Title Page” means, for a printed book, the title page itself, plus such following
pages as are needed to hold, legibly, the material this License requires to appear in the
title page. For works in formats which do not have any title page as such, “Title Page”
means the text near the most prominent appearance of the work’s title, preceding the
beginning of the body of the text.
The “publisher” means any person or entity that distributes copies of the Document
to the public.
A section “Entitled XYZ” means a named subunit of the Document whose title either
is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in
another language. (Here XYZ stands for a specific section name mentioned below, such
as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve
the Title” of such a section when you modify the Document means that it remains a
section “Entitled XYZ” according to this definition.
The Document may include Warranty Disclaimers next to the notice which states that
this License applies to the Document. These Warranty Disclaimers are considered to
be included by reference in this License, but only as regards disclaiming warranties:
any other implication that these Warranty Disclaimers may have is void and has no
effect on the meaning of this License.
2. VERBATIM COPYING
GNU Free Documentation License 793
You may copy and distribute the Document in any medium, either commercially or
noncommercially, provided that this License, the copyright notices, and the license
notice saying this License applies to the Document are reproduced in all copies, and
that you add no other conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further copying of the copies
you make or distribute. However, you may accept compensation in exchange for copies.
If you distribute a large enough number of copies you must also follow the conditions
in section 3.
You may also lend copies, under the same conditions stated above, and you may publicly
display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printed covers) of
the Document, numbering more than 100, and the Document’s license notice requires
Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all
these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify you as the publisher
of these copies. The front cover must present the full title with all words of the title
equally prominent and visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve the title of the
Document and satisfy these conditions, can be treated as verbatim copying in other
respects.
If the required texts for either cover are too voluminous to fit legibly, you should put
the first ones listed (as many as fit reasonably) on the actual cover, and continue the
rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100,
you must either include a machine-readable Transparent copy along with each Opaque
copy, or state in or with each Opaque copy a computer-network location from which
the general network-using public has access to download using public-standard network
protocols a complete Transparent copy of the Document, free of added material. If
you use the latter option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this Transparent copy will
remain thus accessible at the stated location until at least one year after the last time
you distribute an Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the Document well
before redistributing any large number of copies, to give them a chance to provide you
with an updated version of the Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under the conditions
of sections 2 and 3 above, provided that you release the Modified Version under precisely
this License, with the Modified Version filling the role of the Document, thus licensing
distribution and modification of the Modified Version to whoever possesses a copy of
it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct from that of the
Document, and from those of previous versions (which should, if there were any,
794 GNU Compiler Collection (GCC) Internals
be listed in the History section of the Document). You may use the same title as
a previous version if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities responsible for
authorship of the modifications in the Modified Version, together with at least five
of the principal authors of the Document (all of its principal authors, if it has fewer
than five), unless they release you from this requirement.
C. State on the Title page the name of the publisher of the Modified Version, as the
publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications adjacent to the other
copyright notices.
F. Include, immediately after the copyright notices, a license notice giving the public
permission to use the Modified Version under the terms of this License, in the form
shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections and required Cover
Texts given in the Document’s license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled “History”, Preserve its Title, and add to it an item
stating at least the title, year, new authors, and publisher of the Modified Version
as given on the Title Page. If there is no section Entitled “History” in the Docu-
ment, create one stating the title, year, authors, and publisher of the Document
as given on its Title Page, then add an item describing the Modified Version as
stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for public access to
a Transparent copy of the Document, and likewise the network locations given in
the Document for previous versions it was based on. These may be placed in the
“History” section. You may omit a network location for a work that was published
at least four years before the Document itself, or if the original publisher of the
version it refers to gives permission.
K. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title
of the section, and preserve in the section all the substance and tone of each of the
contributor acknowledgements and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document, unaltered in their text and
in their titles. Section numbers or the equivalent are not considered part of the
section titles.
M. Delete any section Entitled “Endorsements”. Such a section may not be included
in the Modified Version.
N. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in
title with any Invariant Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or appendices that qualify
as Secondary Sections and contain no material copied from the Document, you may at
your option designate some or all of these sections as invariant. To do this, add their
GNU Free Documentation License 795
titles to the list of Invariant Sections in the Modified Version’s license notice. These
titles must be distinct from any other section titles.
You may add a section Entitled “Endorsements”, provided it contains nothing but
endorsements of your Modified Version by various parties—for example, statements of
peer review or that the text has been approved by an organization as the authoritative
definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up
to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified
Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be
added by (or through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or by arrangement
made by the same entity you are acting on behalf of, you may not add another; but
you may replace the old one, on explicit permission from the previous publisher that
added the old one.
The author(s) and publisher(s) of the Document do not by this License give permission
to use their names for publicity for or to assert or imply endorsement of any Modified
Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this License,
under the terms defined in section 4 above for modified versions, provided that you
include in the combination all of the Invariant Sections of all of the original documents,
unmodified, and list them all as Invariant Sections of your combined work in its license
notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple identical
Invariant Sections may be replaced with a single copy. If there are multiple Invariant
Sections with the same name but different contents, make the title of each such section
unique by adding at the end of it, in parentheses, the name of the original author or
publisher of that section if known, or else a unique number. Make the same adjustment
to the section titles in the list of Invariant Sections in the license notice of the combined
work.
In the combination, you must combine any sections Entitled “History” in the vari-
ous original documents, forming one section Entitled “History”; likewise combine any
sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You
must delete all sections Entitled “Endorsements.”
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents released
under this License, and replace the individual copies of this License in the various
documents with a single copy that is included in the collection, provided that you
follow the rules of this License for verbatim copying of each of the documents in all
other respects.
You may extract a single document from such a collection, and distribute it individu-
ally under this License, provided you insert a copy of this License into the extracted
document, and follow this License in all other respects regarding verbatim copying of
that document.
796 GNU Compiler Collection (GCC) Internals
Contributors to GCC
The GCC project would like to thank its many contributors. Without them the project
would not have been nearly as successful as it has been. Any omissions in this list are
accidental. Feel free to contact jlaw@ventanamicro.com or gerald@pfeifer.com if you
have been left out or some of your contributions are not listed. Please keep this list in
alphabetical order.
• Analog Devices helped implement the support for complex data types and iterators.
• John David Anglin for threading-related fixes and improvements to libstdc++-v3, and
the HP-UX port.
• James van Artsdalen wrote the code that makes efficient use of the Intel 80387 register
stack.
• Abramo and Roberto Bagnara for the SysV68 Motorola 3300 Delta Series port.
• Alasdair Baird for various bug fixes.
• Giovanni Bajo for analyzing lots of complicated C++ problem reports.
• Peter Barada for his work to improve code generation for new ColdFire cores.
• Gerald Baumgartner added the signature extension to the C++ front end.
• Godmar Back for his Java improvements and encouragement.
• Scott Bambrough for help porting the Java compiler.
• Wolfgang Bangerth for processing tons of bug reports.
• Jon Beniston for his Microsoft Windows port of Java and port to Lattice Mico32.
• Daniel Berlin for better DWARF 2 support, faster/better optimizations, improved alias
analysis, plus migrating GCC to Bugzilla.
• Geoff Berry for his Java object serialization work and various patches.
• David Binderman for testing GCC trunk against Fedora Rawhide and csmith.
• Laurynas Biveinis for memory management work and DJGPP port fixes.
• Uros Bizjak for the implementation of x87 math built-in functions and for various
middle end and i386 back end improvements and bug fixes.
• Eric Blake for helping to make GCJ and libgcj conform to the specifications.
• Janne Blomqvist for contributions to GNU Fortran.
• Hans-J. Boehm for his garbage collector, IA-64 libffi port, and other Java work.
• Segher Boessenkool for helping maintain the PowerPC port and the instruction com-
biner plus various contributions to the middle end.
• Neil Booth for work on cpplib, lang hooks, debug hooks and other miscellaneous clean-
ups.
• Steven Bosscher for integrating the GNU Fortran front end into GCC and for con-
tributing to the tree-ssa branch.
• Eric Botcazou for fixing middle- and backend bugs left and right.
• Per Bothner for his direction via the steering committee and various improvements
to the infrastructure for supporting new languages. Chill front end implementation.
Initial implementations of cpplib, fix-header, config.guess, libio, and past C++ library
(libg++) maintainer. Dreaming up, designing and implementing much of GCJ.
800 GNU Compiler Collection (GCC) Internals
• Nobuyuki Hikichi of Software Research Associates, Tokyo, contributed the support for
the Sony NEWS machine.
• Kazu Hirata for caring and feeding the Renesas H8/300 port and various fixes.
• Katherine Holcomb for work on GNU Fortran.
• Manfred Hollstein for his ongoing work to keep the m88k alive, lots of testing and bug
fixing, particularly of GCC configury code.
• Steve Holmgren for MachTen patches.
• Mat Hostetter for work on the TILE-Gx and TILEPro ports.
• Jan Hubicka for his x86 port improvements.
• Falk Hueffner for working on C and optimization bug reports.
• Bernardo Innocenti for his m68k work, including merging of ColdFire improvements
and uClinux support.
• Christian Iseli for various bug fixes.
• Kamil Iskra for general m68k hacking.
• Lee Iverson for random fixes and MIPS testing.
• Balaji V. Iyer for Cilk+ development and merging.
• Andreas Jaeger for testing and benchmarking of GCC and various bug fixes.
• Martin Jambor for his work on inter-procedural optimizations, the switch conversion
pass, and scalar replacement of aggregates.
• Jakub Jelinek for his SPARC work and sibling call optimizations as well as lots of bug
fixes and test cases, and for improving the Java build system.
• Janis Johnson for ia64 testing and fixes, her quality improvement sidetracks, and web
page maintenance.
• Kean Johnston for SCO OpenServer support and various fixes.
• Tim Josling for the sample language treelang based originally on Richard Kenner’s
“toy” language.
• Nicolai Josuttis for additional libstdc++ documentation.
• Klaus Kaempf for his ongoing work to make alpha-vms a viable target.
• Steven G. Kargl for work on GNU Fortran.
• David Kashtan of SRI adapted GCC to VMS.
• Ryszard Kabatek for many, many libstdc++ bug fixes and optimizations of strings,
especially member functions, and for auto ptr fixes.
• Geoffrey Keating for his ongoing work to make the PPC work for GNU/Linux and his
automatic regression tester.
• Brendan Kehoe for his ongoing work with G++ and for a lot of early work in just about
every part of libstdc++.
• Oliver M. Kellogg of Deutsche Aerospace contributed the port to the MIL-STD-1750A.
• Richard Kenner of the New York University Ultracomputer Research Laboratory wrote
the machine descriptions for the AMD 29000, the DEC Alpha, the IBM RT PC, and
the IBM RS/6000 as well as the support for instruction attributes. He also made
changes to better support RISC processors including changes to common subexpression
804 GNU Compiler Collection (GCC) Internals
elimination, strength reduction, function calling sequence handling, and condition code
support, in addition to generalizing the code for frame pointer elimination and delay
slot scheduling. Richard Kenner was also the head maintainer of GCC for several years.
• Mumit Khan for various contributions to the Cygwin and Mingw32 ports and main-
taining binary releases for Microsoft Windows hosts, and for massive libstdc++ porting
work to Cygwin/Mingw32.
• Robin Kirkham for cpu32 support.
• Mark Klein for PA improvements.
• Thomas Koenig for various bug fixes.
• Bruce Korb for the new and improved fixincludes code.
• Benjamin Kosnik for his G++ work and for leading the libstdc++-v3 effort.
• Maxim Kuvyrkov for contributions to the instruction scheduler, the Android and
m68k/Coldfire ports, and optimizations.
• Charles LaBrec contributed the support for the Integrated Solutions 68020 system.
• Asher Langton and Mike Kumbera for contributing Cray pointer support to GNU
Fortran, and for other GNU Fortran improvements.
• Jeff Law for his direction via the steering committee, coordinating the entire egcs
project and GCC 2.95, rolling out snapshots and releases, handling merges from GCC2,
reviewing tons of patches that might have fallen through the cracks else, and random
but extensive hacking.
• Walter Lee for work on the TILE-Gx and TILEPro ports.
• Marc Lehmann for his direction via the steering committee and helping with analysis
and improvements of x86 performance.
• Victor Leikehman for work on GNU Fortran.
• Ted Lemon wrote parts of the RTL reader and printer.
• Kriang Lerdsuwanakij for C++ improvements including template as template parameter
support, and many C++ fixes.
• Warren Levy for tremendous work on libgcj (Java Runtime Library) and random work
on the Java front end.
• Alain Lichnewsky ported GCC to the MIPS CPU.
• Oskar Liljeblad for hacking on AWT and his many Java bug reports and patches.
• Robert Lipe for OpenServer support, new testsuites, testing, etc.
• Chen Liqin for various S+core related fixes/improvement, and for maintaining the
S+core port.
• Martin Liska for his work on identical code folding, the sanitizers, HSA, general bug
fixing and for running automated regression testing of GCC and reporting numerous
bugs.
• Weiwen Liu for testing and various bug fixes.
• Manuel López-Ibá~
nez for improving -Wconversion and many other diagnostics fixes
and improvements.
• Dave Love for his ongoing work with the Fortran front end and runtime libraries.
Contributors to GCC 805
• Martin von Löwis for internal consistency checking infrastructure, various C++ improve-
ments including namespace support, and tons of assistance with libstdc++/compiler
merges.
• H.J. Lu for his previous contributions to the steering committee, many x86 bug reports,
prototype patches, and keeping the GNU/Linux ports working.
• Greg McGary for random fixes and (someday) bounded pointers.
• Andrew MacLeod for his ongoing work in building a real EH system, various code
generation improvements, work on the global optimizer, etc.
• Vladimir Makarov for hacking some ugly i960 problems, PowerPC hacking improve-
ments to compile-time performance, overall knowledge and direction in the area of
instruction scheduling, design and implementation of the automaton based instruction
scheduler and design and implementation of the integrated and local register allocators.
• David Malcolm for his work on improving GCC diagnostics, JIT, self-tests and unit
testing.
• Bob Manson for his behind the scenes work on dejagnu.
• Jose E. Marchesi for contributing the eBPF backend and his ongoing work maintaining
it.
• John Marino for contributing the DragonFly BSD port.
• Philip Martin for lots of libstdc++ string and vector iterator fixes and improvements,
and string clean up and testsuites.
• Michael Matz for his work on dominance tree discovery, the x86-64 port, link-time
optimization framework and general optimization improvements.
• All of the Mauve project contributors for Java test code.
• Bryce McKinlay for numerous GCJ and libgcj fixes and improvements.
• Adam Megacz for his work on the Microsoft Windows port of GCJ.
• Michael Meissner for LRS framework, ia32, m32r, v850, m88k, MIPS, powerpc, haifa,
ECOFF debug support, and other assorted hacking.
• Jason Merrill for his direction via the steering committee and leading the G++ effort.
• Martin Michlmayr for testing GCC on several architectures using the entire Debian
archive.
• David Miller for his direction via the steering committee, lots of SPARC work, im-
provements in jump.cc and interfacing with the Linux kernel developers.
• Gary Miller ported GCC to Charles River Data Systems machines.
• Alfred Minarik for libstdc++ string and ios bug fixes, and turning the entire libstdc++
testsuite namespace-compatible.
• Mark Mitchell for his direction via the steering committee, mountains of C++ work,
load/store hoisting out of loops, alias analysis improvements, ISO C restrict support,
and serving as release manager from 2000 to 2011.
• Alan Modra for various GNU/Linux bits and testing.
• Toon Moene for his direction via the steering committee, Fortran maintenance, and his
ongoing work to make us make Fortran run fast.
806 GNU Compiler Collection (GCC) Internals
• Jason Molenda for major help in the care and feeding of all the services on the
gcc.gnu.org (formerly egcs.cygnus.com) machine—mail, web services, ftp services, etc
etc. Doing all this work on scrap paper and the backs of envelopes would have been. . .
difficult.
• Catherine Moore for fixing various ugly problems we have sent her way, including the
haifa bug which was killing the Alpha & PowerPC Linux kernels.
• Mike Moreton for his various Java patches.
• David Mosberger-Tang for various Alpha improvements, and for the initial IA-64 port.
• Stephen Moshier contributed the floating point emulator that assists in cross-
compilation and permits support for floating point numbers wider than 64 bits and
for ISO C99 support.
• Bill Moyer for his behind the scenes work on various issues.
• Philippe De Muyter for his work on the m68k port.
• Joseph S. Myers for his work on the PDP-11 port, format checking and ISO C99
support, and continuous emphasis on (and contributions to) documentation.
• Nathan Myers for his work on libstdc++-v3: architecture and authorship through the
first three snapshots, including implementation of locale infrastructure, string, shadow
C headers, and the initial project documentation (DESIGN, CHECKLIST, and so
forth). Later, more work on MT-safe string and shadow headers.
• Felix Natter for documentation on porting libstdc++.
• Nathanael Nerode for cleaning up the configuration/build process.
• NeXT, Inc. donated the front end that supports the Objective-C language.
• Hans-Peter Nilsson for the CRIS and MMIX ports, improvements to the search engine
setup, various documentation fixes and other small fixes.
• Geoff Noer for his work on getting cygwin native builds working.
• Vegard Nossum for running automated regression testing of GCC and reporting nu-
merous bugs.
• Diego Novillo for his work on Tree SSA, OpenMP, SPEC performance tracking web
pages, GIMPLE tuples, and assorted fixes.
• David O’Brien for the FreeBSD/alpha, FreeBSD/AMD x86-64, FreeBSD/ARM,
FreeBSD/PowerPC, and FreeBSD/SPARC64 ports and related infrastructure
improvements.
• Alexandre Oliva for various build infrastructure improvements, scripts and amazing
testing work, including keeping libtool issues sane and happy.
• Stefan Olsson for work on mt alloc.
• Melissa O’Neill for various NeXT fixes.
• Rainer Orth for random MIPS work, including improvements to GCC’s o32 ABI sup-
port, improvements to dejagnu’s MIPS support, Java configuration clean-ups and port-
ing work, and maintaining the IRIX, Solaris 2, and Tru64 UNIX ports.
• Patrick Palka for contributions to the C++ library and front end.
• Steven Pemberton for his contribution of enquire which allowed GCC to determine
various properties of the floating point unit and generate float.h in older versions of
GCC.
Contributors to GCC 807
• Roger Sayle for improvements to constant folding and GCC’s RTL optimizers as well
as for fixing numerous bugs.
• Bradley Schatz for his work on the GCJ FAQ.
• Peter Schauer wrote the code to allow debugging to work on the Alpha.
• William Schelter did most of the work on the Intel 80386 support.
• Tobias Schlüter for work on GNU Fortran.
• Bernd Schmidt for various code generation improvements and major work in the reload
pass, serving as release manager for GCC 2.95.3, and work on the Blackfin and C6X
ports.
• Peter Schmid for constant testing of libstdc++—especially application testing, going
above and beyond what was requested for the release criteria—and libstdc++ header
file tweaks.
• Jason Schroeder for jcf-dump patches.
• Andreas Schwab for his work on the m68k port.
• Lars Segerlund for work on GNU Fortran.
• Dodji Seketeli for numerous C++ bug fixes and debug info improvements.
• Tim Shen for major work on <regex>.
• Joel Sherrill for his direction via the steering committee, RTEMS contributions and
RTEMS testing.
• Nathan Sidwell for many C++ fixes/improvements.
• Jeffrey Siegal for helping RMS with the original design of GCC, some code which
handles the parse tree and RTL data structures, constant folding and help with the
original VAX & m68k ports.
• Kenny Simpson for prompting libstdc++ fixes due to defect reports from the LWG
(thereby keeping GCC in line with updates from the ISO).
• Franz Sirl for his ongoing work with making the PPC port stable for GNU/Linux.
• Andrey Slepuhin for assorted AIX hacking.
• Trevor Smigiel for contributing the SPU port.
• Christopher Smith did the port for Convex machines.
• Danny Smith for his major efforts on the Mingw (and Cygwin) ports. Retired from
GCC maintainership August 2010, having mentored two new maintainers into the role.
• Randy Smith finished the Sun FPA support.
• Ed Smith-Rowland for his continuous work on libstdc++-v3, special functions,
<random>, and various improvements to C++11 features.
• Scott Snyder for queue, iterator, istream, and string fixes and libstdc++ testsuite en-
tries. Also for providing the patch to G77 to add rudimentary support for INTEGER*1,
INTEGER*2, and LOGICAL*1.
• Zdenek Sojka for running automated regression testing of GCC and reporting numerous
bugs.
• Arseny Solokha for running automated regression testing of GCC and reporting nu-
merous bugs.
Contributors to GCC 809
• Andy Vaught for the design and initial implementation of the GNU Fortran front end.
• Brent Verner for work with the libstdc++ cshadow files and their associated configure
steps.
• Todd Vierling for contributions for NetBSD ports.
• Andrew Waterman for contributing the RISC-V port, as well as maintaining it.
• Jonathan Wakely for contributing to and maintaining libstdc++.
• Dean Wakerley for converting the install documentation from HTML to texinfo in time
for GCC 3.0.
• Krister Walfridsson for random bug fixes.
• Feng Wang for contributions to GNU Fortran.
• Stephen M. Webb for time and effort on making libstdc++ shadow files work with the
tricky Solaris 8+ headers, and for pushing the build-time header tree. Also, for starting
and driving the <regex> effort.
• John Wehle for various improvements for the x86 code generator, related infrastructure
improvements to help x86 code generation, value range propagation and other work,
WE32k port.
• Ulrich Weigand for work on the s390 port.
• Janus Weil for contributions to GNU Fortran.
• Zack Weinberg for major work on cpplib and various other bug fixes.
• Matt Welsh for help with Linux Threads support in GCJ.
• Urban Widmark for help fixing java.io.
• Mark Wielaard for new Java library code and his work integrating with Classpath.
• Dale Wiles helped port GCC to the Tahoe.
• Bob Wilson from Tensilica, Inc. for the Xtensa port.
• Jim Wilson for his direction via the steering committee, tackling hard problems in
various places that nobody else wanted to work on, strength reduction and other loop
optimizations.
• Paul Woegerer and Tal Agmon for the CRX port.
• Carlo Wood for various fixes.
• Tom Wood for work on the m88k port.
• Chung-Ju Wu for his work on the Andes NDS32 port.
• Canqun Yang for work on GNU Fortran.
• Masanobu Yuhara of Fujitsu Laboratories implemented the machine description for the
Tron architecture (specifically, the Gmicro).
• Kevin Zachmann helped port GCC to the Tahoe.
• Ayal Zaks for Swing Modulo Scheduling (SMS).
• Qirun Zhang for running automated regression testing of GCC and reporting numerous
bugs.
• Xiaoqiang Zhang for work on GNU Fortran.
• Gilles Zunino for help porting Java to Irix.
Contributors to GCC 811
The following people are recognized for their contributions to GNAT, the Ada front end
of GCC:
• Bernard Banner
• Romain Berrendonner
• Geert Bosch
• Emmanuel Briot
• Joel Brobecker
• Ben Brosgol
• Vincent Celier
• Arnaud Charlet
• Chien Chieng
• Cyrille Comar
• Cyrille Crozes
• Robert Dewar
• Gary Dismukes
• Robert Duff
• Ed Falis
• Ramon Fernandez
• Sam Figueroa
• Vasiliy Fofanov
• Michael Friess
• Franco Gasperoni
• Ted Giering
• Matthew Gingell
• Laurent Guerby
• Jerome Guitton
• Olivier Hainque
• Jerome Hugues
• Hristian Kirtchev
• Jerome Lambourg
• Bruno Leclerc
• Albert Lee
• Sean McNeil
• Javier Miranda
• Laurent Nana
• Pascal Obry
• Dong-Ik Oh
• Laurent Pautet
• Brett Porter
812 GNU Compiler Collection (GCC) Internals
• Thomas Quinot
• Nicolas Roche
• Pat Rogers
• Jose Ruiz
• Douglas Rupp
• Sergey Rybin
• Gail Schenker
• Ed Schonberg
• Nicolas Setton
• Samuel Tardieu
The following people are recognized for their contributions of new features, bug reports,
testing and integration of classpath/libgcj for GCC version 4.1:
• Lillian Angel for JTree implementation and lots Free Swing additions and bug fixes.
• Wolfgang Baer for GapContent bug fixes.
• Anthony Balkissoon for JList, Free Swing 1.5 updates and mouse event fixes, lots of
Free Swing work including JTable editing.
• Stuart Ballard for RMI constant fixes.
• Goffredo Baroncelli for HTTPURLConnection fixes.
• Gary Benson for MessageFormat fixes.
• Daniel Bonniot for Serialization fixes.
• Chris Burdess for lots of gnu.xml and http protocol fixes, StAX and DOM xml:id support.
• Ka-Hing Cheung for TreePath and TreeSelection fixes.
• Archie Cobbs for build fixes, VM interface updates, URLClassLoader updates.
• Kelley Cook for build fixes.
• Martin Cordova for Suggestions for better SocketTimeoutException.
• David Daney for BitSet bug fixes, HttpURLConnection rewrite and improvements.
• Thomas Fitzsimmons for lots of upgrades to the gtk+ AWT and Cairo 2D support.
Lots of imageio framework additions, lots of AWT and Free Swing bug fixes.
• Jeroen Frijters for ClassLoader and nio cleanups, serialization fixes, better Proxy
support, bug fixes and IKVM integration.
• Santiago Gala for AccessControlContext fixes.
• Nicolas Geoffray for VMClassLoader and AccessController improvements.
• David Gilbert for basic and metal icon and plaf support and lots of documenting,
Lots of Free Swing and metal theme additions. MetalIconFactory implementation.
• Anthony Green for MIDI framework, ALSA and DSSI providers.
• Andrew Haley for Serialization and URLClassLoader fixes, gcj build speedups.
• Kim Ho for JFileChooser implementation.
• Andrew John Hughes for Locale and net fixes, URI RFC2986 updates, Serialization
fixes, Properties XML support and generic branch work, VMIntegration guide update.
Contributors to GCC 813
• Mark Wielaard for bug fixes, packaging and release management, Clipboard imple-
mentation, system call interrupts and network timeouts and GdkPixpufDecoder fixes.
In addition to the above, all of which also contributed time and energy in testing GCC,
we would like to thank the following for their contributions to testing:
• Michael Abd-El-Malek
• Thomas Arend
• Bonzo Armstrong
• Steven Ashe
• Chris Baldwin
• David Billinghurst
• Jim Blandy
• Stephane Bortzmeyer
• Horst von Brand
• Frank Braun
• Rodney Brown
• Sidney Cadot
• Bradford Castalia
• Robert Clark
• Jonathan Corbet
• Ralph Doncaster
• Richard Emberson
• Levente Farkas
• Graham Fawcett
• Mark Fernyhough
• Robert A. French
• Jörgen Freyh
• Mark K. Gardner
• Charles-Antoine Gauthier
• Yung Shing Gene
• David Gilbert
• Simon Gornall
• Fred Gray
• John Griffin
• Patrik Hagglund
• Phil Hargett
• Amancio Hasty
• Takafumi Hayashi
• Bryan W. Headley
• Kevin B. Hendricks
Contributors to GCC 815
• Joep Jansen
• Christian Joensson
• Michel Kern
• David Kidd
• Tobias Kuipers
• Anand Krishnaswamy
• A. O. V. Le Blanc
• llewelly
• Damon Love
• Brad Lucier
• Matthias Klose
• Martin Knoblauch
• Rick Lutowski
• Jesse Macnish
• Stefan Morrell
• Anon A. Mous
• Matthias Mueller
• Pekka Nikander
• Rick Niles
• Jon Olson
• Magnus Persson
• Chris Pollard
• Richard Polton
• Derk Reefman
• David Rees
• Paul Reilly
• Tom Reilly
• Torsten Rueger
• Danny Sadinoff
• Marc Schifer
• Erik Schnetter
• Wayne K. Schroll
• David Schuler
• Vin Shelton
• Tim Souder
• Adam Sulmicki
• Bill Thorson
• George Talbot
• Pedro A. M. Vazquez
816 GNU Compiler Collection (GCC) Internals
• Gregory Warnes
• Ian Watson
• David E. Young
• And many others
And finally we’d like to thank everyone who uses the compiler, provides feedback and
generally reminds us why we’re doing this work in the first place.
817
Option Index
GCC’s command line options are indexed here without any initial ‘-’ or ‘--’. Where an
option has both positive and negative forms (such as -foption and -fno-option), relevant
entries in the manual are indexed under the most appropriate form; it may sometimes be
useful to look up both forms.
F fwpa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750
fltrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750
fltrans-output-list . . . . . . . . . . . . . . . . . . . . . . . . 750 M
fresolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750 msoft-float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
819
Concept Index
! *gimple_build_resx . . . . . . . . . . . . . . . . . . . . . . . . . . 256
‘!’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 *gimple_build_return . . . . . . . . . . . . . . . . . . . . . . . 257
*gimple_build_switch . . . . . . . . . . . . . . . . . . . . . . . 257
*gimple_build_try . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
#
‘#’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
# in template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
#pragma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693
+
‘+’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
$
‘$’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 –
-fsection-anchors . . . . . . . . . . . . . . . . . . . . . . 283, 616
%
‘%’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
% in GTY option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724 /
‘%’ in template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 ‘/c’ in RTL dump ............................ 287
‘/f’ in RTL dump ............................ 287
‘/i’ in RTL dump ............................ 288
& ‘/j’ in RTL dump ............................ 288
‘&’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 ‘/s’ in RTL dump ............................ 288
‘/u’ in RTL dump ............................ 288
‘/v’ in RTL dump ............................ 289
(
(gimple_stmt_iterator . . . . . . . . . . . . . . . . . . . . . . 751
(nil) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
<
‘<’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
*
‘*’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
* in template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 =
*gimple_build_asm_vec . . . . . . . . . . . . . . . . . . . . . . 241
*gimple_build_assign . . . . . . . . . . . . . . . . . . . . . . . 242 ‘=’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
*gimple_build_bind . . . . . . . . . . . . . . . . . . . . . . . . . . 243
*gimple_build_call . . . . . . . . . . . . . . . . . . . . . . . . . . 244
*gimple_build_call_from_tree . . . . . . . . . . . . . . 244 >
*gimple_build_call_vec . . . . . . . . . . . . . . . . . . . . . 244
*gimple_build_catch . . . . . . . . . . . . . . . . . . . . . . . . 246 ‘>’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
*gimple_build_cond . . . . . . . . . . . . . . . . . . . . . . . . . . 246
*gimple_build_cond_from_tree . . . . . . . . . . . . . . 246
*gimple_build_debug_bind . . . . . . . . . . . . . . . . . . . 247 ?
*gimple_build_eh_filter . . . . . . . . . . . . . . . . . . . . 249
*gimple_build_goto . . . . . . . . . . . . . . . . . . . . . . . . . . 249 ‘?’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
*gimple_build_label . . . . . . . . . . . . . . . . . . . . . . . . 249
*gimple_build_omp_atomic_load . . . . . . . . . . . . . 250
*gimple_build_omp_atomic_store . . . . . . . . . . . . 250
*gimple_build_omp_continue . . . . . . . . . . . . . . . . 250
^
*gimple_build_omp_critical . . . . . . . . . . . . . . . . 251 ‘^’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
*gimple_build_omp_for . . . . . . . . . . . . . . . . . . . . . . 251
*gimple_build_omp_parallel . . . . . . . . . . . . . . . . 253
*gimple_build_omp_sections . . . . . . . . . . . . . . . . 255
*gimple_build_omp_single . . . . . . . . . . . . . . . . . . . 255
820 GNU Compiler Collection (GCC) Internals
__bid_divdd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__absvdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_divsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__absvsi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_divtd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__addda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_eqdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__adddf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __bid_eqsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__adddq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_eqtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__addha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendddtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__addhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendddtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendddxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extenddfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__addsf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __bid_extenddftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendsddd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__addta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendsddf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addtf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __bid_extendsdtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__adduda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendsdtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendsdxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__adduha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendsfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__adduhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendsfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__adduqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendsftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendtftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__addusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendxftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__adduta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_fixddbitint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__addvdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_fixdddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__addvsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_fixddsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__addxf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __bid_fixsdbitint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashlda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_fixsddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashldi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 __bid_fixsdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashldq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_fixtdbitint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashlha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_fixtddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_fixtdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_fixunsdddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_fixunsddsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 __bid_fixunssddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_fixunssdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_fixunstddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 __bid_fixunstdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashluda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatbitintdd. . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashludq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatbitintsd. . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashluha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatbitinttd. . . . . . . . . . . . . . . . . . . . . . . . . . 21
__ashluhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatdidd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashluqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatdisd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashlusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatditd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashlusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatsidd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashluta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatsisd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatsitd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 __bid_floatunsdidd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrdq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatunsdisd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatunsditd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatunssidd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatunssisd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatunssitd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 __bid_gedd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__ashrsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_gesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__ashrta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_getd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
__ashrti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 __bid_gtdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
__bid_adddd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __bid_gtsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
__bid_addsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __bid_gttd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
__bid_addtd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __bid_ledd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Concept Index 821
__bid_lesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __cmpudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__bid_letd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __cmpuha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__bid_ltdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __cmpuhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__bid_ltsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __cmpuqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__bid_lttd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __cmpusa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__bid_muldd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __cmpusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__bid_mulsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __cmputa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__bid_multd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __CTOR_LIST__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
__bid_nedd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __ctzdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
__bid_negdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __ctzsi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
__bid_negsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __ctzti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
__bid_negtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __divda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__bid_nesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __divdc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__bid_netd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __divdf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__bid_subdd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __divdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
__bid_subsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __divdq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__bid_subtd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __divha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__bid_truncdddf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __divhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__bid_truncddsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __divmodbitint4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__bid_truncddsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__bid_truncdfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__bid_truncsdsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __divsc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__bid_trunctddd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divsf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__bid_trunctddf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
__bid_trunctdsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__bid_trunctdsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__bid_trunctdtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __divtc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__bid_trunctdxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divtf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__bid_trunctfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
__bid_trunctfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divxc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__bid_truncxfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __divxf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__bid_truncxfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __dpd_adddd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__bid_unorddd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __dpd_addsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__bid_unordsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __dpd_addtd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__bid_unordtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __dpd_divdd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__bswapdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 __dpd_divsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__bswapsi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 __dpd_divtd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__builtin_classify_type . . . . . . . . . . . . . . . . . . . . 598 __dpd_eqdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__builtin_next_arg . . . . . . . . . . . . . . . . . . . . . . . . . . 598 __dpd_eqsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__builtin_saveregs . . . . . . . . . . . . . . . . . . . . . . . . . . 598 __dpd_eqtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__clear_cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 __dpd_extendddtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__clzdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __dpd_extendddtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__clzsi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __dpd_extendddxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__clzti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __dpd_extenddfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__cmpda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __dpd_extenddftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__cmpdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 __dpd_extendsddd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__cmpdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 __dpd_extendsddf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__cmpdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __dpd_extendsdtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__cmpha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __dpd_extendsdtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__cmphq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __dpd_extendsdxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__cmpqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __dpd_extendsfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__cmpsa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __dpd_extendsfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__cmpsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 __dpd_extendsftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__cmpsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __dpd_extendtftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__cmpta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __dpd_extendxftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__cmptf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 __dpd_fixdddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__cmpti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 __dpd_fixddsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__cmpuda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __dpd_fixsddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
822 GNU Compiler Collection (GCC) Internals
__dpd_fixsdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __dpd_truncxfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__dpd_fixtddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __dpd_truncxfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__dpd_fixtdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __dpd_unorddd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__dpd_fixunsdddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __dpd_unordsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__dpd_fixunsddsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __dpd_unordtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__dpd_fixunssddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __DTOR_LIST__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
__dpd_fixunssdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __eqdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_fixunstddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __eqsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_fixunstdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __eqtf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_floatdidd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extenddftf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_floatdisd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extenddfxf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_floatditd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extendsfdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_floatsidd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extendsftf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_floatsisd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extendsfxf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_floatsitd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __ffsdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
__dpd_floatunsdidd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __ffsti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
__dpd_floatunsdisd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixdfbitint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatunsditd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixdfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_floatunssidd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixdfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_floatunssisd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixdfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_floatunssitd . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixsfbitint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_gedd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixsfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_gesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixsfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_getd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixsfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_gtdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixtfbitint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_gtsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixtfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_gttd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixtfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_ledd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixtfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_lesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixunsdfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_letd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixunsdfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_ltdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixunsdfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_ltsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixunssfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_lttd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixunssfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_muldd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixunssfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_mulsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixunstfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_multd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixunstfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_nedd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixunstfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_negdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixunsxfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_negsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixunsxfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_negtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixunsxfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_nesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixxfbitint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_netd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixxfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_subdd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __fixxfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_subsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __fixxfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__dpd_subtd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __floatbitintbf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncdddf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __floatbitintdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncddsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __floatbitinthf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncddsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatbitintsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncdfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatbitinttf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncsdsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __floatbitintxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_trunctddd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatdidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_trunctddf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatdisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_trunctdsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __floatditf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_trunctdsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatdixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_trunctdtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __floatsidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_trunctdxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatsisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_trunctfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatsitf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_trunctfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatsixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Concept Index 823
__floattidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floattisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floattitf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floattixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floatundidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floatundisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floatunditf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floatundixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floatunsidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floatunsisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floatunsitf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floatunsixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__floatuntidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__floatuntisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__floatuntitf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__floatuntixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 __fractdqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractdqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fracthada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fracthadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fracthadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fracthadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdfdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdfhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdfsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdfta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdfuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdfuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdfuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdfusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __fracthausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracthausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracthauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractdiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracthida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractdihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracthidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
824 GNU Compiler Collection (GCC) Internals
__fracthiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fracthiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fracthisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fracthita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fracthiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractqqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractqqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fracthqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractqquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fracthqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fracthquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractqida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractqidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractqiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fractsfusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsfusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsfuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__fractqqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractqqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractqqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractqqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractsihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Concept Index 825
__fractsiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracttiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fracttiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fracttiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fracttiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__fractsqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractudada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractsqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractudadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractsqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractsqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractudahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractsqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractudaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractsqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractudasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractsqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractudasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractsqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudauha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractsquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractudausa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fracttada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fracttadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudauta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fracttadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudquhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudquqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractudqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fractudqusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __fractudquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
826 GNU Compiler Collection (GCC) Internals
__fractuhada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunsdiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
__fractuhadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractunsdiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
__fractuhadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractunsdiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
__fractuhadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunsdiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
__fractuhaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunsdiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
__fractuhahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractunsdiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
__fractuhahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunsdiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
__fractuhaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractunsdqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractuhaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunsdqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunsdqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractunsdqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractunsdqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractuhasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunshadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractuhata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunshahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractuhati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractunshaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractuhauda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractunshasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractuhaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunshati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractuhauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunshida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunshidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhausa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunshiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractunshihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhauta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractunshiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunshisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunshiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunshiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunshiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunshiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunshiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
__fractuhqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunshqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunshqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunshqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunsqida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunsqidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhquqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunsqiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunsqihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhqusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunsqiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractuhquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __fractunsqisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsqisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsqita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsqiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsqiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsqiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsqiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsqiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsqiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsqiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsqiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunsdisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsqqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunsdisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsqqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunsdita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsqqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunsdiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsqqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Concept Index 827
__fractunsqqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsuhadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsuhahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsuhaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsuhasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsuhati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsuhqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsuhqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsuhqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsuhqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsuhqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsuqqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsuqqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsuqqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsuqqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsuqqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsusadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsusahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsusaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsusasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsusati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsusqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractunsusqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsusqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsusqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__fractunssqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsusqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunssqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsutadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunssqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsutahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunstadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsutaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunstahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsutasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__fractunstaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractunsutati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__fractunstasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 __fractuqqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqqudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunstiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __fractuqquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunsudadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractuqquhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunsudahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractuqqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunsudaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractuqqusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunsudasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractuqquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fractunsudati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractusada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractunsudqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractusadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractunsudqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractusadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractunsudqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractusadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractunsudqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractusaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractunsudqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __fractusahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
828 GNU Compiler Collection (GCC) Internals
__fractusahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractutausa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractusaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractutausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractusaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __gedf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __gesf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __getf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __gtdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __gtsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __gttf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __ledf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusauda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __lesf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __letf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusauha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __lshrdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
__fractusauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __lshrsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
__fractusauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __lshrti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
__fractusausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __lshruda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__fractusauta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __lshrudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__fractusqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __lshruha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__fractusqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __lshruhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__fractusqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __lshruqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__fractusqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __lshrusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__fractusqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __lshrusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__fractusqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __lshruta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__fractusqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __ltdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __ltsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __lttf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
__fractusqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __moddi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__fractusqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __modsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__fractusqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __modti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__fractusqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __morestack_current_segment . . . . . . . . . . . . . . . . 62
__fractusqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __morestack_initial_sp . . . . . . . . . . . . . . . . . . . . . . 62
__fractusquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __morestack_segments . . . . . . . . . . . . . . . . . . . . . . . . 62
__fractusqudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __mulbitint3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__fractusquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __mulda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractusquhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __muldc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusquqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __muldf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__fractusqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __muldi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__fractusquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __muldq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __mulha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __mulhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __mulqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __mulsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __mulsc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractutahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __mulsf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__fractutahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __mulsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__fractutaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __mulsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __multa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __multc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractutasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __multf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__fractutasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __multi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__fractutasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __muluda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__fractutata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __muludq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __muluha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutauda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __muluhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __muluqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutauha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __mulusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__fractutauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __mulusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __muluta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Concept Index 829
__mulvdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __satfractdfha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__mulvsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __satfractdfhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__mulxc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdfqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__mulxf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdfsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__nedf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdfsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__negda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdfta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__negdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdfuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__negdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 __satfractdfudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__negdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdfuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__negha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdfuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__neghq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdfuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__negqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdfusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__negsa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdfusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__negsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdfuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__negsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__negta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__negtf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__negti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 __satfractdihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__neguda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__negudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__neguha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__neguhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__neguqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__negusa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__negusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__neguta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __satfractdiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__negvdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __satfractdiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__negvsi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __satfractdiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__negxf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__nesf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__netf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__paritydi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 __satfractdqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__paritysi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 __satfractdqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__parityti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 __satfractdqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__popcountdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 __satfractdqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__popcountsi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 __satfractdqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__popcountti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 __satfractdqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__powidf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__powisf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__powitf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__powixf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractdquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractdqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractdqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractdquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfracthauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdfda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __satfracthauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractdfdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __satfracthausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
830 GNU Compiler Collection (GCC) Internals
__satfracthausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractqquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracthauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractqquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfracthida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractqquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfracthidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractqqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracthiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractqqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfracthihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractqquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracthiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracthqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracthqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfracthqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfracthqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfracthqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfracthquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfracthqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfracthquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfracthquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfracthquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfracthqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfracthqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfracthquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsfuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfractqida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsfuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfractqidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsfusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfractqiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsfusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfractqihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsfuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__satfractqiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__satfractqisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__satfractqisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__satfractqita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__satfractqiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__satfractqiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__satfractqiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__satfractqiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__satfractqiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfractqiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfractqiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfractqiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __satfractsiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfractqqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__satfractqqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfractqqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfractqqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__satfractqqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractqqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractqqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractqquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractqqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractsqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Concept Index 831
__satfractsqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractsqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractsquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractsqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractsquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractsquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractsquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractsqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractsqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudquhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractsquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractudquqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfracttada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractudqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfracttadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractudqusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfracttaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractudquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfracttahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfracttauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfracttaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhauda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractuhauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhausa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhauta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracttihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhquqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfracttiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __satfractuhqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractudada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractuhqusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractudadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractuhquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractudaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdida . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractunsdidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractunsdiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractunsdiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudauha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdita . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudausa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudauta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfractunsdiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractunsdiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractudqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractunsdiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
832 GNU Compiler Collection (GCC) Internals
__satfractunsdiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractunstiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractunshida . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractunstiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
__satfractunshidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractunstiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractunshiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractunstiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractunshihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractunstiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
__satfractunshiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractunstiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
__satfractunshisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractunstiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
__satfractunshisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunshita . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunshiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunshiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunshiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunshiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunshiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunshiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunshiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunshiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractuqqudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunsqida . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractuqquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunsqidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractuqquhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunsqiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractuqqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunsqihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractuqqusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunsqiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractuqquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunsqisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractusada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractusadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqita . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractusaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractusaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractusasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractusasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractusata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractusauda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 __satfractusaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunsqiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusauha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunssida . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunssidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunssiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunssihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusauta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractunssiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunssisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunssisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunssita . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunssiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractusqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunssiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunssiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunssiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractunssiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractunssiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractusqudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractunssiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 __satfractusquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractunssiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractusquhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractunstida . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractusquqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractunstidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractusqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractunstiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractusquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractunstihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractutada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfractunstiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractutadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfractunstisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractutaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfractunstisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractutahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfractunstita . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 __satfractutaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfractunstiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 __satfractutasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Concept Index 833
__satfractutasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __subdf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__satfractutata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __subdq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__satfractutauda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __subha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__satfractutaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __subhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__satfractutauha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __subqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__satfractutauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __subsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__satfractutauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __subsf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__satfractutausa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __subsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__satfractutausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __subta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__splitstack_find . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 __subtf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__ssaddda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __subuda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__ssadddq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __subudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__ssaddha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __subuha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__ssaddhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __subuhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__ssaddqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __subuqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__ssaddsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __subusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__ssaddsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __subusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__ssaddta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __subuta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__ssashlda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __subvdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
__ssashldq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __subvsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
__ssashlha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __subxf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__ssashlhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __truncdfsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__ssashlsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __trunctfdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__ssashlsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __trunctfsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__ssashlta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __truncxfdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__ssdivda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __truncxfsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__ssdivdq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __ucmpdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
__ssdivha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __ucmpti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
__ssdivhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__ssdivqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivmoddi4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__ssdivsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivmodti4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__ssdivsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__ssdivta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__ssmulda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 __udivuda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__ssmuldq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 __udivudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__ssmulha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 __udivuha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__ssmulhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 __udivuhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__ssmulqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 __udivuqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__ssmulsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 __udivusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__ssmulsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 __udivusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__ssmulta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 __udivuta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__ssnegda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __umoddi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__ssnegdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __umodsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__ssnegha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __umodti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
__ssneghq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __unorddf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__ssnegqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __unordsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__ssnegsa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __unordtf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__ssnegsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __usadduda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__ssnegta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __usaddudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__sssubda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __usadduha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__sssubdq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usadduhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__sssubha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __usadduqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__sssubhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usaddusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__sssubqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usaddusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__sssubsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __usadduta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
__sssubsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usashluda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__sssubta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __usashludq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__subda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usashluha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
834 GNU Compiler Collection (GCC) Internals
__usashluhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 A
__usashluqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 abort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
__usashlusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 abs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
__usashlusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 abs and attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
__usashluta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ABS_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
__usdivuda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 absence_set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
__usdivudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 absm2 instruction pattern . . . . . . . . . . . . . . . . . . . . . 439
__usdivuha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 absolute value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
__usdivuhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ABSU_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
__usdivuqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 access to operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
__usdivusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 access to special operands . . . . . . . . . . . . . . . . . . . . . 281
__usdivusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
__usdivuta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ACCUM_TYPE_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
__usmuluda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 ACCUMULATE_OUTGOING_ARGS . . . . . . . . . . . . . . . . . . . 577
__usmuludq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 ACCUMULATE_OUTGOING_ARGS
__usmuluha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 and stack frames . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
__usmuluhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 acosm2 instruction pattern . . . . . . . . . . . . . . . . . . . . 440
__usmuluqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 ADA_LONG_TYPE_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . 541
__usmulusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Adding a new GIMPLE statement code . . . . . . . 263
__usmulusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 ADDITIONAL_REGISTER_NAMES. . . . . . . . . . . . . . . . . . 660
__usmuluta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 addm3 instruction pattern . . . . . . . . . . . . . . . . . . . . . 430
__usneguda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 addmodecc instruction pattern. . . . . . . . . . . . . . . . . 453
__usnegudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 addptrm3 instruction pattern . . . . . . . . . . . . . . . . . . 430
__usneguha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 addr_diff_vec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
__usneguhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 addr_diff_vec, length of . . . . . . . . . . . . . . . . . . . . . 497
__usneguqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 addr_vec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
__usnegusa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 addr_vec, length of . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
__usnegusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ADDR_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
__usneguta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 address constraints. . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
__ussubuda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 address_operand . . . . . . . . . . . . . . . . . . . . . . . . 376, 381
__ussubudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 addressing modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
__ussubuha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 addvm4 instruction pattern . . . . . . . . . . . . . . . . . . . . 430
__ussubuhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 ADJUST_FIELD_ALIGN . . . . . . . . . . . . . . . . . . . . . . . . . . 534
__ussubuqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 ADJUST_INSN_LENGTH . . . . . . . . . . . . . . . . . . . . . . . . . . 497
__ussubusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 ADJUST_REG_ALLOC_ORDER . . . . . . . . . . . . . . . . . . . . . 548
__ussubusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 aggregates as return values . . . . . . . . . . . . . . . . . . . . 589
__ussubuta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
ALL_REGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
allocate_stack instruction pattern . . . . . . . . . . . 461
‘ alternate entry points . . . . . . . . . . . . . . . . . . . . . . . . . 324
analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
“real” instructions, RTL SSA . . . . . . . . . . . . . . . . . 333 analyzer, debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . 762
analyzer, internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
anchored addresses. . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
@ and . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
and and attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
‘@’ in instruction pattern names . . . . . . . . . . . . . . . 516
and, canonicalization of . . . . . . . . . . . . . . . . . . . . . . . 476
andm3 instruction pattern . . . . . . . . . . . . . . . . . . . . . 430
ANNOTATE_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
\ annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
\ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 APPLY_RESULT_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
arg_pointer_rtx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
ARG_POINTER_CFA_OFFSET . . . . . . . . . . . . . . . . . . . . . 567
0 ARG_POINTER_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . . 573
ARG_POINTER_REGNUM and virtual registers . . . . . 301
‘0’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 ARGS_GROW_DOWNWARD . . . . . . . . . . . . . . . . . . . . . . . . . . 564
argument passing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
arguments in registers. . . . . . . . . . . . . . . . . . . . . . . . . 579
Concept Index 835
gimplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 H
gimplify_assign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 ‘H’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
gimplify_expr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 HAmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
gimplify_function_tree . . . . . . . . . . . . . . . . . . . . . 144 HANDLE_PRAGMA_PACK_WITH_EXPANSION . . . . . . . . 694
global_regs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 HANDLER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
GLOBAL_INIT_PRIORITY . . . . . . . . . . . . . . . . . . . . . . . 222 HANDLER_BODY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
GO_IF_LEGITIMATE_ADDRESS . . . . . . . . . . . . . . . . . . . 607 HANDLER_PARMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
greater than . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 hard registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
gsi_after_labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 HARD_FRAME_POINTER_IS_ARG_POINTER . . . . . . . . 574
gsi_bb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 HARD_FRAME_POINTER_IS_FRAME_POINTER . . . . . . 573
gsi_commit_edge_inserts . . . . . . . . . . . . . . . 263, 350 HARD_FRAME_POINTER_REGNUM. . . . . . . . . . . . . . . . . . 573
gsi_commit_one_edge_insert . . . . . . . . . . . . . . . . 263 HARD_REGNO_CALLER_SAVE_MODE . . . . . . . . . . . . . . . 590
gsi_end_p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261, 350 HARD_REGNO_NREGS_HAS_PADDING . . . . . . . . . . . . . . 549
gsi_for_stmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 HARD_REGNO_NREGS_WITH_PADDING . . . . . . . . . . . . . 550
gsi_insert_after . . . . . . . . . . . . . . . . . . . . . . . 262, 350 HARD_REGNO_RENAME_OK . . . . . . . . . . . . . . . . . . . . . . . 551
gsi_insert_before . . . . . . . . . . . . . . . . . . . . . . 262, 350 HAS_INIT_SECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658
gsi_insert_on_edge . . . . . . . . . . . . . . . . . . . . . 263, 350 HAS_LONG_COND_BRANCH . . . . . . . . . . . . . . . . . . . . . . . 687
gsi_insert_on_edge_immediate . . . . . . . . . . . . . . 263 HAS_LONG_UNCOND_BRANCH . . . . . . . . . . . . . . . . . . . . . 687
gsi_insert_seq_after . . . . . . . . . . . . . . . . . . . . . . . 262 HAVE_DOS_BASED_FILE_SYSTEM . . . . . . . . . . . . . . . . 712
gsi_insert_seq_before . . . . . . . . . . . . . . . . . . . . . . 262 HAVE_POST_DECREMENT . . . . . . . . . . . . . . . . . . . . . . . . 605
gsi_insert_seq_on_edge . . . . . . . . . . . . . . . . . . . . . 263 HAVE_POST_INCREMENT . . . . . . . . . . . . . . . . . . . . . . . . 605
gsi_last . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261, 350 HAVE_POST_MODIFY_DISP . . . . . . . . . . . . . . . . . . . . . . 605
gsi_last_bb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 HAVE_POST_MODIFY_REG . . . . . . . . . . . . . . . . . . . . . . . 606
gsi_link_after . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 HAVE_PRE_DECREMENT . . . . . . . . . . . . . . . . . . . . . . . . . . 605
gsi_link_before . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 HAVE_PRE_INCREMENT . . . . . . . . . . . . . . . . . . . . . . . . . . 605
gsi_link_seq_after . . . . . . . . . . . . . . . . . . . . . . . . . . 262 HAVE_PRE_MODIFY_DISP . . . . . . . . . . . . . . . . . . . . . . . 605
gsi_link_seq_before . . . . . . . . . . . . . . . . . . . . . . . . 261 HAVE_PRE_MODIFY_REG . . . . . . . . . . . . . . . . . . . . . . . . 606
gsi_move_after . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 HCmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
gsi_move_before . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 HFmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
gsi_move_to_bb_end . . . . . . . . . . . . . . . . . . . . . . . . . . 263 high . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
gsi_next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261, 350 high-part multiplication . . . . . . . . . . . . . . . . . . . . . . . 307
gsi_one_before_end_p . . . . . . . . . . . . . . . . . . . . . . . 261 HImode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
gsi_prev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261, 350 HImode, in insn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
gsi_remove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261, 350 HONOR_REG_ALLOC_ORDER . . . . . . . . . . . . . . . . . . . . . . 549
gsi_replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 host configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
gsi_seq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 host functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
gsi_split_seq_after . . . . . . . . . . . . . . . . . . . . . . . . 262 host hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
gsi_split_seq_before . . . . . . . . . . . . . . . . . . . . . . . 262 host makefile fragment . . . . . . . . . . . . . . . . . . . . . . . . 718
gsi_start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260, 349 HOST_BIT_BUCKET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712
gsi_start_bb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 HOST_EXECUTABLE_SUFFIX . . . . . . . . . . . . . . . . . . . . . 712
gsi_stmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 HOST_HOOKS_EXTRA_SIGNALS . . . . . . . . . . . . . . . . . . . 711
gsi_stmt_ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 HOST_HOOKS_GT_PCH_ALLOC_GRANULARITY . . . . . . 711
gt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 HOST_HOOKS_GT_PCH_GET_ADDRESS . . . . . . . . . . . . . 711
gt and attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 HOST_HOOKS_GT_PCH_USE_ADDRESS . . . . . . . . . . . . . 711
GT_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 HOST_LACKS_INODE_NUMBERS . . . . . . . . . . . . . . . . . . . 713
gtu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 HOST_LONG_FORMAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
gtu and attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 HOST_LONG_LONG_FORMAT . . . . . . . . . . . . . . . . . . . . . . 714
GTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723 HOST_OBJECT_SUFFIX . . . . . . . . . . . . . . . . . . . . . . . . . . 712
guidelines for diagnostics . . . . . . . . . . . . . . . . . . . . . . 767 HOST_PTR_PRINTF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
guidelines for options . . . . . . . . . . . . . . . . . . . . . . . . . 774 HOT_TEXT_SECTION_NAME . . . . . . . . . . . . . . . . . . . . . . 635
guidelines, user experience . . . . . . . . . . . . . . . . . . . . 767 HQmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Concept Index 847
I INIT_CUMULATIVE_INCOMING_ARGS . . . . . . . . . . . . . 582
‘i’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 INIT_CUMULATIVE_LIBCALL_ARGS . . . . . . . . . . . . . . 582
‘I’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 INIT_ENVIRONMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 INIT_EXPANDERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
IDENTIFIER_LENGTH . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 INIT_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
IDENTIFIER_NODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 INIT_SECTION_ASM_OP . . . . . . . . . . . . . . . . . . . . 636, 657
IDENTIFIER_OPNAME_P . . . . . . . . . . . . . . . . . . . . . . . . 179 INITIAL_ELIMINATION_OFFSET . . . . . . . . . . . . . . . . 576
IDENTIFIER_POINTER . . . . . . . . . . . . . . . . . . . . . . . . . . 179 INITIAL_FRAME_ADDRESS_RTX. . . . . . . . . . . . . . . . . . 565
IDENTIFIER_TYPENAME_P . . . . . . . . . . . . . . . . . . . . . . 179 initialization routines . . . . . . . . . . . . . . . . . . . . . . . . . 656
IEEE 754-2008 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 inlining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
if_then_else . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 insert_insn_on_edge . . . . . . . . . . . . . . . . . . . . . . . . 350
if_then_else and attributes . . . . . . . . . . . . . . . . . . 492 insn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
if_then_else usage . . . . . . . . . . . . . . . . . . . . . . . . . . 315 insn and ‘/f’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
IF_COND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 insn and ‘/j’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
IF_STMT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 insn and ‘/s’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284, 286
IFCVT_MACHDEP_INIT . . . . . . . . . . . . . . . . . . . . . . . . . . 696 insn and ‘/u’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
IFCVT_MODIFY_CANCEL . . . . . . . . . . . . . . . . . . . . . . . . 696 insn and ‘/v’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
IFCVT_MODIFY_FINAL . . . . . . . . . . . . . . . . . . . . . . . . . . 696 insn attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
IFCVT_MODIFY_INSN . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 insn canonicalization . . . . . . . . . . . . . . . . . . . . . . . . . . 475
IFCVT_MODIFY_MULTIPLE_TESTS . . . . . . . . . . . . . . . 696 insn includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
IFCVT_MODIFY_TESTS . . . . . . . . . . . . . . . . . . . . . . . . . . 696 insn lengths, computing . . . . . . . . . . . . . . . . . . . . . . . 496
IFN_VEC_WIDEN_MINUS . . . . . . . . . . . . . . . . . . . . . . . . 201 insn notes, notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
IFN_VEC_WIDEN_MINUS_EVEN . . . . . . . . . . . . . . . . . . . 201 insn splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
IFN_VEC_WIDEN_MINUS_HI . . . . . . . . . . . . . . . . . . . . . 201 insn-attr.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
IFN_VEC_WIDEN_MINUS_LO . . . . . . . . . . . . . . . . . . . . . 201 insn_list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
IFN_VEC_WIDEN_MINUS_ODD . . . . . . . . . . . . . . . . . . . . 201 INSN_ANNULLED_BRANCH_P . . . . . . . . . . . . . . . . . . . . . 284
IFN_VEC_WIDEN_PLUS . . . . . . . . . . . . . . . . . . . . . . . . . . 201 INSN_BASE_REG_CLASS . . . . . . . . . . . . . . . . . . . . . . . . 555
IFN_VEC_WIDEN_PLUS_EVEN . . . . . . . . . . . . . . . . . . . . 201 INSN_CODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
IFN_VEC_WIDEN_PLUS_HI . . . . . . . . . . . . . . . . . . . . . . 201 INSN_DELETED_P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
IFN_VEC_WIDEN_PLUS_LO . . . . . . . . . . . . . . . . . . . . . . 201 INSN_FROM_TARGET_P . . . . . . . . . . . . . . . . . . . . . . . . . . 284
IFN_VEC_WIDEN_PLUS_ODD . . . . . . . . . . . . . . . . . . . . . 201 INSN_INDEX_REG_CLASS . . . . . . . . . . . . . . . . . . . . . . . 555
IMAGPART_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 INSN_REFERENCES_ARE_DELAYED . . . . . . . . . . . . . . . 695
Immediate Uses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 INSN_SETS_ARE_DELAYED . . . . . . . . . . . . . . . . . . . . . . 694
immediate_operand . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 INSN_UID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
IMMEDIATE_PREFIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662 INSN_VAR_LOCATION . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
in_struct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 insns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
in_struct, in code_label and note . . . . . . . . . . . 284 insns, generating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
in_struct, in insn and jump_insn insns, recognizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
and call_insn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 instruction attributes . . . . . . . . . . . . . . . . . . . . . . . . . 490
in_struct, in insn, call_insn, jump_insn instruction latency time . . . . . . . . . . . . . 499, 501, 502
and jump_table_data . . . . . . . . . . . . . . . . . . . . . . 286 instruction patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
in_struct, in subreg . . . . . . . . . . . . . . . . . . . . . . . . . 287 instruction splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 instructions, RTL SSA . . . . . . . . . . . . . . . . . . . . . . . . 332
INCLUDE_DEFAULTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 insv instruction pattern . . . . . . . . . . . . . . . . . . . . . . 452
inclusive-or, bitwise . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 insvm instruction pattern . . . . . . . . . . . . . . . . . . . . . 452
INCOMING_FRAME_SP_OFFSET . . . . . . . . . . . . . . . . . . . 567 insvmisalignm instruction pattern . . . . . . . . . . . . 452
INCOMING_REG_PARM_STACK_SPACE . . . . . . . . . . . . . 578 int iterators in .md files . . . . . . . . . . . . . . . . . . . . . . . 515
INCOMING_REGNO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 INT_FAST16_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
INCOMING_RETURN_ADDR_RTX . . . . . . . . . . . . . . . . . . . 566 INT_FAST32_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
INCOMING_STACK_BOUNDARY . . . . . . . . . . . . . . . . . . . . 533 INT_FAST64_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
INDEX_REG_CLASS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 INT_FAST8_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
indirect_jump instruction pattern . . . . . . . . . . . . 459 INT_LEAST16_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
indirect_operand . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 INT_LEAST32_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
INDIRECT_REF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 INT_LEAST64_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
init_machine_status . . . . . . . . . . . . . . . . . . . . . . . . 530 INT_LEAST8_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
init_one_libfunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603 INT_TYPE_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
INIT_ARRAY_SECTION_ASM_OP. . . . . . . . . . . . . . . . . . 636 INT16_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
INIT_CUMULATIVE_ARGS . . . . . . . . . . . . . . . . . . . . . . . 581 INT32_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
848 GNU Compiler Collection (GCC) Internals
OMP_PARALLEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 P
OMP_RETURN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 ‘p’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
OMP_SECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 PAD_VARARGS_DOWN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
OMP_SECTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
OMP_SIMD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 parameters, c++ abi . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
OMP_SINGLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 parameters, d abi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
OMP_TASKLOOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 parameters, miscellaneous . . . . . . . . . . . . . . . . . . . . . 687
one_cmplm2 instruction pattern . . . . . . . . . . . . . . . 447 parameters, precompiled headers . . . . . . . . . . . . . . 681
OPAQUE_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 parameters, rust abi . . . . . . . . . . . . . . . . . . . . . . . . . . 685
operand access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 parity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Operand Access Routines . . . . . . . . . . . . . . . . . . . . . 267 paritym2 instruction pattern . . . . . . . . . . . . . . . . . . 447
operand constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 PARM_BOUNDARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
Operand Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 PARM_DECL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
operand predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 PARSE_LDD_OUTPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
operand substitution . . . . . . . . . . . . . . . . . . . . . . . . . . 369 pass dumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265, 364 pass_duplicate_computed_gotos . . . . . . . . . . . . . 347
Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 passes and files of the compiler . . . . . . . . . . . . . . . . 143
operator predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 passing arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
opt_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 PATH_SEPARATOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712
‘optc-gen.awk’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 pattern conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
OPTGROUP_ALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 pattern names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
OPTGROUP_INLINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Pattern Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
OPTGROUP_IPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
OPTGROUP_LOOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 PATTERN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
OPTGROUP_OMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 pc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
OPTGROUP_OTHER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 pc and attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
OPTGROUP_VEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 pc, RTL sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
optimization dumps . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 pc_rtx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
optimization groups . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 PC_REGNUM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
optimization info file names . . . . . . . . . . . . . . . . . . . 160 PCC_BITFIELD_TYPE_MATTERS. . . . . . . . . . . . . . . . . . 537
Optimization infrastructure for GIMPLE . . . . . . 265 PCC_STATIC_STRUCT_RETURN . . . . . . . . . . . . . . . . . . . 590
OPTIMIZE_MODE_SWITCHING . . . . . . . . . . . . . . . . . . . . 673 PDImode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
option specification files . . . . . . . . . . . . . . . . . . . . . . . 133 peephole optimization, RTL representation . . . . 318
OPTION_DEFAULT_SPECS . . . . . . . . . . . . . . . . . . . . . . . 520 peephole optimizer definitions . . . . . . . . . . . . . . . . . 485
optional hardware or system features . . . . . . . . . . 527 per-function data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
options, directory search . . . . . . . . . . . . . . . . . . . . . . 485 percent sign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
options, guidelines for . . . . . . . . . . . . . . . . . . . . . . . . . 774 phi nodes, RTL SSA . . . . . . . . . . . . . . . . . . . . . . . . . . 335
order of register allocation . . . . . . . . . . . . . . . . . . . . 548 PHI nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
ordered_comparison_operator . . . . . . . . . . . . . . . 376 PIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640
ORDERED_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 PIC_OFFSET_TABLE_REG_CALL_CLOBBERED . . . . . . 640
Ordering of Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . 471 PIC_OFFSET_TABLE_REGNUM . . . . . . . . . . . . . . . . . . . . 640
ORIGINAL_REGNO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 pipeline hazard recognizer . . . . . . . . . . . . . . . . 499, 500
other register constraints . . . . . . . . . . . . . . . . . . . . . . 381 Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
outgoing_args_size . . . . . . . . . . . . . . . . . . . . . . . . . . 577 plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
OUTGOING_REG_PARM_STACK_SPACE . . . . . . . . . . . . . 578 plus and attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
OUTGOING_REGNO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 plus, canonicalization of . . . . . . . . . . . . . . . . . . . . . . 475
output of assembler code . . . . . . . . . . . . . . . . . . . . . . 640 PLUS_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
output statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 Pmode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
output templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 pmode_register_operand . . . . . . . . . . . . . . . . . . . . . 375
output_asm_insn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
OUTPUT_QUOTED_STRING . . . . . . . . . . . . . . . . . . . . . . . 642 POINTER_DIFF_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
OVERLAPPING_REGISTER_NAMES . . . . . . . . . . . . . . . . 660 POINTER_PLUS_EXPR . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
OVERLOAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 POINTER_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
OVERRIDE_ABI_FORMAT . . . . . . . . . . . . . . . . . . . . . . . . 581 POINTER_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
OVL_CURRENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 POINTERS_EXTEND_UNSIGNED . . . . . . . . . . . . . . . . . . . 532
OVL_NEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 poly_int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
poly_int, invariant range . . . . . . . . . . . . . . . . . . . . . 163
poly_int, main typedefs . . . . . . . . . . . . . . . . . . . . . . 164
Concept Index 853