Gccint PDF
Gccint PDF
Gccint PDF
Short Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 Contributing to GCC Development . . . . . . . . . . . . . . . . . . . . . . . 3
2 GCC and Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Interfacing to GCC Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 The GCC low-level runtime library . . . . . . . . . . . . . . . . . . . . . . . 9
5 Language Front Ends in GCC . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6 Source Tree Structure and Build System . . . . . . . . . . . . . . . . . . 61
7 Testsuites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
8 Option specification files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
9 Passes and Files of the Compiler . . . . . . . . . . . . . . . . . . . . . . . 117
10 GENERIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
11 GIMPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
12 Analysis and Optimization of GIMPLE tuples . . . . . . . . . . . . 219
13 RTL Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
14 Control Flow Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
15 Analysis and Representation of Loops . . . . . . . . . . . . . . . . . . . 295
16 Machine Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
17 Target Description Macros and Functions . . . . . . . . . . . . . . . . 435
18 Host Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
19 Makefile Fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
20 collect2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
21 Standard Header File Directories . . . . . . . . . . . . . . . . . . . . . . . 625
22 Memory Management and Type Information . . . . . . . . . . . . . 627
23 Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
24 Link Time Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645
25 Match and Simplify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653
Funding Free Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
The GNU Project and GNU/Linux . . . . . . . . . . . . . . . . . . . . . . . . . 661
GNU General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663
GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . . . 675
Contributors to GCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
Option Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
Concept Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
iii
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
7 Testsuites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.1 Idioms Used in Testsuite Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
7.2 Directives used within DejaGnu tests . . . . . . . . . . . . . . . . . . . . . . . . . . 78
7.2.1 Syntax and Descriptions of test directives . . . . . . . . . . . . . . . . . 78
7.2.1.1 Specify how to build the test . . . . . . . . . . . . . . . . . . . . . . . . 78
7.2.1.2 Specify additional compiler options . . . . . . . . . . . . . . . . . . 79
7.2.1.3 Modify the test timeout value . . . . . . . . . . . . . . . . . . . . . . . 79
7.2.1.4 Skip a test for some targets . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7.2.1.5 Expect a test to fail for some targets. . . . . . . . . . . . . . . . . 80
7.2.1.6 Expect the test executable to fail . . . . . . . . . . . . . . . . . . . . 80
7.2.1.7 Verify compiler messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.2.1.8 Verify output of the test executable . . . . . . . . . . . . . . . . . . 81
7.2.1.9 Specify additional files for a test . . . . . . . . . . . . . . . . . . . . . 81
7.2.1.10 Add checks at the end of a test . . . . . . . . . . . . . . . . . . . . . 81
7.2.2 Selecting targets to which a test applies . . . . . . . . . . . . . . . . . . 82
7.2.3 Keywords describing target attributes . . . . . . . . . . . . . . . . . . . . 82
7.2.3.1 Data type sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
7.2.3.2 Fortran-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.2.3.3 Vector-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.2.3.4 Thread Local Storage attributes . . . . . . . . . . . . . . . . . . . . . 86
7.2.3.5 Decimal floating point attributes. . . . . . . . . . . . . . . . . . . . . 86
7.2.3.6 ARM-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
7.2.3.7 AArch64-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 89
7.2.3.8 MIPS-specific attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
7.2.3.9 PowerPC-specific attributes. . . . . . . . . . . . . . . . . . . . . . . . . . 90
7.2.3.10 Other hardware attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 91
7.2.3.11 Environment attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
7.2.3.12 Other attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
7.2.3.13 Local to tests in gcc.target/i386 . . . . . . . . . . . . . . . . . 95
7.2.3.14 Local to tests in gcc.target/spu/ea . . . . . . . . . . . . . . . 96
v
10 GENERIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
10.1 Deficiencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
10.2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
10.2.1 Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
10.2.2 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
10.2.3 Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
10.3 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
10.4 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
10.4.1 Working with declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
10.4.2 Internal structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
10.4.2.1 Current structure hierarchy . . . . . . . . . . . . . . . . . . . . . . . 144
10.4.2.2 Adding new DECL node types . . . . . . . . . . . . . . . . . . . . 145
10.5 Attributes in trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
10.6 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
10.6.1 Constant expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
10.6.2 References to storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
10.6.3 Unary and Binary Expressions . . . . . . . . . . . . . . . . . . . . . . . . . 150
10.6.4 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10.7 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
10.7.1 Basic Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
10.7.2 Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
10.7.3 Statement Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
10.7.4 Empty Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
10.7.5 Jumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
10.7.6 Cleanups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
10.7.7 OpenMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
10.7.8 OpenACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
10.8 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
10.8.1 Function Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
10.8.2 Function Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
10.9 Language-dependent trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
10.10 C and C++ Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
10.10.1 Types for C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
10.10.2 Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
10.10.3 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
10.10.4 Functions for C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
10.10.5 Statements for C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
10.10.5.1 Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
10.10.6 C++ Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
10.11 Java Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
vii
11 GIMPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
11.1 Tuple representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
11.1.1 gimple (gsbase) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
11.1.2 gimple_statement_with_ops . . . . . . . . . . . . . . . . . . . . . . . . . . 183
11.1.3 gimple_statement_with_memory_ops . . . . . . . . . . . . . . . . . . 183
11.2 Class hierarchy of GIMPLE statements. . . . . . . . . . . . . . . . . . . . . . 184
11.3 GIMPLE instruction set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
11.4 Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
11.5 Temporaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
11.6 Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
11.6.1 Compound Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.6.2 Compound Lvalues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.6.3 Conditional Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.6.4 Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.6.5 Manipulating operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.6.6 Operand vector allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
11.6.7 Operand validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
11.6.8 Statement validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
11.7 Manipulating GIMPLE statements . . . . . . . . . . . . . . . . . . . . . . . . . . 192
11.7.1 Common accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
11.8 Tuple specific accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
11.8.1 GIMPLE_ASM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
11.8.2 GIMPLE_ASSIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
11.8.3 GIMPLE_BIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
11.8.4 GIMPLE_CALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
11.8.5 GIMPLE_CATCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
11.8.6 GIMPLE_COND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
11.8.7 GIMPLE_DEBUG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
11.8.8 GIMPLE_EH_FILTER. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
11.8.9 GIMPLE_LABEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
11.8.10 GIMPLE_GOTO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
11.8.11 GIMPLE_NOP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
11.8.12 GIMPLE_OMP_ATOMIC_LOAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
11.8.13 GIMPLE_OMP_ATOMIC_STORE . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
11.8.14 GIMPLE_OMP_CONTINUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
11.8.15 GIMPLE_OMP_CRITICAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
11.8.16 GIMPLE_OMP_FOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
11.8.17 GIMPLE_OMP_MASTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
11.8.18 GIMPLE_OMP_ORDERED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
11.8.19 GIMPLE_OMP_PARALLEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
11.8.20 GIMPLE_OMP_RETURN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
11.8.21 GIMPLE_OMP_SECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
11.8.22 GIMPLE_OMP_SECTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
11.8.23 GIMPLE_OMP_SINGLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
11.8.24 GIMPLE_PHI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
11.8.25 GIMPLE_RESX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
11.8.26 GIMPLE_RETURN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
11.8.27 GIMPLE_SWITCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
viii GNU Compiler Collection (GCC) Internals
20 collect2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
23 Plugins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
23.1 Loading Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
23.2 Plugin API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
23.2.1 Plugin license check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
23.2.2 Plugin initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
23.2.3 Plugin callbacks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
23.3 Interacting with the pass manager. . . . . . . . . . . . . . . . . . . . . . . . . . . 640
23.4 Interacting with the GCC Garbage Collector . . . . . . . . . . . . . . . . 641
23.5 Giving information about a plugin . . . . . . . . . . . . . . . . . . . . . . . . . . 641
23.6 Registering custom attributes or pragmas . . . . . . . . . . . . . . . . . . . 641
23.7 Recording information about pass execution . . . . . . . . . . . . . . . . . 642
23.8 Controlling which passes are being run . . . . . . . . . . . . . . . . . . . . . . 643
23.9 Keeping track of available passes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
23.10 Building GCC plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
xiii
Introduction
This manual documents the internals of the GNU compilers, including how to port them
to new targets and some information about how to write front ends for new languages. It
corresponds to the compilers (GNU Tools for Arm Embedded Processors 7-2017-q4-major)
version 7.2.1. The use of the GNU compilers is documented in a separate manual. See
Section “Introduction” in Using the GNU Compiler Collection (GCC).
This manual is mainly a reference manual rather than a tutorial. It discusses how to con-
tribute to GCC (see Chapter 1 [Contributing], page 3), the characteristics of the machines
supported by GCC as hosts and targets (see Chapter 2 [Portability], page 5), how GCC
relates to the ABIs on such systems (see Chapter 3 [Interface], page 7), and the character-
istics of the languages for which GCC front ends are written (see Chapter 5 [Languages],
page 59). It then describes the GCC source tree structure and build system, some of the
interfaces to GCC front ends, and how support for a target system is implemented in GCC.
Additional tutorial information is linked to from http://gcc.gnu.org/readings.html.
Chapter 1: Contributing to GCC Development 3
There is also a complete group of higher level functions which correspond directly to
comparison operators. They implement the ISO C semantics for floating-point comparisons,
taking NaN into account. Pay careful attention to the return values defined for each set.
Under the hood, all of these routines are implemented as
if (__unordXf2 (a, b))
return E;
return __cmpXf2 (a, b);
where E is a constant chosen to give the proper behavior for NaN. Thus, the meaning
of the return value is different for each set. Do not rely on this implementation; only the
semantics documented below are guaranteed.
There is also a complete group of higher level functions which correspond directly to
comparison operators. They implement the ISO C semantics for floating-point comparisons,
taking NaN into account. Pay careful attention to the return values defined for each set.
Under the hood, all of these routines are implemented as
Chapter 4: The GCC low-level runtime library 21
where E is a constant chosen to give the proper behavior for NaN. Thus, the meaning
of the return value is different for each set. Do not rely on this implementation; only the
semantics documented below are guaranteed.
unsigned long long accum __neguta2 (unsigned long long [Runtime Function]
accum a)
These functions return the negation of a.
unsigned long long accum __ashluta3 (unsigned long long [Runtime Function]
accum a, int b)
These functions return the result of shifting a left by b bits.
_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
There is no way to iterate over the stack segments of a different thread. However,
what is permitted is for one thread to call this with the segment arg and sp argu-
ments NULL, to pass next segment, next sp, and initial sp to a different thread, and
then to suspend one way or another. A different thread may run the subsequent
__splitstack_find iterations. Of course, this will only work if the first thread is
suspended while the second thread is calling __splitstack_find. If not, the second
thread could be looking at the stack while it is changing, and anything could happen.
__morestack_segments [Variable]
__morestack_current_segment [Variable]
__morestack_initial_sp [Variable]
Internal variables used by the ‘-fsplit-stack’ implementation.
Chapter 5: Language Front Ends in GCC 59
‘boehm-gc’
The Boehm conservative garbage collector, optionally used as part of the ObjC
runtime library when configured with ‘--enable-objc-gc’.
‘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 mech-
anism 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 63, for details.
‘gnattools’
Support tools for GNAT.
‘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).
‘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.
‘libgo’ The Go runtime library. The bulk of this library is mirrored from the master
Go repository.
‘libgomp’ The GNU Offloading and Multi Processing Runtime Library.
‘libiberty’
The libiberty library, used for portability and for some generally useful data
structures and algorithms. See Section “Introduction” in gnu libiberty, for
more information about this library.
‘libitm’ The runtime support library for transactional memory.
Chapter 6: Source Tree Structure and Build System 63
‘doc’ Texinfo documentation for GCC, together with automatically generated man
pages and support for converting the installation manual to HTML. See
Section 6.3.7 [Documentation], page 69.
‘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 68, 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 ex-
tract 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 77.
The ‘config.gcc’ file contains specific rules for particular systems which GCC will gen-
erate code for. This is usually needed.
Each file has a list of the shell variables it sets, with descriptions, at the top of the file.
FIXME: document the contents of these files, and what variables should be set to control
build, host and target configuration.
The following configuration headers are created from the Makefile, using ‘mkconfig.sh’,
rather than directly by ‘configure’. ‘config.h’, ‘bconfig.h’ and ‘tconfig.h’ all contain
the ‘xm-machine.h’ header, if any, appropriate to the host, build and target machines
respectively, the configuration headers for the target, and some definitions; for the host
and build machines, these include the autoconfigured headers generated by ‘configure’.
The other configuration headers are determined by ‘config.gcc’. They also contain the
typedefs for rtx, rtvec and tree.
• ‘config.h’, for use in programs that run on the host machine.
• ‘bconfig.h’, for use in programs that run on the build machine.
• ‘tconfig.h’, for use in programs and libraries for the target machine.
• ‘tm_p.h’, which includes the header ‘machine-protos.h’ that contains prototypes
for functions in the target ‘machine.c’ file. The header ‘machine-protos.h’
can include prototypes of functions that use rtl and tree data structures inside
appropriate #ifdef RTX_CODE and #ifdef TREE_CODE conditional code segements.
The ‘machine-protos.h’ 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.
66 GNU Compiler Collection (GCC) Internals
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.
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.
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.
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.
68 GNU Compiler Collection (GCC) Internals
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.
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’
directory 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 68, for more information about the ‘ginclude’ directory.
In addition to these headers and those generated by fixing system headers to work with
GCC, some other headers may also be installed in ‘libsubdir/include’. ‘config.gcc’
may set extra_headers; this specifies additional headers under ‘config’ to be installed on
some systems.
GCC installs its own version of <float.h>, from ‘ginclude/float.h’. This is done to
cope with command-line options that change the representation of floating point numbers.
GCC also installs its own version of <limits.h>; this is generated from ‘glimits.h’, to-
gether with ‘limitx.h’ and ‘limity.h’ if the system also has its own version of <limits.h>.
(GCC provides its own header because it is required of ISO C freestanding implementations,
but needs to include the system header from its own header as well because other stan-
dards such as POSIX specify additional values to be defined in <limits.h>.) The system’s
<limits.h> header is used via ‘libsubdir/include/syslimits.h’, which is copied from
‘gsyslimits.h’ if it does not need fixing to work with GCC; if it needs fixing, ‘syslimits.h’
is the fixed copy.
GCC can also install <tgmath.h>. It will do this when ‘config.gcc’ sets use_gcc_tgmath
to yes.
by ‘make html’. Info manuals are generated by ‘make info’ (which is run as part of a boot-
strap); this generates the manuals in the source directory, using makeinfo via the Makefile
macro $(MAKEINFO), and they are included in release distributions.
Manuals are also provided on the GCC web site, in both HTML and PostScript forms.
This is done via the script ‘maintainer-scripts/update_web_docs_svn’. Each manual to
be provided online must be listed in the definition of MANUALS in that file; a file ‘name.texi’
must only appear once in the source tree, and the output manual must have the same
name as the source file. (However, other Texinfo files, included in manuals but not them-
selves the root files of manuals, may have names that appear more than once in the source
tree.) The manual file ‘name.texi’ should only include other files in its own directory or in
‘doc/include’. HTML manuals will be generated by ‘makeinfo --html’, PostScript manu-
als by texi2dvi and dvips, and PDF manuals by texi2pdf. All Texinfo files that are parts
of manuals must be version-controlled, even if they are generated files, for the generation
of online manuals to work.
The installation manual, ‘doc/install.texi’, is also provided on the GCC web site. The
HTML version is generated by the script ‘doc/install.texi2html’.
‘Make-lang.in’
This file is required in all language subdirectories. See Section 6.3.8.3 [The
Front End ‘Make-lang.in’ File], page 74, for details of its contents.
‘lang.opt’
This file registers the set of switches that the front end accepts on the command
line, and their ‘--help’ text. See Chapter 8 [Options], page 109.
‘lang-specs.h’
This file provides entries for default_compilers in ‘gcc.c’ which override the
default of giving an error that a compiler for that language is not installed.
‘language-tree.def’
This file, which need not exist, defines any language-specific tree codes.
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.c’
to generate the garbage collection tables and routines for this language. This
excludes the files that are common to all front ends. See Chapter 22 [Type
Information], page 627.
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.
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
78 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.
int32plus
Target has int that is at 32 bits or longer.
int16 Target has int that is 16 bits or shorter.
long_neq_int
Target has int and long with different sizes.
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.
size32plus
Target supports array and structure sizes that are 32 bits or longer.
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.
vect_double
Target supports hardware vectors of double.
vect_float
Target supports hardware vectors of float.
vect_int Target supports hardware vectors of int.
vect_long
Target supports hardware vectors of long.
vect_long_long
Target supports hardware vectors of long long.
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_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_char_mult
Target supports vector char multiplication.
vect_short_mult
Target supports vector short multiplication.
vect_int_mult
Target supports vector int 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.
Chapter 7: Testsuites 85
vect_perm
Target supports vector permutation.
vect_shift
Target supports a hardware vector shift operation.
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_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.
vect_intfloat_cvt
Target supports conversion from signed int to float.
vect_uintfloat_cvt
Target supports conversion from unsigned int to float.
86 GNU Compiler Collection (GCC) Internals
vect_floatint_cvt
Target supports conversion from float to signed int.
vect_floatuint_cvt
Target supports conversion from float to unsigned int.
vect_max_reduc
Target supports max reduction for vectors.
arm_vfp3_ok
ARM target supports -mfpu=vfp3 -mfloat-abi=softfp. Some multilibs may
be incompatible with these options.
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 Adv.SIMD instructions.
Some multilibs may be incompatible with these options.
arm_v8_1a_neon_hw
ARM target supports executing ARMv8.1 Adv.SIMD instructions. Some multi-
libs 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 and scalar
instructions from the FP16 extension. Some multilibs may be incompatible
with these options.
arm_v8_2a_fp16_scalar_hw
ARM target supports executing instructions for ARMv8.2 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 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 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_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.
Chapter 7: Testsuites 89
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_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 89 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 89 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 89 in addition the following: MCRR2 and MRRC2.
mips16_attribute
MIPS target can generate MIPS16 code.
mips_loongson
MIPS target is a Loongson-2E or -2F target using an ABI that supports the
Loongson vector modes.
mips_msa MIPS target supports -mmsa, MIPS SIMD Architecture (MSA).
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
PowerPC target supports PowerPC SPE.
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.
spu_auto_overlay
SPU target has toolchain that supports automatic overlay generation.
vmx_hw PowerPC target supports executing AltiVec instructions.
vsx_hw PowerPC target supports executing VSX instructions (ISA 2.06).
sync_char_short
Target supports atomic operations on char and short.
sync_int_long
Target supports atomic operations on int and long.
ultrasparc_hw
Test environment appears to run executables on a simulator that accepts only
EM_SPARC executables and chokes on EM_SPARC32PLUS or EM_SPARCV9 executa-
bles.
vect_cmdline_needed
Target requires a command line argument to enable a SIMD instruction set.
pie_copyreloc
The x86-64 target linker supports PIE with copy reloc.
divmod Target supporting hardware divmod insn or divmod libcall.
divmod_simode
Target supporting hardware divmod insn or divmod libcall for SImode.
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.
pow10 Target provides pow10 function.
pthread Target can compile using pthread.h with no errors or warnings.
pthread_h
Target has pthread.h.
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).
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.
stpcpy Target provides stpcpy function.
trampolines
Target supports trampolines.
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.
cxa_atexit
Target uses __cxa_atexit.
default_packed
Target has packed layout of structure members by default.
fgraphite
Target supports Graphite optimizations.
fixed_point
Target supports fixed-point extension to C.
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.
lto Compiler has been configured to support link-time optimization (LTO).
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.
target_natural_alignment_64
Target uses natural alignment (aligned to type size) for types of 64 bits or less.
nonpic Target does not generate PIC by default.
pie_enabled
Target generates PIE by default.
pcc_bitfield_type_matters
Target defines PCC_BITFIELD_TYPE_MATTERS.
pe_aligned_commons
Target supports ‘-mpe-aligned-commons’.
Chapter 7: Testsuites 95
arm_v8_2a_fp16_scalar
Add options for ARMv8.2 with scalar FP16 support, if this is supported by the
target; see the [arm v8 2a fp16 scalar ok], page 88 effective target keyword.
arm_v8_2a_fp16_neon
Add options for ARMv8.2 with Adv.SIMD FP16 support, if this is supported by
the target; see the [arm v8 2a fp16 neon ok], page 88 effective target keyword.
bind_pic_locally
Add the target-specific flags needed to enable functions to bind locally when
using pic/PIC passes in the testsuite.
c99_runtime
Add the target-specific flags needed to access the C99 runtime.
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.
tls Add the target-specific flags needed to use thread-local storage.
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-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-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.
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’.
// { dg-options "-save-temps -fpch-preprocess -I." }
int main() { return 0; }
// { dg-keep-saved-temps ".s" } ! just keep assembler file
// { dg-keep-saved-temps ".s" ".i" } ! ... and .i
// { dg-keep-saved-temps ".ii" ".o" } ! or just .ii and .o
cleanup-profile-file
Removes profiling files generated for this test.
cleanup-repo-files
Removes files generated for this test for ‘-frepo’.
Chapter 7: Testsuites 101
‘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 NO_LABEL_
VALUES and 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 [Support for testing profile-directed optimizations],
page 104).
‘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 103).
‘i386-pf-*.c’
Test i386-specific support for data prefetch using
‘i386-prefetch.exp’.
Chapter 7: Testsuites 103
‘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.
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.
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.
• 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;
return;
}
Name(name)
This property is required; name must be a name (suitable for use in C
identifiers) used to identify the set of strings in Enum option properties.
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.
• An option definition record. These records have the following fields:
1. the name of the option, with the leading “-” removed
2. a space-separated list of option properties (see Section 8.2 [Option properties],
page 111)
3. the help text to use for ‘--help’ (omitted if the second field contains the
Undocumented property).
By default, all options beginning with “f”, “W” or “m” are implicitly assumed to take a
“no-” form. This form should not be listed separately. If an option beginning with one
of these letters does not have a “no-” form, you can use the RejectNegative property
to reject it.
Chapter 8: Option specification files 111
The help text is automatically line-wrapped before being displayed. Normally the name
of the option is printed on the left-hand side of the output and the help text is printed
on the right. However, if the help text contains a tab character, the text to the left of
the tab is used instead of the option’s name and the text to the right of the tab forms
the help text. This allows you to elaborate on what type of argument the option takes.
• A target mask record. These records have one field of the form ‘Mask(x)’. The options-
processing script will automatically allocate a bit in target_flags (see Section 17.3
[Run-time Target], page 442) for each mask name x and set the macro MASK_x to the
appropriate bitmask. It will also declare a TARGET_x macro that has the value 1 when
bit MASK_x is set and 0 otherwise.
They are primarily intended to declare target masks that are not associated with user
options, either because these masks represent internal switches or because the options
are not available on all configurations and yet the masks always need to be defined.
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. The option parser will check
and convert the argument before passing it to the relevant option handler.
UInteger should also be used on options like -falign-loops where both -
falign-loops and -falign-loops=n are supported to make sure the saved
options are given a full integer.
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
Chapter 8: Option specification files 113
has the same argument as the Enum property of this option) that stores the
value of the argument.
• If the option has the Defer property, var is a pointer to a
VEC(cl_deferred_option,heap) that stores the option for later
processing. (var is declared with type void * and needs to be cast to
VEC(cl_deferred_option,heap) before use.)
• Otherwise, if the option takes an argument, var is a pointer to the argument
string. The pointer will be null if the argument is optional and wasn’t given.
The option-processing script will usually zero-initialize var. You can modify
this behavior using Init.
Var(var, set)
The option controls an integer variable var and is active when var equals set.
The option parser will set var to set when the positive form of the option is
used and !set when the “no-” form is used.
var is declared in the same way as for the single-argument form described above.
Init(value)
The variable specified by the Var property should be statically initialized to
value. If more than one option using the same variable specifies Init, all must
specify the same initializer.
Mask(name)
The option is associated with a bit in the target_flags variable (see
Section 17.3 [Run-time Target], page 442) and is active when that bit is set.
You may also specify Var to select a variable other than target_flags.
The options-processing script will automatically allocate a unique bit for the
option. If the option is attached to ‘target_flags’, the script will set the
macro MASK_name to the appropriate bitmask. It will also declare a TARGET_
name macro that has the value 1 when the option is active and 0 otherwise. If
you use Var to attach the option to a different variable, the bitmask macro with
be called OPTION_MASK_name.
InverseMask(othername)
InverseMask(othername, thisname)
The option is the inverse of another option that has the Mask(othername) prop-
erty. If thisname is given, the options-processing script will declare a TARGET_
thisname macro that is 1 when the option is active and 0 otherwise.
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.
Defer The option should be stored in a vector, specified with Var, for later processing.
114 GNU Compiler Collection (GCC) Internals
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.
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’.
Chapter 8: Option specification files 115
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.
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,
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 109.
116 GNU Compiler Collection (GCC) Internals
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.
Chapter 9: Passes and Files of the Compiler 117
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.
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.c’ 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.c’ 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.c’ and is defined by pass_early_
warn_uninitialized and pass_late_warn_uninitialized.
• Dead code elimination
This pass scans the function for statements without side effects whose result is unused.
It does not do memory life analysis, so any value that is stored in memory is considered
used. The pass is run multiple times throughout the optimization process. It is located
in ‘tree-ssa-dce.c’ and is described by pass_dce.
• Dominator optimizations
This pass performs trivial dominator-based copy and constant propagation, expression
simplification, and jump threading. It is run multiple times throughout the optimiza-
tion process. It is located in ‘tree-ssa-dom.c’ and is described by pass_dominator.
• Forward propagation of single-use variables
This pass attempts to remove redundant computation by substituting variables that are
used once into the expression that uses them and seeing if the result can be simplified.
It is located in ‘tree-ssa-forwprop.c’ and is described by pass_forwprop.
• Copy Renaming
This pass attempts to change the name of compiler temporaries involved in copy oper-
ations such that SSA->normal can coalesce the copy away. When compiler temporaries
are copies of user variables, it also renames the compiler temporary to the user variable
resulting in better use of user symbols. It is located in ‘tree-ssa-copyrename.c’ and
is described by pass_copyrename.
• PHI node optimizations
This pass recognizes forms of PHI inputs that can be represented as conditional expres-
sions and rewrites them into straight line code. It is located in ‘tree-ssa-phiopt.c’
and is described by pass_phiopt.
• May-alias optimization
This pass performs a flow sensitive SSA-based points-to analysis. The resulting may-
alias, must-alias, and escape analysis information is used to promote variables from
in-memory addressable objects to non-aliased variables that can be renamed into SSA
122 GNU Compiler Collection (GCC) Internals
form. We also update the VDEF/VUSE memory tags for non-renameable aggregates so
that we get fewer false kills. The pass is located in ‘tree-ssa-alias.c’ and is described
by pass_may_alias.
Interprocedural points-to information is located in ‘tree-ssa-structalias.c’ and de-
scribed by pass_ipa_pta.
• Profiling
This pass instruments the function in order to collect runtime block and value profiling
data. Such data may be fed back into the compiler on a subsequent run so as to
allow optimization based on expected execution frequencies. The pass is located in
‘tree-profile.c’ and is described by pass_ipa_tree_profile.
• Static profile estimation
This pass implements series of heuristics to guess propababilities of branches. The
resulting predictions are turned into edge profile by propagating branches across the
control flow graphs. The pass is located in ‘tree-profile.c’ and is described by
pass_profile.
• Lower complex arithmetic
This pass rewrites complex arithmetic operations into their component scalar arith-
metic operations. The pass is located in ‘tree-complex.c’ and is described by pass_
lower_complex.
• Scalar replacement of aggregates
This pass rewrites suitable non-aliased local aggregate variables into a set of scalar
variables. The resulting scalar variables are rewritten into SSA form, which allows
subsequent optimization passes to do a significantly better job with them. The pass is
located in ‘tree-sra.c’ and is described by pass_sra.
• Dead store elimination
This pass eliminates stores to memory that are subsequently overwritten by another
store, without any intervening loads. The pass is located in ‘tree-ssa-dse.c’ and is
described by pass_dse.
• Tail recursion elimination
This pass transforms tail recursion into a loop. It is located in ‘tree-tailcall.c’ and
is described by pass_tail_recursion.
• Forward store motion
This pass sinks stores and assignments down the flowgraph closer to their use point.
The pass is located in ‘tree-ssa-sink.c’ and is described by pass_sink_code.
• Partial redundancy elimination
This pass eliminates partially redundant computations, as well as performing load
motion. The pass is located in ‘tree-ssa-pre.c’ and is described by pass_pre.
Just before partial redundancy elimination, if ‘-funsafe-math-optimizations’ is on,
GCC tries to convert divisions to multiplications by the reciprocal. The pass is located
in ‘tree-ssa-math-opts.c’ and is described by pass_cse_reciprocal.
• Full redundancy elimination
This is a simpler form of PRE that only eliminates redundancies that occur on all
paths. It is located in ‘tree-ssa-pre.c’ and described by pass_fre.
Chapter 9: Passes and Files of the Compiler 123
• Loop optimization
The main driver of the pass is placed in ‘tree-ssa-loop.c’ and described by pass_
loop.
The optimizations performed by this pass are:
Loop invariant motion. This pass moves only invariants that would be hard to handle
on RTL level (function calls, operations that expand to nontrivial sequences of insns).
With ‘-funswitch-loops’ it also moves operands of conditions that are invariant out of
the loop, so that we can use just trivial invariantness analysis in loop unswitching. The
pass also includes store motion. The pass is implemented in ‘tree-ssa-loop-im.c’.
Canonical induction variable creation. This pass creates a simple counter for number
of iterations of the loop and replaces the exit condition of the loop using it, in case
when a complicated analysis is necessary to determine the number of iterations. Later
optimizations then may determine the number easily. The pass is implemented in
‘tree-ssa-loop-ivcanon.c’.
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.c’.
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.c’.
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.c’.
The optimizations also use various utility functions contained in ‘tree-ssa-loop-manip.c’,
‘cfgloop.c’, ‘cfgloopanal.c’ and ‘cfgloopmanip.c’.
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.c’ (the main driver),
‘tree-vect-loop.c’ and ‘tree-vect-loop-manip.c’ (loop specific parts and general
loop utilities), ‘tree-vect-slp’ (loop-aware SLP functionality), ‘tree-vect-stmts.c’
and ‘tree-vect-data-refs.c’. Analysis of data references is in ‘tree-data-ref.c’.
SLP Vectorization. This pass performs vectorization of straight-line code. The pass
is implemented in ‘tree-vectorizer.c’ (the main driver), ‘tree-vect-slp.c’,
‘tree-vect-stmts.c’ and ‘tree-vect-data-refs.c’.
Autoparallelization. This pass splits the loop iteration space to run into several threads.
The pass is implemented in ‘tree-parloops.c’.
Graphite is a loop transformation framework based on the polyhedral model. Graphite
stands for Gimple Represented as Polyhedra. The internals of this infrastructure are
124 GNU Compiler Collection (GCC) Internals
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.c’ and is described by pass_tail_calls. The RTL transformation
is handled by fixup_tail_calls in ‘calls.c’.
• 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.c’ and is described by
pass_warn_function_return.
• Leave static single assignment form
This pass rewrites the function such that it is in normal form. At the same time, we
eliminate as many single-use temporaries as possible, so the intermediate language is
no longer GIMPLE, but GENERIC. The pass is located in ‘tree-outof-ssa.c’ and
is described by pass_del_ssa.
• Merge PHI nodes that feed into one another
This is part of the CFG cleanup passes. It attempts to join PHI nodes from a
forwarder CFG block into another block with PHI nodes. The pass is located in
‘tree-cfgcleanup.c’ and is described by pass_merge_phi.
• Return value optimization
If a function always returns the same local variable, and that local variable is an
aggregate type, then the variable is replaced with the return value for the function
(i.e., the function’s DECL RESULT). This is equivalent to the C++ named return
value optimization applied to GIMPLE. The pass is located in ‘tree-nrv.c’ and is
described by pass_nrv.
• Return slot optimization
If a function returns a memory object and is called as var = foo(), this pass tries to
change the call so that the address of var is sent to the caller to avoid an extra memory
copy. This pass is located in tree-nrv.c and is described by pass_return_slot.
• Optimize calls to __builtin_object_size
This is a propagation pass similar to CCP that tries to remove calls to __builtin_
object_size when the size of the object can be computed at compile-time. This pass
is located in ‘tree-object-size.c’ and is described by pass_object_sizes.
• Loop invariant motion
This pass removes expensive loop-invariant computations out of loops. The pass is
located in ‘tree-ssa-loop.c’ and described by pass_lim.
• Loop nest optimizations
This is a family of loop transformations that works on loop nests. It includes loop
interchange, scaling, skewing and reversal and they are all geared to the optimiza-
tion of data locality in array traversals and the removal of dependencies that hamper
optimizations such as loop parallelization and vectorization. The pass is located in
‘tree-loop-linear.c’ and described by pass_linear_transform.
126 GNU Compiler Collection (GCC) Internals
the function that are invoked by the exception handling library are called landing pads.
The code for this pass is located in ‘except.c’.
• Control flow graph cleanup
This pass removes unreachable code, simplifies jumps to next, jumps to jump, jumps
across jumps, etc. The pass is run multiple times. For historical reasons, it is occasion-
ally referred to as the “jump optimization pass”. The bulk of the code for this pass is
in ‘cfgcleanup.c’, and there are support routines in ‘cfgrtl.c’ and ‘jump.c’.
• Forward propagation of single-def values
This pass attempts to remove redundant computation by substituting variables that
come from a single definition, and seeing if the result can be simplified. It performs
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.c’.
• 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.c’.
• 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.c’, and the
LCM routines are in ‘lcm.c’.
• Loop optimization
This pass performs several loop related optimizations. The source files ‘cfgloopanal.c’
and ‘cfgloopmanip.c’ contain generic loop analysis and manipulation code. Initializa-
tion and finalization of loop structures is handled by ‘loop-init.c’. A loop invariant
motion pass is implemented in ‘loop-invariant.c’. Basic block level optimizations—
unrolling, and peeling loops— are implemented in ‘loop-unroll.c’. Replacing of
the exit condition of loops by special machine-dependent instructions is handled by
‘loop-doloop.c’.
• 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.c’.
• If conversion
This pass attempts to replace conditional branches and surrounding assignments with
arithmetic, boolean value producing comparison instructions, and conditional move
128 GNU Compiler Collection (GCC) Internals
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.c’.
• 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.c’.
• 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
by substitution, simplifies the result using algebra, and then attempts to match the
result against the machine description. The code is located in ‘combine.c’.
• 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.c’.
• 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.c’.
• 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.c’, ‘sched-deps.c’, ‘sched-ebb.c’, ‘sched-rgn.c’
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.c’, ‘ira-build.c’, ‘ira-costs.c’,
‘ira-conflicts.c’, ‘ira-color.c’, ‘ira-emit.c’, ‘ira-lives’, plus header files
Chapter 9: Passes and Files of the Compiler 129
‘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.
Source files are ‘reload.c’ and ‘reload1.c’, plus the header ‘reload.h’ used for
communication between them.
• This pass is a modern replacement of the reload pass. Source files
are ‘lra.c’, ‘lra-assign.c’, ‘lra-coalesce.c’, ‘lra-constraints.c’,
‘lra-eliminations.c’, ‘lra-lives.c’, ‘lra-remat.c’, ‘lra-spills.c’, the
header ‘lra-int.h’ used for communication between them, and the header
‘lra.h’ used for communication between 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.c’, and the various prediction routines are in
‘predict.c’.
• 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.c’.
• 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.c’.
• 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.c’.
• Register-to-stack conversion
130 GNU Compiler Collection (GCC) Internals
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.c’.
• Final
This pass outputs the assembler code for the function. The source files are ‘final.c’
plus ‘insn-output.c’; 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 ‘dbxout.c’ for DBX symbol table
format, ‘sdbout.c’ for SDB symbol table format, ‘dwarfout.c’ for DWARF symbol
table format, files ‘dwarf2out.c’ and ‘dwarf2asm.c’ for DWARF2 symbol table format,
and ‘vmsdbgout.c’ for VMS debug symbol table format.
OPTGROUP_OMP
OMP (Offloading and Multi Processing) passes. Enabled by ‘-omp’.
OPTGROUP_VEC
Vectorization passes. Enabled by ‘-vec’.
OPTGROUP_OTHER
All other optimization passes which do not fall into one of the above.
OPTGROUP_ALL
All optimization passes. Enabled by ‘-optall’.
By using groups a user could selectively enable optimization information only for a group
of passes. By default, the optimization information for all the passes is dumped.
10 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.
10.1 Deficiencies
There are many places in which this document is incomplet and incorrekt. It is, as of yet,
only preliminary documentation.
10.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
nonzero codes where previously they returned only zero and one. Therefore, you should not
write code like
136 GNU Compiler Collection (GCC) Internals
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.
10.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
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.
Chapter 10: GENERIC 137
10.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.
10.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.
10.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.
138 GNU Compiler Collection (GCC) Internals
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
other types require structural equality, use SET_TYPE_STRUCTURAL_EQUALITY to
ensure that the new type also requires structural equality. Finally, if for some
reason you cannot guarantee that TYPE_CANONICAL will point to the canonical
type, use SET_TYPE_STRUCTURAL_EQUALITY to make sure that the new type–and
any type constructed based on it–requires structural equality. If you suspect
Chapter 10: GENERIC 139
that the canonical type system is miscomparing types, pass --param verify-
canonical-types=1 to the compiler or configure with --enable-checking to
force the compiler to verify its canonical-type comparisons against the structural
comparisons; the compiler will then print any warnings if the canonical types
miscompare.
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.
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-
140 GNU Compiler Collection (GCC) Internals
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.
BOOLEAN_TYPE
Used to represent the bool type.
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.
Chapter 10: GENERIC 141
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
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.
142 GNU Compiler Collection (GCC) Internals
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.
10.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 10.8 [Functions], page 165.
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
a particular VAR_DECL if DECL_REGISTER holds for the VAR_DECL, and if DECL_
ASSEMBLER_NAME is not equal to DECL_NAME. In that case, DECL_ASSEMBLER_
NAME is the name of the register into which the variable will be placed.
PARM_DECL
Used to represent a parameter to a function. Treat these nodes similarly to VAR_
DECL nodes. These nodes only appear in the DECL_ARGUMENTS for a FUNCTION_
DECL.
The DECL_ARG_TYPE for a PARM_DECL is the type that will actually be used when
a value is passed to this function. It may be a wider type than the TREE_TYPE
of the parameter; for example, the ordinary type might be short while the
DECL_ARG_TYPE is int.
DEBUG_EXPR_DECL
Used to represent an anonymous debug-information temporary created to hold
an expression as it is optimized away, so that its value can be referenced in
debug bind statements.
144 GNU Compiler Collection (GCC) Internals
FIELD_DECL
These nodes represent non-static data members. The DECL_SIZE and DECL_
ALIGN behave as for VAR_DECL nodes. The position of the field within the
parent record is specified by a combination of three attributes. DECL_FIELD_
OFFSET is the position, counting in bytes, of the DECL_OFFSET_ALIGN-bit sized
word containing the bit of the field closest to the beginning of the structure.
DECL_FIELD_BIT_OFFSET is the bit offset of the first bit of the field within this
word; this may be nonzero even for fields that are not bit-fields, since DECL_
OFFSET_ALIGN may be greater than the natural alignment of the field’s type.
If DECL_C_BIT_FIELD holds, this field is a bit-field. In a bit-field, DECL_BIT_
FIELD_TYPE also contains the type that was originally specified for it, while
DECL TYPE may be a modified type with lesser precision, according to the
size of the bit field.
NAMESPACE_DECL
Namespaces provide a name hierarchy for other declarations. They appear in
the DECL_CONTEXT of other _DECL nodes.
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.
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
appropriate ‘.h’ file. For DECL nodes that are part of the middle-end, the
structure type should go in ‘tree.h’.
are no arguments; the arguments are stored as the TREE_VALUE of successive entries in the
list, and may be identifiers or expressions. The TREE_CHAIN of the attribute is the next
attribute in a list of attributes applying to the same declaration or type, or NULL_TREE if
there are no further attributes in the list.
Attributes may be attached to declarations and to types; these attributes may be accessed
with the following macros. All attributes are stored in this way, and many also cause other
changes to the declaration or type or to other internal compiler data structures.
10.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.
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)
elements in the array to represent the value without taking extra elements for
redundant 0s or -1. The number of elements used to represent e is available via
TREE_INT_CST_NUNITS. Element i can be extracted by using TREE_INT_CST_
ELT (e, i). TREE_INT_CST_LOW is a shorthand for TREE_INT_CST_ELT (e, 0).
The functions tree_fits_shwi_p and tree_fits_uhwi_p can be used to tell if
the value is small enough to fit in a signed HOST WIDE INT or an unsigned
HOST WIDE INT respectively. The value can then be extracted using tree_
to_shwi and tree_to_uhwi.
REAL_CST
FIXME: Talk about how to obtain representations of this constant, do compar-
isons, and so forth.
FIXED_CST
These nodes represent fixed-point constants. The type of these constants is
obtained with TREE_TYPE. TREE_FIXED_CST_PTR points to a struct fixed_
value; TREE_FIXED_CST returns the structure itself. struct fixed_value con-
tains data with the size of two HOST_BITS_PER_WIDE_INT and mode as the
associated fixed-point machine mode for data.
COMPLEX_CST
These nodes are used to represent complex number constants, that is a __
complex__ whose parts are constant nodes. The TREE_REALPART and TREE_
IMAGPART return the real and the imaginary parts respectively.
VECTOR_CST
These nodes are used to represent vector constants, whose parts are constant
nodes. Each individual constant node is either an integer or a double constant
node. The first operand is a TREE_LIST of the constant nodes and is accessed
through TREE_VECTOR_CST_ELTS.
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.
the index by the size of the type of the array elements. The type of these
expressions must be the type of a component of the array. The third and
fourth operands are used after gimplification to represent the lower bound and
component size but should not be used directly; call array_ref_low_bound and
array_ref_element_size instead.
ARRAY_RANGE_REF
These nodes represent access to a range (or “slice”) of an array. The operands
are the same as that for ARRAY_REF and have the same meanings. The type of
these expressions must be an array whose component type is the same as that
of the first operand. The range of that array type determines the amount of
data these expressions 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_SYMBOL and
must be a VAR_DECL of an object with a fixed address. The second argument is
TMR_BASE and the third one is TMR_INDEX. The fourth argument is TMR_STEP
and must be an INTEGER_CST. The fifth argument is TMR_OFFSET and must
be an INTEGER_CST. Any of the arguments may be NULL if the appropriate
component does not appear in the address. Address of the TARGET_MEM_REF is
determined in the following way.
&TMR_SYMBOL + TMR_BASE + TMR_INDEX * TMR_STEP + TMR_OFFSET
The sixth argument is the reference to the original memory access, which is
preserved for the purposes of the RTL alias analysis. The seventh argument is
a tag representing the results of tree level alias analysis.
ADDR_EXPR
These nodes are used to represent the address of an object. (These expres-
sions will always have pointer or reference type.) The operand may be another
expression, or it may be a declaration.
As an extension, GCC allows users to take the address of a label. In this case,
the operand of the ADDR_EXPR will be a LABEL_DECL. The type of such an
expression is void*.
If the object addressed is not an lvalue, a temporary is created, and the address
of the temporary is used.
INDIRECT_REF
These nodes are used to represent the object pointed to by a pointer. The
operand is the pointer being dereferenced; it will always have pointer or refer-
ence type.
MEM_REF These nodes are used to represent the object pointed to by a pointer offset by
a constant. The first operand is the pointer being dereferenced; it will always
have pointer or reference type. The second operand is a pointer constant. Its
type is specifying the type to be used for type-based alias analysis.
COMPONENT_REF
These nodes represent non-static data member accesses. The first operand is
the object (rather than a pointer to it); the second operand is the FIELD_DECL
150 GNU Compiler Collection (GCC) Internals
for the data member. The third operand represents the byte offset of the field,
but should not be used directly; call component_ref_field_offset instead.
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.
BIT_NOT_EXPR
These nodes represent bitwise complement, and will always have integral type.
The only operand is the value to be complemented.
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.
Chapter 10: GENERIC 151
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.
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
These nodes represent left and right shifts, respectively. The first operand is
the value to shift; it will always be of integral type. The second operand is
152 GNU Compiler Collection (GCC) Internals
an expression for the number of bits by which to shift. 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. 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-
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 is the only binary arithmetic operand that can
operate on pointer types.
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.
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.
Chapter 10: GENERIC 153
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-
tive infinity, CEIL_DIV_EXPR rounds towards positive infinity and ROUND_DIV_
EXPR rounds to the closest integer. Integer division in C and C++ is truncating,
i.e. TRUNC_DIV_EXPR.
The behavior of these operations on signed arithmetic overflow, when dividing
the minimum signed integer by minus one, is controlled by the flag_wrapv and
flag_trapv variables.
TRUNC_MOD_EXPR
FLOOR_MOD_EXPR
CEIL_MOD_EXPR
ROUND_MOD_EXPR
These nodes represent the integer remainder or modulus operation. The integer
modulus of two operands a and b is defined as a - (a/b)*b where the division
calculated using the corresponding division operator. Hence for TRUNC_MOD_
EXPR this definition assumes division using truncation towards zero, i.e. TRUNC_
DIV_EXPR. Integer remainder in C and C++ uses truncating division, i.e. TRUNC_
MOD_EXPR.
EXACT_DIV_EXPR
The EXACT_DIV_EXPR code is used to represent integer divisions where the nu-
merator is known to be an exact multiple of the denominator. This allows the
backend to choose between the faster of TRUNC_DIV_EXPR, CEIL_DIV_EXPR and
FLOOR_DIV_EXPR for the current target.
LT_EXPR
LE_EXPR
GT_EXPR
GE_EXPR
EQ_EXPR
NE_EXPR These nodes represent the less than, less than or equal to, greater than, greater
than or equal to, equal, and not equal comparison operators. The first and
second operands will either be both of integral type, both of floating type or
both of vector type. The result type of these expressions will always be of
integral, boolean or signed integral vector type. These operations return the
result type’s zero value for false, the result type’s one value for true, and a
vector whose elements are zero (false) or minus one (true) for vectors.
For floating point comparisons, if we honor IEEE NaNs and either operand is
NaN, then NE_EXPR always returns true and the remaining operators always
return false. On some targets, comparisons against an IEEE NaN, other than
equality and inequality, may generate a floating point exception.
154 GNU Compiler Collection (GCC) Internals
ORDERED_EXPR
UNORDERED_EXPR
These nodes represent non-trapping ordered and unordered comparison opera-
tors. These operations take two floating point operands and determine whether
they are ordered or unordered relative to each other. If either operand is an
IEEE NaN, their comparison is defined to be unordered, otherwise the compar-
ison is defined to be ordered. The result type of these expressions will always
be of integral or boolean type. These operations return the result type’s zero
value for false, and the result type’s one value for true.
UNLT_EXPR
UNLE_EXPR
UNGT_EXPR
UNGE_EXPR
UNEQ_EXPR
LTGT_EXPR
These nodes represent the unordered comparison operators. These operations
take two floating point operands and determine whether the operands are un-
ordered or are less than, less than or equal to, greater than, greater than or
equal to, or equal respectively. For example, UNLT_EXPR returns true if either
operand is an IEEE NaN or the first operand is less than the second. With the
possible exception of LTGT_EXPR, all of these operations are guaranteed not to
generate a floating point exception. The result type of these expressions will
always be of integral or boolean type. These operations return the result type’s
zero value for false, and the result type’s one value for true.
MODIFY_EXPR
These nodes represent assignment. The left-hand side is the first operand; the
right-hand side is the second operand. The left-hand side will be a VAR_DECL,
INDIRECT_REF, COMPONENT_REF, or other lvalue.
These nodes are used to represent not only assignment with ‘=’ but also com-
pound assignments (like ‘+=’), by reduction to ‘=’ assignment. In other words,
the representation for ‘i += 3’ looks just like that for ‘i = i + 3’.
INIT_EXPR
These nodes are just like MODIFY_EXPR, but are used only when a variable
is initialized, rather than assigned to subsequently. This means that we can
assume that the target of the initialization is not used in computing its own
value; any reference to the lhs in computing the rhs is undefined.
COMPOUND_EXPR
These nodes represent comma-expressions. The first operand is an expression
whose value is computed and thrown away prior to the evaluation of the second
operand. The value of the entire expression is the value of the second operand.
COND_EXPR
These nodes represent ?: expressions. The first operand is of boolean or integral
type. If it evaluates to a nonzero value, the second operand should be evaluated,
and returned as the value of the expression. Otherwise, the third operand is
evaluated, and returned as the value of the expression.
Chapter 10: GENERIC 155
The second operand must have the same type as the entire expression, unless
it unconditionally throws an exception or calls a noreturn function, in which
case it should have void type. The same constraints apply to the third operand.
This allows array bounds checks to be represented conveniently as (i >= 0 &&
i < 10) ? i : abort().
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.
156 GNU Compiler Collection (GCC) Internals
VA_ARG_EXPR
This node is used to implement support for the C/C++ variable argument-
list mechanism. It represents expressions like va_arg (ap, type). Its TREE_
TYPE yields the tree representation for type and its sole argument yields the
representation for ap.
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.
10.6.4 Vectors
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.
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_HI_EXPR the high N/2
158 GNU Compiler Collection (GCC) Internals
elements of the vector are extracted, converted and widened. In the case of VEC_
UNPACK_LO_EXPR the low N/2 elements of the vector are extracted, converted
and widened.
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
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_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.
10.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.
Chapter 10: GENERIC 159
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.
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_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.
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.
10.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 10: GENERIC 161
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.
10.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.
10.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.
162 GNU Compiler Collection (GCC) Internals
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.
10.7.7 OpenMP
All the statements starting with OMP_ represent directives and clauses used by the OpenMP
API http://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
Represents #pragma omp for [clause1 ... clauseN]. It has six 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 the loop initialization code of the form VAR = N1.
Operand OMP_FOR_COND is the loop conditional expression of the form VAR
{<,>,<=,>=} N2.
Operand OMP_FOR_INCR is the loop index increment of the form VAR {+=,-=}
INCR.
Operand OMP_FOR_PRE_BODY contains side-effect code from operands OMP_FOR_
INIT, OMP_FOR_COND and OMP_FOR_INC. These side-effects are part of the OMP_
FOR block but must be evaluated before the start of loop body.
The loop index variable VAR must be a signed integer variable, which is implicitly
private to each thread. Bounds N1 and N2 and the increment expression INCR
are required to be loop invariant integer expressions that are evaluated without
any synchronization. The evaluation order, frequency of evaluation and side-
effects are unspecified by the standard.
OMP_SECTIONS
Represents #pragma omp sections [clause1 ... clauseN].
Chapter 10: GENERIC 163
10.7.8 OpenACC
All the statements starting with OACC_ represent directives and clauses used by the Ope-
nACC API http://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_UPDATE
Represents #pragma acc update [clause1 ... clauseN].
Chapter 10: GENERIC 165
10.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.
Chapter 10: GENERIC 167
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.
170 GNU Compiler Collection (GCC) Internals
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 10.10.3 [Classes], page 171.
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.
10.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 10.2.2 [Identifiers],
page 137). 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.
Chapter 10: GENERIC 171
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 10.4 [Declarations], page 142. 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.
10.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 non-function members are available on the TYPE_FIELDS list. Given one mem-
ber, 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
172 GNU Compiler Collection (GCC) Internals
was 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.
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.
The function members are available on the TYPE_METHODS list. Again, subsequent mem-
bers are found by following the TREE_CHAIN field. If a function is overloaded, each of the
overloaded functions appears; no OVERLOAD nodes appear on the TYPE_METHODS list. Im-
plicitly declared functions (including default constructors, copy constructors, assignment
operators, and destructors) will appear on this list as well.
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.
Chapter 10: GENERIC 173
TYPE_HAS_NEW_OPERATOR
This predicate holds for a class-type that defines operator new.
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.
Chapter 10: GENERIC 175
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[].
10.10.5.1 Statements
There are tree nodes corresponding to all of the source-level statement constructs, used
within the C and C++ frontends. These are enumerated here, together with a list of the
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 will have 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 will sometimes use several statements chained together.
BREAK_STMT
Used to represent a break statement. There are no additional fields.
Chapter 10: GENERIC 177
CILK_SPAWN_STMT
Used to represent a spawning function in the Cilk Plus language extension. This
tree has one field that holds the name of the spawning function. _Cilk_spawn
can be written in C in the following way:
_Cilk_spawn <function_name> (<parameters>);
Detailed description for usage and functionality of _Cilk_spawn can be found
at https://www.cilkplus.org.
CILK_SYNC_STMT
This statement is part of the Cilk Plus language extension. It indicates that the
current function cannot continue in parallel with its spawned children. There
are no additional fields. _Cilk_sync can be written in C in the following way:
_Cilk_sync;
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,
CLEANUP_DECL will be NULL_TREE. In any case, the CLEANUP_EXPR is the ex-
pression to execute. The cleanups executed on exit from a scope should be run
in the reverse order of the order in which the associated CLEANUP_STMTs were
encountered.
CONTINUE_STMT
Used to represent a continue statement. There are no additional fields.
CTOR_STMT
Used to mark the beginning (if CTOR_BEGIN_P holds) or end (if CTOR_END_P
holds of the main body of a constructor. See also SUBOBJECT for more informa-
tion on how to use these nodes.
DO_STMT
Used to represent a do loop. The body of the loop is given by DO_BODY while
the termination condition for the loop is given by DO_COND. The condition for
a do-statement is always an expression.
EMPTY_CLASS_EXPR
Used to represent a temporary object of a class with no data whose address is
never taken. (All such objects are interchangeable.) The TREE_TYPE represents
the type of the object.
EXPR_STMT
Used to represent an expression statement. Use EXPR_STMT_EXPR to obtain the
expression.
FOR_STMT
Used to represent a for statement. The FOR_INIT_STMT is the initialization
statement for the loop. The FOR_COND is the termination condition. The FOR_
EXPR is the expression executed right before the FOR_COND on each loop iteration;
often, this expression increments a counter. The body of the loop is given by
178 GNU Compiler Collection (GCC) Internals
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.
11 GIMPLE
11.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.
11.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-
184 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
| |
186 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 11: GIMPLE 187
11.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.
11.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.
The target of an assignment is usually a variable, but can also be a MEM_REF or a compound
lvalue as described below.
1
These restrictions are derived from those in Morgan 4.8.
Chapter 11: GIMPLE 189
11.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.
gassign *gimple_build_assign (tree lhs, enum tree code [GIMPLE function]
subcode, tree op1, tree op2, tree op3)
This function is similar to two operand gimple_build_assign, but is used to build a
GIMPLE_ASSIGN statement when the operands of the right-hand side of the assignment
are already split into different operands.
The left-hand side is an lvalue passed in lhs. Subcode is the tree_code for the
right-hand side of the assignment. Op1, op2 and op3 are the operands.
196 GNU Compiler Collection (GCC) Internals
gimple gimplify_assign (tree dst, tree src, gimple seq [GIMPLE function]
*seq p)
Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
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.
11.8.3 GIMPLE_BIND
gbind *gimple_build_bind (tree vars, gimple seq body) [GIMPLE function]
Build a GIMPLE_BIND statement with a list of variables in VARS and a body of state-
ments in sequence BODY.
11.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).
11.8.5 GIMPLE_CATCH
gcatch *gimple_build_catch (tree types, gimple seq handler) [GIMPLE function]
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.
11.8.6 GIMPLE_COND
gcond *gimple_build_cond ( enum tree code pred code, tree [GIMPLE function]
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.
void gimple_cond_set_code (gcond *g, enum tree code code) [GIMPLE function]
Set CODE to be the predicate code for the conditional statement G.
11.8.7 GIMPLE_DEBUG
gdebug *gimple_build_debug_bind (tree var, tree value, [GIMPLE function]
gimple stmt)
Build a GIMPLE_DEBUG statement with GIMPLE_DEBUG_BIND of 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.
If value is GIMPLE_DEBUG_BIND_NOVALUE, debug information generation machinery is
informed that the variable var is unbound, i.e., that its value is indeterminate, which
sometimes means it is really unavailable, and other times that the compiler could not
keep track of it.
Block and location information for the newly-created stmt are taken from stmt, if
given.
11.8.8 GIMPLE_EH_FILTER
11.8.9 GIMPLE_LABEL
11.8.10 GIMPLE_GOTO
ggoto *gimple_build_goto (tree dest) [GIMPLE function]
Build a GIMPLE_GOTO statement to label DEST.
11.8.11 GIMPLE_NOP
gimple gimple_build_nop (void) [GIMPLE function]
Build a GIMPLE_NOP statement.
11.8.12 GIMPLE_OMP_ATOMIC_LOAD
gomp_atomic_load *gimple_build_omp_atomic_load ( tree [GIMPLE function]
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.
11.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.
11.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.
tree gimple_omp_continue_control_def ( const [GIMPLE function]
gomp continue *s)
Return the definition of the control variable on a GIMPLE_OMP_CONTINUE in S.
tree gimple_omp_continue_control_def_ptr ( [GIMPLE function]
gomp continue *s)
Same as above, but return the pointer.
tree gimple_omp_continue_set_control_def ( [GIMPLE function]
gomp continue *s)
Set the control variable definition for a GIMPLE_OMP_CONTINUE statement in S.
tree gimple_omp_continue_control_use ( const [GIMPLE function]
gomp continue *s)
Return the use of the control variable on a GIMPLE_OMP_CONTINUE in S.
tree gimple_omp_continue_control_use_ptr ( [GIMPLE function]
gomp continue *s)
Same as above, but return the pointer.
tree gimple_omp_continue_set_control_use ( [GIMPLE function]
gomp continue *s)
Set the control variable use for a GIMPLE_OMP_CONTINUE statement in S.
11.8.15 GIMPLE_OMP_CRITICAL
gomp_critical *gimple_build_omp_critical ( gimple seq [GIMPLE function]
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 *g) [GIMPLE function]
Return the name associated with OMP_CRITICAL statement G.
tree * gimple_omp_critical_name_ptr ( gomp critical *g) [GIMPLE function]
Return a pointer to the name associated with OMP critical statement G.
void gimple_omp_critical_set_name ( gomp critical *g, [GIMPLE function]
tree name)
Set NAME to be the name associated with OMP critical statement G.
Chapter 11: GIMPLE 205
11.8.16 GIMPLE_OMP_FOR
gomp_for *gimple_build_omp_for (gimple seq body, tree [GIMPLE function]
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
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.
tree gimple_omp_for_clauses (gimple g) [GIMPLE function]
Return the clauses associated with OMP_FOR G.
tree * gimple_omp_for_clauses_ptr (gimple g) [GIMPLE function]
Return a pointer to the OMP_FOR G.
void gimple_omp_for_set_clauses (gimple g, tree clauses) [GIMPLE function]
Set CLAUSES to be the list of clauses associated with OMP_FOR G.
tree gimple_omp_for_index (gimple g) [GIMPLE function]
Return the index variable for OMP_FOR G.
tree * gimple_omp_for_index_ptr (gimple g) [GIMPLE function]
Return a pointer to the index variable for OMP_FOR G.
void gimple_omp_for_set_index (gimple g, tree index) [GIMPLE function]
Set INDEX to be the index variable for OMP_FOR G.
tree gimple_omp_for_initial (gimple g) [GIMPLE function]
Return the initial value for OMP_FOR G.
tree * gimple_omp_for_initial_ptr (gimple g) [GIMPLE function]
Return a pointer to the initial value for OMP_FOR G.
void gimple_omp_for_set_initial (gimple g, tree initial) [GIMPLE function]
Set INITIAL to be the initial value for OMP_FOR G.
tree gimple_omp_for_final (gimple g) [GIMPLE function]
Return the final value for OMP_FOR G.
tree * gimple_omp_for_final_ptr (gimple g) [GIMPLE function]
turn a pointer to the final value for OMP_FOR G.
void gimple_omp_for_set_final (gimple g, tree final) [GIMPLE function]
Set FINAL to be the final value for OMP_FOR G.
tree gimple_omp_for_incr (gimple g) [GIMPLE function]
Return the increment value for OMP_FOR G.
tree * gimple_omp_for_incr_ptr (gimple g) [GIMPLE function]
Return a pointer to the increment value for OMP_FOR G.
206 GNU Compiler Collection (GCC) Internals
11.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.
11.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.
11.8.19 GIMPLE_OMP_PARALLEL
gomp_parallel *gimple_build_omp_parallel ( gimple seq [GIMPLE function]
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 body) [GIMPLE function]
Set BODY to be the body for the OMP statement G.
Chapter 11: GIMPLE 207
11.8.20 GIMPLE_OMP_RETURN
11.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.
11.8.22 GIMPLE_OMP_SECTIONS
gomp_sections *gimple_build_omp_sections ( gimple seq [GIMPLE function]
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.
11.8.23 GIMPLE_OMP_SINGLE
gomp_single *gimple_build_omp_single ( gimple seq body, [GIMPLE function]
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.
Chapter 11: GIMPLE 209
11.8.24 GIMPLE_PHI
unsigned gimple_phi_capacity (gimple g) [GIMPLE function]
Return the maximum number of arguments supported by GIMPLE_PHI G.
void gimple_phi_set_arg (gphi *g, index, struct phi arg d * [GIMPLE function]
phiarg)
Set PHIARG to be the argument corresponding to incoming edge INDEX for GIMPLE_PHI
G.
11.8.25 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.
11.8.26 GIMPLE_RETURN
greturn *gimple_build_return (tree retval) [GIMPLE function]
Build a GIMPLE_RETURN statement whose return value is retval.
11.8.27 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.
11.8.28 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.
11.8.29 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.
void gimple_seq_add_seq (gimple seq *dest, gimple seq src) [GIMPLE function]
Append sequence SRC to the end of sequence *DEST if SRC is not NULL. If *DEST is
NULL, allocate a new sequence before appending.
void gimple_seq_copy (gimple seq dest, gimple seq src) [GIMPLE function]
Copy the sequence SRC into the sequence DEST.
Chapter 11: GIMPLE 213
void gsi_remove (gimple stmt iterator *i, bool remove eh info) [GIMPLE function]
Remove the current stmt from the sequence. The iterator is updated to point to the
next statement. When REMOVE_EH_INFO is true we remove the statement pointed to
by iterator I from the EH tables. Otherwise we do not modify the EH tables. Generally,
REMOVE_EH_INFO should be true when the statement is going to be removed from the
IL and not reinserted elsewhere.
void gsi_link_after (gimple stmt iterator *i, gimple g, enum [GIMPLE function]
gsi iterator update mode)
Links statement G after the statement pointed-to by iterator I. MODE is as in gsi_
insert_after.
gimple_seq gsi_split_seq_after (gimple stmt iterator i) [GIMPLE function]
Move all statements in the sequence after I to a new sequence. Return this new
sequence.
gimple_seq gsi_split_seq_before (gimple stmt iterator *i) [GIMPLE function]
Move all statements in the sequence before I to a new sequence. Return this new
sequence.
void gsi_replace (gimple stmt iterator *i, gimple stmt, bool [GIMPLE function]
update eh info)
Replace the statement pointed-to by I to STMT. If UPDATE_EH_INFO is true, the excep-
tion handling information of the original statement is moved to the new statement.
void gsi_insert_before (gimple stmt iterator *i, gimple [GIMPLE function]
stmt, enum gsi iterator update mode)
Insert statement STMT before the statement pointed-to by iterator I, update STMT’s
basic block and scan it for new operands. MODE specifies how to update iterator I
after insertion (see enum gsi_iterator_update).
void gsi_insert_seq_before (gimple stmt iterator *i, [GIMPLE function]
gimple seq seq, enum gsi iterator update mode)
Like gsi_insert_before, but for all the statements in SEQ.
void gsi_insert_after (gimple stmt iterator *i, gimple stmt, [GIMPLE function]
enum gsi iterator update mode)
Insert statement STMT after the statement pointed-to by iterator I, update STMT’s
basic block and scan it for new operands. MODE specifies how to update iterator I
after insertion (see enum gsi_iterator_update).
void gsi_insert_seq_after (gimple stmt iterator *i, [GIMPLE function]
gimple seq seq, enum gsi iterator update mode)
Like gsi_insert_after, but for all the statements in SEQ.
gimple_stmt_iterator gsi_for_stmt (gimple stmt) [GIMPLE function]
Finds iterator for STMT.
void gsi_move_after (gimple stmt iterator *from, [GIMPLE function]
gimple stmt iterator *to)
Move the statement at FROM so it comes right after the statement at TO.
void gsi_move_before (gimple stmt iterator *from, [GIMPLE function]
gimple stmt iterator *to)
Move the statement at FROM so it comes right before the statement at TO.
void gsi_move_to_bb_end (gimple stmt iterator *from, [GIMPLE function]
basic block bb)
Move the statement at FROM to the end of basic block BB.
216 GNU Compiler Collection (GCC) Internals
tree walk_gimple_op (gimple stmt, walk tree fn callback op, [GIMPLE function]
struct walk stmt info *wi)
Use this function to walk the operands of statement STMT. Every operand is walked
via walk_tree with optional state information in WI.
CALLBACK_OP is called on each operand of STMT via walk_tree. Additional parameters
to walk_tree must be stored in WI. For each operand OP, walk_tree is called as:
walk_tree (&OP, CALLBACK_OP, WI, PSET)
If CALLBACK_OP returns non-NULL for an operand, the remaining operands are not
scanned. The return value is that returned by the last call to walk_tree, or NULL_
TREE if no CALLBACK_OP is specified.
12.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 12: Analysis and Optimization of GIMPLE tuples 221
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;
fold_stmt (stmt);
}
There are checks in verify_ssa which verify that the immediate use list is up to date, as
well as checking that an optimization didn’t break from the loop without using this macro.
It is safe to simply ’break’; from a FOR_EACH_IMM_USE_FAST traverse.
Some useful functions and macros:
1. has_zero_uses (ssa_var) : Returns true if there are no uses of ssa_var.
2. has_single_use (ssa_var) : Returns true if there is only a single use of ssa_var.
3. single_imm_use (ssa_var, use_operand_p *ptr, tree *stmt) : Returns true if
there is only a single use of ssa_var, and also returns the use pointer and statement
it occurs in, in the second and third parameters.
4. num_imm_uses (ssa_var) : Returns the number of immediate uses of ssa_var. It is
better not to use this if possible since it simply utilizes a loop to count the uses.
5. PHI_ARG_INDEX_FROM_USE (use_p) : Given a use within a PHI node, return the index
number for the use. An assert is triggered if the use isn’t located in a PHI node.
6. USE_STMT (use_p) : Return the statement a use occurs in.
Note that uses are not put into an immediate use list until their statement is actually
inserted into the instruction stream via a bsi_* routine.
It is also still possible to utilize lazy updating of statements, but this should be used only
when absolutely required. Both alias analysis and the dominator optimizations currently
do this.
When lazy updating is being used, the immediate use information is out of date and
cannot be used reliably. Lazy updating is achieved by simply marking statements modified
via calls to gimple_set_modified instead of update_stmt. When lazy updating is no longer
required, all the modified statements must have update_stmt called in order to bring them
up to date. This must be done before the optimization is finished, or verify_ssa will
trigger an abort.
This is done with a simple loop over the instruction stream:
block_stmt_iterator bsi;
basic_block bb;
FOR_EACH_BB (bb)
{
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
update_stmt_if_modified (bsi_stmt (bsi));
}
tend to be assigned multiple times. The compiler modifies the program representation so
that every time a variable is assigned in the code, a new version of the variable is created.
Different versions of the same variable are distinguished by subscripting the variable name
with its version number. Variables used in the right-hand side of expressions are renamed
so that their version number matches that of the most recent assignment.
We represent variable versions using SSA_NAME nodes. The renaming process in
‘tree-ssa.c’ wraps every real and virtual operand with an SSA_NAME node which contains
the 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;
the affected symbols must be renamed into SSA form again. Transformations that emit
new code or replicate existing statements will also need to update the SSA form.
Since GCC implements two different SSA forms for register and virtual variables, keeping
the SSA form up to date depends on whether you are updating register or virtual names.
In both cases, the general idea behind incremental SSA updates is similar: when new SSA
names are created, they typically are meant to replace other existing names in the program.
For instance, given the following code:
1 L0:
2 x_1 = PHI (0, x_5)
3 if (x_1 < 10)
4 if (x_1 > 7)
5 y_2 = 0
6 else
7 y_3 = x_1 + x_7
8 endif
9 x_5 = x_1 + 1
10 goto L0;
11 endif
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:
Chapter 12: Analysis and Optimization of GIMPLE tuples 227
• 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.
• 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.
13 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 an 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_OBJ An RTX code that represents an actual object, such as a register (REG) or a
memory location (MEM, SYMBOL_REF). LO_SUM) is also included; instead, SUBREG
and STRICT_LOW_PART are not in this class, but in class x.
RTX_CONST_OBJ
An RTX code that represents a constant object. HIGH is also included in this
class.
RTX_COMPARE
An RTX code for a non-symmetric comparison, such as GEU or LT.
RTX_COMM_COMPARE
An RTX code for a symmetric (commutative) comparison, such as EQ or
ORDERED.
RTX_UNARY
An RTX code for a unary arithmetic operation, such as NEG, NOT, or ABS. This
category also includes value extension (sign or zero) and conversions between
integer and floating point.
RTX_COMM_ARITH
An RTX code for a commutative binary operation, such as PLUS or AND. NE
and EQ are comparisons, so they have class <.
RTX_BIN_ARITH
An RTX code for a non-commutative binary operation, such as MINUS, DIV, or
ASHIFTRT.
Chapter 13: RTL Representation 233
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 13.11 [Bit-Fields], page 263.
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 13.19 [Insns], page 273.
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 ‘ei’.
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.
234 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.
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.
1 All codes of this class have format e.
<
c
2 All codes of these classes have format ee.
b
3 All codes of these classes have format eee.
i All codes of this class have formats that begin with iuueiee. See Section 13.19
[Insns], page 273. Note that not all RTL objects linked onto an insn chain are
of class i.
o
m
x You can make no assumptions about the format of these codes.
For example, if x is a subreg expression, you know that it has two operands which can
be correctly accessed as XEXP (x, 0) and XINT (x, 1). If you did XINT (x, 0), you would
get the address of the expression operand but cast as an integer; that might occasionally
be useful, but it would be cleaner to write (int) XEXP (x, 0). XEXP (x, 1) would also
compile without error, and would return the second, integer operand cast as an expression
pointer, which would probably result in a crash when accessed. Nothing stops you from
writing XEXP (x, 28) either, but this will access memory past the end of the expression
with unpredictable results.
Access to operands which are vectors is more complicated. You can use the macro XVEC
to get the vector-pointer itself, or the macros XVECEXP and XVECLEN to access the elements
and length of a vector.
All the macros defined in this section expand into lvalues and therefore can be used to
assign the operands, lengths and vector elements as well as to access them.
MEM
MEM_ALIAS_SET (x)
If 0, x is not in any alias set, and may alias anything. Otherwise,
x can only alias MEMs in a conflicting alias set. This value is set in
a language-dependent manner in the front-end, and should not be
altered in the back-end. In some front-ends, these numbers may
correspond in some way to types, or other language-level entities,
but they need not, and the back-end makes no such assumptions.
These set numbers are tested with alias_sets_conflict_p.
MEM_EXPR (x)
If this register is known to hold the value of some user-level dec-
laration, this is that tree node. It may also be a COMPONENT_REF,
in which case this is some field reference, and TREE_OPERAND (x,
0) contains the declaration, or another COMPONENT_REF, or null if
there is no compile-time object associated with the reference.
236 GNU Compiler Collection (GCC) Internals
MEM_OFFSET_KNOWN_P (x)
True if the offset of the memory reference from MEM_EXPR is known.
‘MEM_OFFSET (x)’ provides the offset if so.
MEM_OFFSET (x)
The offset from the start of MEM_EXPR. The value is only valid if
‘MEM_OFFSET_KNOWN_P (x)’ is true.
MEM_SIZE_KNOWN_P (x)
True if the size of the memory reference is known. ‘MEM_SIZE (x)’
provides its size if so.
MEM_SIZE (x)
The size in bytes of the memory reference. This is mostly relevant
for BLKmode references as otherwise the size is implied by the mode.
The value is only valid if ‘MEM_SIZE_KNOWN_P (x)’ is true.
MEM_ALIGN (x)
The known alignment in bits of the memory reference.
MEM_ADDR_SPACE (x)
The address space of the memory reference. This will commonly
be zero for the generic address space.
REG
ORIGINAL_REGNO (x)
This field holds the number the register “originally” had; for a
pseudo register turned into a hard reg this will hold the old pseudo
register number.
REG_EXPR (x)
If this register is known to hold the value of some user-level decla-
ration, this is that tree node.
REG_OFFSET (x)
If this register is known to hold the value of some user-level decla-
ration, this is the offset into that logical storage.
SYMBOL_REF
SYMBOL_REF_DECL (x)
If the symbol_ref x was created for a VAR_DECL or a FUNCTION_
DECL, that tree is recorded here. If this value is null, then x was
created by back end code generation routines, and there is no as-
sociated front end symbol table entry.
SYMBOL_REF_DECL may also point to a tree of class ’c’, that is,
some sort of constant. In this case, the symbol_ref is an entry in
the per-file constant pool; again, there is no associated front end
symbol table entry.
SYMBOL_REF_CONSTANT (x)
If ‘CONSTANT_POOL_ADDRESS_P (x)’ is true, this is the constant pool
entry for x. It is null otherwise.
Chapter 13: RTL Representation 237
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.
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.
238 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.
LABEL_PRESERVE_P (x)
In a code_label or note, indicates that the label is referenced by code or data
not visible to the RTL of a given function. Labels referenced by a non-local
goto will have this bit set. Stored in the in_struct field and printed as ‘/s’.
LABEL_REF_NONLOCAL_P (x)
In label_ref and reg_label expressions, nonzero if this is a reference to a
non-local label. Stored in the volatil field and printed as ‘/v’.
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’.
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.
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
240 GNU Compiler Collection (GCC) Internals
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.
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’.
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’.
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
Chapter 13: RTL Representation 241
used This flag is used directly (without an access macro) at the end of RTL generation
for a function, to count the number of times an expression appears in insns.
Expressions that appear more than once are copied, according to the rules for
shared structure (see Section 13.21 [Sharing], page 282).
For a reg, it is used directly (without an access macro) by the leaf register
renumbering code to ensure that each register is only renumbered once.
In a symbol_ref, it indicates that an external declaration for the symbol has
already been written.
volatil In a mem, asm_operands, or asm_input expression, it is 1 if the memory refer-
ence is volatile. Volatile memory references may not be deleted, reordered or
combined.
In a symbol_ref expression, it is used for machine-specific purposes.
In a reg expression, it is 1 if the value is a user-level variable. 0 indicates an
internal compiler temporary.
In an insn, 1 means the insn has been deleted.
In label_ref and reg_label expressions, 1 means a reference to a non-local
label.
In prefetch expressions, 1 means that the containing insn is a scheduling bar-
rier.
In an RTL dump, this flag is represented as ‘/v’.
PDImode “Partial Double Integer” mode represents an integer which occupies eight bytes
but which doesn’t really use all eight. On some machines, this is the right mode
to use for certain pointers.
DImode “Double Integer” mode represents an eight-byte integer.
TImode “Tetra Integer” (?) mode represents a sixteen-byte integer.
OImode “Octa Integer” (?) mode represents a thirty-two-byte integer.
XImode “Hexadeca Integer” (?) mode represents a sixty-four-byte integer.
QFmode “Quarter-Floating” mode represents a quarter-precision (single byte) floating
point number.
HFmode “Half-Floating” mode represents a half-precision (two byte) floating point num-
ber.
TQFmode “Three-Quarter-Floating” (?) mode represents a three-quarter-precision (three
byte) floating point number.
SFmode “Single Floating” mode represents a four byte floating point number. In the
common case, of a processor with IEEE arithmetic and 8-bit bytes, this is a
single-precision IEEE floating point number; it can also be used for double-
precision (on processors with 16-bit bytes) and single-precision VAX and IBM
types.
DFmode “Double Floating” mode represents an eight byte floating point number. In the
common case, of a processor with IEEE arithmetic and 8-bit bytes, this is a
double-precision IEEE floating point number.
XFmode “Extended Floating” mode represents an IEEE extended floating point number.
This mode only has 80 meaningful bits (ten bytes). Some processors require
such numbers to be padded to twelve bytes, others to sixteen; this mode is used
for either.
SDmode “Single Decimal Floating” mode represents a four byte decimal floating point
number (as distinct from conventional binary floating point).
DDmode “Double Decimal Floating” mode represents an eight byte decimal floating point
number.
TDmode “Tetra Decimal Floating” mode represents a sixteen byte decimal floating point
number all 128 of whose bits are meaningful.
TFmode “Tetra Floating” mode represents a sixteen byte floating point number all 128
of whose bits are meaningful. One common use is the IEEE quad-precision
format.
QQmode “Quarter-Fractional” mode represents a single byte treated as a signed frac-
tional number. The default format is “s.7”.
HQmode “Half-Fractional” mode represents a two-byte signed fractional number. The
default format is “s.15”.
SQmode “Single Fractional” mode represents a four-byte signed fractional number. The
default format is “s.31”.
Chapter 13: RTL Representation 245
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
These modes stand for a complex number represented as a pair of integer values.
The integer values are in QImode, HImode, SImode, DImode, TImode, and OImode,
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.
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.
Chapter 13: RTL Representation 247
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_FUNCTION
Algol or Pascal function variables including a static chain. (These are not
currently implemented).
MODE_CC Modes representing condition code values. These are CCmode plus any CC_MODE
modes listed in the ‘machine-modes.def’. See Section 16.12 [Jump Patterns],
page 393, also see Section 17.15 [Condition Code], page 523.
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_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.
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.
248 GNU Compiler Collection (GCC) Internals
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_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.
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 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.
Chapter 13: RTL Representation 249
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.
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 com-
putation. The operand, exp, is an expression that contains only constants
(const_int, symbol_ref and label_ref expressions) combined with plus and
minus. However, not all combinations are valid, since the assembler cannot do
arbitrary arithmetic on relocatable symbols.
m should be Pmode.
(high:m exp)
Represents the high-order bits of exp, usually a symbol_ref. 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 a global memory location.
m should be Pmode.
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.
may contain a full word but there may be instructions to refer to it as a half
word or as a single byte, as well as instructions to refer to it as a floating point
number of various precisions.
Even for a register that the machine can access in only one mode, the mode
must always be specified.
The symbol FIRST_PSEUDO_REGISTER is defined by the machine description,
since the number of hard registers on the machine is an invariant characteristic
of the machine. Note, however, that not all of the machine registers must be
general registers. All the machine registers that can be used for storage of data
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 reg-
ister given by FRAME_POINTER_REGNUM and the value STARTING_
FRAME_OFFSET.
Chapter 13: RTL Representation 253
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).
This virtual register is replaced by the sum of the register given by
STACK_POINTER_REGNUM and the value STACK_POINTER_OFFSET.
(subreg:m1 reg:m2 bytenum)
subreg expressions are used to refer to a register in a machine mode other than
its natural one, or to refer to one register of a multi-part reg that actually refers
to several registers.
Each pseudo register has a natural mode. If it is necessary to operate on it in
a different mode, the register must be enclosed in a subreg.
There are currently three supported types for the first operand of a subreg:
• pseudo registers This is the most common case. Most subregs have pseudo
regs as their first operand.
• mem subregs of mem were common in earlier versions of GCC and are still
supported. During the reload pass these are replaced by plain mems. On
machines that do not do instruction scheduling, use of subregs of mem are
still used, but this is no longer recommended. Such subregs are considered
to be register_operands rather than memory_operands before and dur-
ing reload. Because of this, the scheduling passes cannot properly sched-
ule instructions with subregs of mem, so for machines that do scheduling,
subregs of mem should never be used. To support this, the combine and
recog passes have explicit code to inhibit the creation of subregs of mem
when INSN_SCHEDULING is defined.
The use of subregs of mem after the reload pass is an area that is not well
understood and should be avoided. There is still some code in the compiler
to support this, but this code has possibly rotted. This use of subregs is
discouraged and will most likely not be supported in the future.
• hard registers It is seldom necessary to wrap hard registers in subregs; such
registers would normally reduce to a single reg rtx. This use of subregs is
discouraged and may not be supported in the future.
subregs of subregs are not supported. Using simplify_gen_subreg is the
recommended way to avoid this problem.
subregs come in two distinct flavors, each having its own usage and rules:
Paradoxical subregs
When m1 is strictly wider than m2, the subreg expression is called
paradoxical. The canonical test for this class of subreg is:
254 GNU Compiler Collection (GCC) Internals
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 (which would not be (cc0) in this case). 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.
(mem:m addr alias)
This RTX represents a reference to main memory at an address represented by
the expression addr. m specifies how large a unit of memory is accessed. alias
specifies an alias set for the reference. In general two items are in different alias
sets if they cannot reference the same memory address.
The construct (mem:BLK (scratch)) is considered to alias all other memories.
Thus it may be used as a memory barrier in epilogue stack deallocation patterns.
(concatm rtx rtx)
This RTX represents the concatenation of two other RTXs. This is used for
complex values. It should only appear in the RTL attached to declarations and
during RTL generation. It should not appear in the ordinary insn chain.
(concatnm [rtx ...])
This RTX represents the concatenation of all the rtx to make a single value.
Like concat, this should only appear in declarations, and not in the insn chain.
(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.
260 GNU Compiler Collection (GCC) Internals
(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.
(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
Chapter 13: RTL Representation 261
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 17.30 [Misc], page 593).
Note that this is one of the few expressions that is not invariant under widening.
The mode of x must be m or VOIDmode.
(ctz:m x) Represents the number of trailing 0-bits in x, represented as an integer of mode
m, starting at the least significant bit position. If x is zero, the value is deter-
mined by CTZ_DEFINED_VALUE_AT_ZERO (see Section 17.30 [Misc], page 593).
Except for this case, ctz(x) is equivalent to ffs(x) - 1. The mode of x must
be m or VOIDmode.
(popcount:m x)
Represents the number of 1-bits in x, represented as an integer of mode m. The
mode of x must be m or VOIDmode.
(parity:m x)
Represents the number of 1-bits modulo 2 in x, represented as an integer of
mode m. The mode of x must be m or VOIDmode.
(bswap:m x)
Represents the value x with the order of bytes reversed, carried out in mode
m, which must be a fixed-point machine mode. The mode of x must be m or
VOIDmode.
In the example above, if (cc0) were last set to (compare x y), the comparison operation
is identical to (eq x y). Usually only one style of comparisons is supported on a particular
machine, but the combine pass will try to merge the operations to produce the eq shown
in case it exists in the context of the particular insn involved.
Inequality comparisons come in two flavors, signed and unsigned. Thus, there are distinct
expression codes gt and gtu for signed and unsigned greater-than. These can produce differ-
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 16.19 [Insn Attributes], page 407.
Chapter 13: RTL Representation 263
13.11 Bit-Fields
Special expression codes exist to represent bit-field instructions.
(vec_concat:m x1 x2)
Describes a vector concat operation. The result is a concatenation of the vectors
or scalars x1 and x2; its length is the sum of the lengths of the two inputs.
(vec_duplicate:m x)
This operation converts a scalar into a vector or a small vector into a larger
one by duplicating the input values. The output vector mode must have the
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.
13.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.
Chapter 13: RTL Representation 265
(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.
13.14 Declarations
Declaration expression codes do not represent arithmetic operations but rather state asser-
tions about their operands.
266 GNU Compiler Collection (GCC) Internals
If lval is (pc), we have a jump instruction, and the possibilities for x are very
limited. It may be a label_ref expression (unconditional jump). It may be an
if_then_else (conditional jump), in which case either the second or the third
operand must be (pc) (for the case which does not jump) and the other of the
two must be a label_ref (for the case which does jump). x may also be a mem
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 neither (cc0) nor (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.
268 GNU Compiler Collection (GCC) Internals
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.
If the last group of expressions in a parallel are each a clobber expression
whose arguments are reg or match_scratch (see Section 16.4 [RTL Template],
page 307) expressions, the combiner phase can add the appropriate clobber
expressions to an insn it has constructed when doing so will cause a pattern to
be matched.
This feature can be used, for example, on a machine that whose multiply and
add instructions don’t use an MQ register but which has an add-accumulate
instruction that does clobber the MQ register. Similarly, a combined instruction
might require a temporary register while the constituent instructions might not.
When a clobber expression for a register appears inside a parallel with other
side effects, the register allocator guarantees that the register is unoccupied
both before and after that insn if it is a hard register clobber. For pseudo-
register clobber, the register allocator and the reload pass do not assign the
same hard register to the clobber and the input operands if there is an insn al-
ternative containing the ‘&’ constraint (see Section 16.8.4 [Modifiers], page 323)
for the clobber and the hard register is in register classes of the clobber in the
alternative. You can clobber either a specific hard register, a pseudo register, or
a scratch expression; in the latter two cases, GCC will allocate a hard register
that is available there for use as a temporary.
For instructions that require a temporary register, you should use scratch
instead of a pseudo-register because this will allow the combiner phase to add
the clobber when required. You do this by coding (clobber (match_scratch
. . . )). If you do clobber a pseudo register, use one which appears nowhere
else—generate a new one each time. Otherwise, you may confuse CSE.
There is one other known use for clobbering a pseudo register in a parallel:
when one of the input operands of the insn is also clobbered by the insn. In
this case, using the same pseudo register in the clobber and elsewhere in the
insn produces the expected results.
(use x) Represents the use of the value of x. It indicates that the value in x at this
point in the program is needed, even though it may not be apparent why this
is so. Therefore, the compiler will not attempt to delete previous instructions
whose only effect is to store a value in x. x must be a reg expression.
In some situations, it may be tempting to add a use of a register in a parallel
to describe a situation where the value of a special register will modify the
behavior of the instruction. A hypothetical example might be a pattern for an
addition that can either wrap around or use saturating addition depending on
the value of a special control register:
(parallel [(set (reg:SI 2) (unspec:SI [(reg:SI 3)
(reg:SI 4)] 0))
(use (reg:SI 1))])
Chapter 13: RTL Representation 269
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
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 ‘movmemm’ 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.
(parallel [x0 x1 ...])
Represents several side effects performed in parallel. The square brackets stand
for a vector; the operand of parallel is a vector of expressions. x0, x1 and so
on are individual side effect expressions—expressions of code set, call, return,
simple_return, clobber or use.
“In parallel” means that first all the values used in the individual side-effects are
computed, and second all the actual side-effects are performed. For example,
(parallel [(set (reg:SI 1) (mem:SI (reg:SI 1)))
(set (mem:SI (reg:SI 1)) (reg:SI 1))])
says unambiguously that the values of hard register 1 and the memory location
addressed by it are interchanged. In both places where (reg:SI 1) appears as
a memory address it refers to the value in register 1 before the execution of the
insn.
It follows that it is incorrect to use parallel and expect the result of one set
to be available for the next one. For example, people sometimes attempt to
represent a jump-if-zero instruction this way:
(parallel [(set (cc0) (reg:SI 34))
(set (pc) (if_then_else
(eq (cc0) (const_int 0))
(label_ref ...)
(pc)))])
But this is incorrect, because it says that the jump condition depends on the
condition code value before this instruction, not on the new value that is set by
this instruction.
Peephole optimization, which takes place together with final assembly code
output, can produce insns whose patterns consist of a parallel whose elements
are the operands needed to output the resulting assembler code—often reg, mem
or constant expressions. This would not be well-formed RTL at any other stage
in compilation, but it is OK then because no further optimization remains to
be done. However, the definition of the macro NOTICE_UPDATE_CC, if any, must
deal with such insns if you define any peephole optimizations.
270 GNU Compiler Collection (GCC) Internals
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.
Chapter 13: RTL Representation 273
13.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.
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,
274 GNU Compiler Collection (GCC) Internals
A mem generally points to a stack slot in which arguments passed to the libcall by
reference (see Section 17.9.7 [Register Arguments], page 491) are stored. If the
argument is caller-copied (see Section 17.9.7 [Register Arguments], page 491),
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 17.7.1 [Register Basics], page 461).
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
front-end code that creates them, is the function output_alternate_entry_
point, in ‘final.c’.
To set the kind of a label, use the SET_LABEL_KIND macro.
jump_table_data
A jump_table_data insn is a placeholder for the jump-table data of a casesi
or tablejump insn. They are placed after a tablejump_p insn. A jump_table_
data insn is not part o a basic blockm but it is associated with the basic block
that ends with the tablejump_p insn. The PATTERN of a jump_table_data
276 GNU Compiler Collection (GCC) Internals
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 debugging information for variable tracking at assignments (see
‘-fvar-tracking-assignments’ option). They are the RTL representation
of GIMPLE_DEBUG statements (Section 11.8.7 [GIMPLE_DEBUG], page 201),
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.
Throughout optimization passes, 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 var location notes, analyzing control
flow, value equivalences and changes to registers and memory referenced
in value expressions, 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
VAR_LOCATION is encountered. E.g., if a user variable is bound to a REG
and then a subsequent insn modifies the REG, the note location would keep
mapping the user variable to the register across the insn, whereas the insn
location would keep the variable bound to the value, so that the variable
tracking pass would emit another location note for the variable at the point in
which the register is modified.
The machine mode of an insn is normally VOIDmode, but some phases use the mode for
various purposes.
The common subexpression elimination pass sets the mode of an insn to QImode when it
is the first insn in a block that has already been processed.
The second Haifa scheduling pass, for targets that can multiple issue, sets the mode of
an insn to TImode when it is believed that the instruction begins an issue group. That is,
when the instruction cannot issue simultaneously with the previous. This may be relied on
by later passes, in particular machine-dependent reorg.
Here is a table of the extra fields of insn, jump_insn and call_insn insns:
PATTERN (i)
An expression for the side effect performed by this insn. This must be one of the
following codes: set, call, use, clobber, return, simple_return, asm_input,
asm_output, addr_vec, addr_diff_vec, trap_if, unspec, unspec_volatile,
parallel, cond_exec, or sequence. If it is a parallel, each element of the
parallel must be one these codes, except that parallel expressions cannot be
nested and addr_vec and addr_diff_vec are not permitted inside a parallel
expression.
278 GNU Compiler Collection (GCC) Internals
INSN_CODE (i)
An integer that says which pattern in the machine description matches this
insn, or −1 if the matching has not yet been attempted.
Such matching is never attempted and this field remains −1 on an insn whose
pattern consists of a single use, clobber, asm_input, addr_vec or addr_diff_
vec expression.
Matching is also never attempted on insns that result from an asm state-
ment. These contain at least one asm_operands expression. The function
asm_noperands returns a non-negative value for such insns.
In the debugging output, this field is printed as a number followed by a symbolic
representation that locates the pattern in the ‘md’ file as some small positive or
negative offset from a named pattern.
LOG_LINKS (i)
A list (chain of insn_list expressions) giving information about dependencies
between instructions within a basic block. Neither a jump nor a label may
come between the related insns. These are only used by the schedulers and by
combine. This is a deprecated data structure. Def-use and use-def chains are
now preferred.
REG_NOTES (i)
A list (chain of expr_list, insn_list and int_list expressions) giving mis-
cellaneous information about the insn. It is often information pertaining to the
registers used in this insn.
The LOG_LINKS field of an insn is a chain of insn_list expressions. Each of these has two
operands: the first is an insn, and the second is another insn_list expression (the next one
in the chain). The last insn_list in the chain has a null pointer as second operand. The
significant thing about the chain is which insns appear in it (as first operands of insn_list
expressions). Their order is not significant.
This list is originally set up by the flow analysis pass; it is a null pointer until then. Flow
only adds links for those data dependencies which can be used for instruction combination.
For each insn, the flow analysis pass adds a link to insns which store into registers values
that are used for the first time in this insn.
The REG_NOTES field of an insn is a chain similar to the LOG_LINKS field but it includes
expr_list and int_list expressions in addition to insn_list expressions. There are
several kinds of register notes, which are distinguished by the machine mode, which in a
register note is really understood as being an enum reg_note. The first operand op of the
note is data whose meaning depends on the kind of note.
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. There are also a set of values that are only used in LOG_LINKS.
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.
Chapter 13: RTL Representation 279
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 so that decrement and branch until zero instructions, such as the
m68k dbra, can be matched.
The REG_NONNEG note is added to insns only if the machine description has a
‘decrement_and_branch_until_zero’ pattern.
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 13.19 [Insns], page 273.
REG_CROSSING_JUMP
This insn is a branching instruction (either an unconditional jump or an indirect
jump) which crosses between hot and cold sections, which could potentially be
very far apart in the executable. The presence of this note indicates to other
optimizations that this branching instruction should not be “collapsed” into a
simpler branching construct. It is used when the optimization to partition basic
blocks into hot and cold sections is turned on.
REG_SETJMP
Appears attached to each CALL_INSN to setjmp or a related function.
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 17.9.6
[Stack Arguments], page 488.
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
Chapter 13: RTL Representation 281
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.
assumption: that no RTL expression object of a certain kind appears in more than one
place in the containing structure.
These assumptions refer to a single function; except for the RTL objects that describe
global variables and external functions, and a few standard objects such as small integer
constants, no RTL objects are common to two functions.
• Each pseudo-register has only a single reg object to represent it, and therefore only a
single machine mode.
• For any symbolic label, there is only one symbol_ref object referring to it.
• All const_int expressions with equal values are shared.
• There is only one pc expression.
• There is only one cc0 expression.
• There is only one const_double expression with value 0 for each floating point mode.
Likewise for values 1 and 2.
• There is only one const_vector expression with value 0 for each vector mode, be it
an integer or a double constant vector.
• No label_ref or scratch appears in more than one place in the RTL structure; in
other words, it is safe to do a tree-walk of all the insns in the function and assume that
each time a label_ref or scratch is seen it is distinct from all others that are seen.
• Only one mem object is normally created for each static variable or stack slot, so these
objects are frequently shared in all the places they appear. However, separate but equal
objects for these variables are occasionally made.
• When a single asm statement has multiple output operands, a distinct asm_operands
expression is made for each output operand. However, these all share the vector which
contains the sequence of input operands. This sharing is used later on to test whether
two asm_operands expressions come from the same statement, so all optimizations
must carefully preserve the sharing if they copy the vector at all.
• No RTL object appears in more than one place in the RTL structure except as described
above. Many passes of the compiler rely on this by assuming that they can modify
RTL objects in place without unwanted side-effects on other insns.
• 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.c’, 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.
GCC was designed to use RTL internally only. Correct RTL for a given program is
very dependent on the particular target machine. And the RTL does not contain all the
information about the program.
The proper way to interface GCC to a new language front end is with the “tree” data
structure, described in the files ‘tree.h’ and ‘tree.def’. The documentation for this struc-
ture (see Chapter 10 [GENERIC], page 135) is incomplete.
Chapter 14: Control Flow Graph 285
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;
14.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_safe
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 14: Control Flow Graph 289
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
290 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 13.19 [Insns], page 273.
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 14: Control Flow Graph 293
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.
loops are never traversed, if they need to be visited, this must be done separately after their
creation. The FOR_EACH_LOOP macro allocates temporary variables. If the FOR_EACH_LOOP
loop were ended using break or goto, they would not be released; FOR_EACH_LOOP_BREAK
macro must be used instead.
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 15: Analysis and Representation of Loops 297
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.
• Many optimizations (value range analysis, final value replacement) are interested in
the values that are defined in the loop and used outside of it, i.e., exactly those for that
we create new PHI nodes.
• In induction variable analysis, it is not necessary to specify the loop in that the analysis
should be performed – the scalar evolution analysis always returns the results with
respect to the loop in that the SSA name is defined.
• It makes updating of SSA form during loop transformations simpler. Without LCSSA,
operations like loop unrolling may force creation of PHI nodes arbitrarily far from
the loop, while in LCSSA, the SSA form can be updated locally. However, since we
only keep real operands in LCSSA, we cannot use this advantage (we could have local
updating of real operands, but it is not much more efficient than to use generic SSA
form updating for it as well; the amount of changes to SSA is the same).
However, it also means LCSSA must be updated. This is usually straightforward, unless
you create a new value in loop and use it outside, or unless you manipulate loop exit
edges (functions are provided to make these manipulations simple). rewrite_into_loop_
closed_ssa is used to rewrite SSA form to LCSSA, and verify_loop_closed_ssa to check
that the invariant of LCSSA is preserved.
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.
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.
Chapter 16: Machine Descriptions 305
16 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.
knows certain names and will use the instruction patterns with those names, if the
names are defined in the machine description.
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.
Names that are not thus known and used in RTL-generation have no effect; they are
equivalent to no name at all.
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.
2. The RTL template: This is a vector of incomplete RTL expressions which describe
the semantics of the instruction (see Section 16.4 [RTL Template], page 307). 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.
For an insn where the condition has once matched, it cannot later be used to control
register allocation by excluding certain register or value combinations.
4. The output template or output statement: This is either a string, or a fragment of C
code which returns a string.
When simple substitution isn’t general enough, you can specify a piece of C code to
compute the output. See Section 16.6 [Output Statement], page 312.
5. The insn attributes: This is an optional vector containing the values of attributes for
insns matching this pattern (see Section 16.19 [Insn Attributes], page 407).
"*
{
if (TARGET_68020 || ! ADDRESS_REG_P (operands[0]))
return \"tstl %0\";
return \"cmpl #0,%0\";
}")
This can also be written using braced strings:
(define_insn "tstsi"
[(set (cc0)
(match_operand:SI 0 "general_operand" "rm"))]
""
{
if (TARGET_68020 || ! ADDRESS_REG_P (operands[0]))
return "tstl %0";
return "cmpl #0,%0";
})
This describes an instruction which sets the condition codes based on the value of a
general operand. It has no condition, so any insn with an RTL description of the form
shown may be matched to this pattern. The name ‘tstsi’ means “test a SImode value”
and tells the RTL generation pass that, when it is necessary to test such a value, an insn
to do so can be constructed using this pattern.
The output control string is a piece of C code which chooses which output template to
return based on the kind of operand and the specific type of CPU for which code is being
generated.
‘"rm"’ is an operand constraint. Its meaning is explained below.
predicate is a string that is the name of a function that accepts two arguments,
an expression and a machine mode. See Section 16.7 [Predicates], page 313.
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 16.8 [Constraints], page 318). 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 13.15 [Side Effects], page 266.
(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 16.8.1 [Simple Constraints], page 318)
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.
Chapter 16: Machine Descriptions 309
(match_par_dup n [subpat...])
Like match_op_dup, but for match_parallel instead of match_operator.
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.
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 17.20.7 [Instruction Output], page 566.
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:
(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")
16.7 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.
314 GNU Compiler Collection (GCC) Internals
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 16.8
[Constraints], page 318). 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.
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.
immediate_operand [Function]
This predicate allows any sort of constant that fits in mode. It is an appropriate
choice for instructions that take operands that must be constant.
const_int_operand [Function]
This predicate allows any CONST_INT expression that fits in mode. It is an appropriate
choice for an immediate operand that does not allow a symbol or label.
const_double_operand [Function]
This predicate accepts any CONST_DOUBLE expression that has exactly mode. If mode
is VOIDmode, it will also accept CONST_INT. It is intended for immediate floating point
constants.
The second category of predicates allow only some kind of machine register.
register_operand [Function]
This predicate allows any REG or SUBREG expression that is valid for mode. It is often
suitable for arithmetic instruction operands on a RISC machine.
pmode_register_operand [Function]
This is a slight variant on register_operand which works around a limitation in the
machine-description reader.
(match_operand n "pmode_register_operand" constraint)
means exactly what
Chapter 16: Machine Descriptions 315
scratch_operand [Function]
This predicate allows hard registers and SCRATCH expressions, but not pseudo-
registers. It is used internally by match_scratch; it should not be used
directly.
The third category of predicates allow only some kind of memory reference.
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 17.13
[Addressing Modes], page 515).
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 13.16 [Incdec], page 271); which one is determined by the
STACK_PUSH_CODE macro (see Section 17.9.1 [Frame Layout], page 477).
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.
316 GNU Compiler Collection (GCC) Internals
general_operand [Function]
This predicate allows any immediate, register, or memory operand valid for mode.
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.
MATCH_TEST
This expression has one operand, a string constant containing a C expres-
sion. The predicate’s arguments, op and mode, are available with those
names in the C expression. The MATCH_TEST evaluates to true if the C
expression evaluates to a nonzero value. MATCH_TEST expressions must not
have side effects.
AND
IOR
NOT
IF_THEN_ELSE
The basic ‘MATCH_’ expressions can be combined using these logical opera-
tors, which have the semantics of the C operators ‘&&’, ‘||’, ‘!’, and ‘? :’
respectively. As in Common Lisp, you may give an AND or IOR expres-
sion an arbitrary number of arguments; this has exactly the same effect as
writing a chain of two-argument AND or IOR expressions.
• An optional block of C code, which should execute ‘return true’ if the predicate is
found to match and ‘return false’ if it does not. It must not have any side effects.
The predicate arguments, op and mode, are available with those names.
If a code block is present in a predicate definition, then the RTL expression must
evaluate to true and the code block must execute ‘return true’ for the predicate to
allow the operand. The RTL expression is evaluated first; do not re-check anything in
the code block that was checked in the RTL expression.
The program genrecog scans define_predicate and define_special_predicate ex-
pressions to determine which RTX codes are possibly allowed. You should always make this
explicit in the RTL predicate expression, using MATCH_OPERAND and MATCH_CODE.
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)")))
And here is another, showing the use of the C block.
;; True if op is a register operand that is (or could be) a GR reg.
(define_predicate "gr_register_operand"
(match_operand 0 "register_operand")
{
unsigned int regno;
if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
exact same treatment of CONST_INT or CONST_DOUBLE that the generic predicates provide,
use a MATCH_OPERAND subexpression to call const_int_operand, const_double_operand,
or immediate_operand.
Predicates written with define_special_predicate do not get any automatic mode
checks, and are treated as having special mode handling by genrecog.
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’.
target machine has predecrement addressing) and ‘>’ (if the target machine has
preincrement addressing).
‘V’ A memory operand that is not offsettable. In other words, anything that would
fit the ‘m’ constraint but not the ‘o’ constraint.
‘<’ A memory operand with autodecrement addressing (either predecrement or
postdecrement) is allowed. In inline asm this constraint is only allowed if the
operand is used exactly once in an instruction that can handle the side-effects.
Not using an operand with ‘<’ in constraint string in the inline asm pattern
at all or using it in multiple instructions isn’t valid, because the side-effects
wouldn’t be performed or would be performed more than once. Furthermore,
on some targets the operand with ‘<’ in constraint string must be accompanied
by special instruction suffixes like %U0 instruction suffix on PowerPC or %P0 on
IA-64.
‘>’ A memory operand with autoincrement addressing (either preincrement or
postincrement) is allowed. In inline asm the same restrictions as for ‘<’ ap-
ply.
‘r’ A register operand is allowed provided that it is in a general register.
‘i’ An immediate integer operand (one with constant value) is allowed. This in-
cludes symbolic constants whose values will be known only at assembly time or
later.
‘n’ An immediate integer operand with a known numeric value is allowed. Many
systems cannot support assembly-time constants for operands less than a word
wide. Constraints for these operands should use ‘n’ rather than ‘i’.
‘I’, ‘J’, ‘K’, . . . ‘P’
Other letters in the range ‘I’ through ‘P’ may be defined in a machine-dependent
fashion to permit immediate integer operands with explicit integer values in
specified ranges. For example, on the 68000, ‘I’ is defined to stand for the
range of values 1 to 8. This is the range permitted as a shift count in the shift
instructions.
‘E’ An immediate floating operand (expression code const_double) is allowed, but
only if the target floating point format is the same as that of the host machine
(on which the compiler is running).
‘F’ An immediate floating operand (expression code const_double or
const_vector) is allowed.
‘G’, ‘H’ ‘G’ and ‘H’ may be defined in a machine-dependent fashion to permit immediate
floating operands in particular ranges of values.
‘s’ An immediate integer operand whose value is not an explicit integer is allowed.
This might appear strange; if an insn allows a constant operand with a value
not known at compile time, it certainly must allow any known value. So why
use ‘s’ instead of ‘i’? Sometimes it allows better code to be generated.
For example, on the 68000 in a fullword instruction it is possible to use an
immediate operand; but if the immediate value is between −128 and 127, better
320 GNU Compiler Collection (GCC) Internals
code results from loading the value into a register and using the register. This
is because the load into the register can be done with a ‘moveq’ instruction. We
arrange for this to happen by defining the letter ‘K’ to mean “any integer outside
the range −128 to 127”, and then specifying ‘Ks’ in the operand constraints.
‘g’ Any register, memory or immediate integer operand is allowed, except for reg-
isters that are not general registers.
‘X’ Any operand whatsoever is allowed, even if it does not satisfy general_
operand. This is normally used in the constraint of a match_scratch when
certain alternatives will not actually require a scratch register.
‘0’, ‘1’, ‘2’, . . . ‘9’
An operand that matches the specified operand number is allowed. If a digit
is used together with letters within the same alternative, the digit should come
last.
This number is allowed to be more than a single digit. If multiple digits are en-
countered consecutively, they are interpreted as a single decimal integer. There
is scant chance for ambiguity, since to-date it has never been desirable that
‘10’ be interpreted as matching either operand 1 or operand 0. Should this be
desired, one can use multiple alternatives instead.
This is called a matching constraint and what it really means is that the as-
sembler has only a single operand that fills two roles considered separate in the
RTL insn. For example, an add insn has two input operands and one output
operand in the RTL, but on most CISC machines an add instruction really has
only two operands, one of them an input-output operand:
addl #35,r12
Matching constraints are used in these circumstances. More precisely, the two
operands that match must include one input-only operand and one output-only
operand. Moreover, the digit must be a smaller number than the number of
the operand that uses it in the constraint.
For operands to match in a particular case usually means that they are identical-
looking RTL expressions. But in a few special cases specific kinds of dissimi-
larity are allowed. For example, *x as an input operand will match *x++ as an
output operand. For proper results in such cases, the output template should
always use the output-operand’s number when printing the operand.
‘p’ An operand that is a valid memory address is allowed. This is for “load address”
and “push address” instructions.
‘p’ in the constraint must be accompanied by address_operand as the predicate
in the match_operand. This predicate interprets the mode specified in the
match_operand as the mode of the memory reference for which the address
would be valid.
other-letters
Other letters can be defined in machine-dependent fashion to stand for par-
ticular classes of registers or other arbitrary operand types. ‘d’, ‘a’ and ‘f’
are defined on the 68000/68020 to stand for data, address and floating point
registers.
Chapter 16: Machine Descriptions 321
In order to have valid assembler code, each operand must satisfy its constraint. But a
failure to do so does not prevent the pattern from applying to an insn. Instead, it directs
the compiler to modify the code so that the constraint will be satisfied. Usually this is done
by copying an operand into a register.
Contrast, therefore, the two instruction patterns that follow:
(define_insn ""
[(set (match_operand:SI 0 "general_operand" "=r")
(plus:SI (match_dup 0)
(match_operand:SI 1 "general_operand" "r")))]
""
"...")
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.
322 GNU Compiler Collection (GCC) Internals
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.
• A nonoffsettable memory reference can be reloaded by copying the address into a
register. So if the constraint uses the letter ‘o’, all memory references are taken care
of.
• A constant operand can be reloaded by allocating space in memory to hold it as preini-
tialized data. Then the memory reference can be used in place of the constant. So if
the constraint uses the letters ‘o’ or ‘m’, constant operands are not a problem.
• If the constraint permits a constant and a pseudo register used in an insn was not
allocated to a hard register and is equivalent to a constant, the register will be replaced
with the constant. If the predicate does not permit a constant and the insn is re-
recognized for some reason, the compiler will crash. Thus the predicate must always
recognize any objects allowed by the constraint.
If the operand’s predicate can recognize registers, but the constraint does not permit
them, it can make the compiler crash. When this operand happens to be a register, the
reload pass will be stymied, because it does not know how to copy a register temporarily
into memory.
If the predicate accepts a unary operator, the constraint applies to the operand. For
example, the MIPS processor at ISA level 3 supports an instruction which adds two registers
in SImode to produce a DImode result, but only if the registers are correctly sign extended.
This predicate for the input operands accepts a sign_extend of an SImode register. Write
the constraint to indicate the type of register that is required for the operand of the sign_
extend.
The first alternative has ‘m’ (memory) for operand 0, ‘0’ for operand 1 (meaning it must
match operand 0), and ‘dKs’ for operand 2. The second alternative has ‘d’ (data register)
for operand 0, ‘0’ for operand 1, and ‘dmKs’ for operand 2. The ‘=’ and ‘%’ in the constraints
apply to all the alternatives; their meaning is explained in the next section (see Section 16.8.3
[Class Preferences], page 323).
If all the operands fit any one alternative, the instruction is valid. Otherwise, for each
alternative, the compiler counts how many instructions must be added to copy the operands
so that that alternative applies. The alternative requiring the least copying is chosen. If
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 16.6 [Output Statement], page 312.
When the compiler fixes up the operands to satisfy the constraints, it needs to
know which operands are read by the instruction and which are written by it.
‘=’ identifies an operand which is only written; ‘+’ identifies an operand that is
both read and written; all other operands are assumed to only be read.
If you specify ‘=’ or ‘+’ in a constraint, you put it in the first character of the
constraint string.
‘&’ Means (in a particular alternative) that this operand is an earlyclobber operand,
which is written before the instruction is finished using the input operands.
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.
A 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.
Chapter 16: Machine Descriptions 325
‘*’ 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
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")))]
...)
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.
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)
Chapter 16: Machine Descriptions 329
Cl1 Left-shift of −1, i.e., a bit mask with a block of leading ones, the
rest being a block of trailing zeroes. Can only match when the
‘-m1reg-reg’ option is active.
Cr1 Right-shift of −1, i.e., a bit mask with a trailing block of ones, the
rest being zeroes. Or to put it another way, one less than a power
of two. Can only match when the ‘-m1reg-reg’ option is active.
Cal Constant for arithmetic/logical operations. This is like i, except
that for position independent code, no symbols / expressions need-
ing relocations are allowed.
Csy Symbolic constant for call/jump instruction.
Rcs The register class usable in short insns. This is a register class
constraint, and can thus drive register allocation. This constraint
won’t match unless ‘-mprefer-short-insn-regs’ is in effect.
Rsc The the register class of registers that can be used to hold a sibcall
call address. I.e., a caller-saved register.
Rct Core control register class.
Rgs The register group usable in short insns. This constraint does not
use a register class, so that it only passively matches suitable reg-
isters, and doesn’t drive register allocation.
Car Constant suitable for the addsi3 r pattern. This is a valid offset
For byte, halfword, or word addressing.
Rra Matches the return address if it can be replaced with the link reg-
ister.
Rcc Matches the integer condition code register.
Sra Matches the return address if it is in a stack slot.
Cfm Matches control register values to switch fp mode, which are en-
capsulated in UNSPEC_FP_MODE.
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.
Chapter 16: Machine Descriptions 331
It15 A constant which is not in the range of imm15u but ok for btgl
instruction.
Ii15 A constant whose compliment value is in the range of imm15u and
ok for bitci instruction.
Is16 Signed immediate 16-bit value.
Is17 Signed immediate 17-bit value.
Is19 Signed immediate 19-bit value.
Is20 Signed immediate 20-bit value.
Ihig The immediate value that can be simply set high 20-bit.
Izeb The immediate value 0xff.
Izeh The immediate value 0xffff.
Ixls The immediate value 0x01.
Ix11 The immediate value 0x7ff.
Ibms The immediate value with power of 2.
Ifex The immediate value with power of 2 minus 1.
U33 Memory constraint for 333 format.
U45 Memory constraint for 45 format.
U37 Memory constraint for 37 format.
Nios II family—‘config/nios2/constraints.md’
I Integer that is valid as an immediate operand in an instruction
taking a signed 16-bit number. Range −32768 to 32767.
J Integer that is valid as an immediate operand in an instruction
taking an unsigned 16-bit number. Range 0 to 65535.
K Integer that is valid as an immediate operand in an instruction
taking only the upper 16-bits of a 32-bit number. Range 32-bit
numbers with the lower 16-bits being 0.
L Integer that is valid as an immediate operand for a shift instruction.
Range 0 to 31.
M Integer that is valid as an immediate operand for only the value 0.
Can be used in conjunction with the format modifier z to use r0
instead of 0 in the assembly output.
N Integer that is valid as an immediate operand for a custom instruc-
tion opcode. Range 0 to 255.
P An immediate operand for R2 andchi/andci instructions.
S Matches immediates which are addresses in the small data section
and therefore can be added to gp as a 16-bit immediate to re-create
their 32-bit value.
Chapter 16: Machine Descriptions 339
wS Vector constant that can be loaded with XXSPLTIB & sign exten-
sion.
h ‘MQ’, ‘CTR’, or ‘LINK’ register
c ‘CTR’ register
l ‘LINK’ register
x ‘CR’ register (condition register) number 0
y ‘CR’ register (condition register)
z ‘XER[CA]’ carry bit (part of the XER register)
I Signed 16-bit constant
J Unsigned 16-bit constant shifted left 16 bits (use ‘L’ instead for
SImode constants)
K Unsigned 16-bit constant
L Signed 16-bit constant shifted left 16 bits
M Constant larger than 31
N Exact power of 2
O Zero
P Constant whose negation is a signed 16-bit constant
G Floating point constant that can be loaded into a register with one
instruction per word
H Integer/Floating point constant that can be loaded into a register
using three instructions
m Memory operand. Normally, m does not allow addresses that update
the base register. If ‘<’ or ‘>’ constraint is also used, they are
allowed and therefore on PowerPC targets in that case it is only safe
to use ‘m<>’ in an asm statement if that asm statement accesses the
operand exactly once. The asm statement must also use ‘%U<opno>’
as a placeholder for the “update” flag in the corresponding load or
store instruction. For example:
asm ("st%U0 %1,%0" : "=m<>" (mem) : "r" (val));
is correct but:
asm ("st %1,%0" : "=m<>" (mem) : "r" (val));
is not.
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 Memory operand that is an offset from a register (it is usually better
to use ‘m’ or ‘es’ in asm statements)
Chapter 16: Machine Descriptions 343
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)
L A constant in the range supported by movcc instructions (11-bit
signed immediate)
M A constant in the range supported by movrcc instructions (10-bit
signed immediate)
N Same as ‘K’, except that it verifies that bits that are not in the
lower 32-bit range are all zero. Must be used instead of ‘K’ for
modes wider than SImode
O The constant 4096
G Floating-point zero
H Signed 13-bit constant, sign-extended to 32 or 64 bits
P The constant -1
Q Floating-point constant whose integral representation can be moved
into an integer register using a single sethi instruction
R Floating-point constant whose integral representation can be moved
into an integer register using a single mov instruction
S Floating-point constant whose integral representation can be moved
into an integer register using a high/lo sum instruction sequence
T Memory address aligned to an 8-byte boundary
Chapter 16: Machine Descriptions 347
U Even register
W Memory address for ‘e’ constraint registers
w Memory address with only a base register
Y Vector zero
SPU—‘config/spu/spu.h’
a An immediate which can be loaded with the il/ila/ilh/ilhu instruc-
tions. const int is treated as a 64 bit value.
c An immediate for and/xor/or instructions. const int is treated as
a 64 bit value.
d An immediate for the iohl instruction. const int is treated as a 64
bit value.
f An immediate which can be loaded with fsmbi.
A An immediate which can be loaded with the il/ila/ilh/ilhu instruc-
tions. const int is treated as a 32 bit value.
B An immediate for most arithmetic instructions. const int is treated
as a 32 bit value.
C An immediate for and/xor/or instructions. const int is treated as
a 32 bit value.
D An immediate for the iohl instruction. const int is treated as a 32
bit value.
I A constant in the range [−64, 63] for shift/rotate instructions.
J An unsigned 7-bit constant for conversion/nop/channel instruc-
tions.
K A signed 10-bit constant for most arithmetic instructions.
M A signed 16 bit immediate for stop.
N An unsigned 16-bit constant for iohl and fsmbi.
O An unsigned 7-bit constant whose 3 least significant bits are 0.
P An unsigned 3-bit constant for 16-byte rotates and shifts
R Call operand, reg, for indirect calls
S Call operand, symbol, for relative calls.
T Call operand, const int, for absolute calls.
U An immediate which can be loaded with the il/ila/ilh/ilhu instruc-
tions. const int is sign extended to 128 bit.
W An immediate for shift and rotate instructions. const int is treated
as a 32 bit value.
Y An immediate for and/xor/or instructions. const int is sign ex-
tended as a 128 bit.
348 GNU Compiler Collection (GCC) Internals
TILE-Gx—‘config/tilegx/constraints.md’
R00
R01
R02
R03
R04
R05
R06
R07
R08
R09
R10 Each of these represents a register constraint for an individual reg-
ister, from r0 to r10.
I Signed 8-bit integer constant.
J Signed 16-bit integer constant.
K Unsigned 16-bit integer constant.
L Integer constant that fits in one signed byte when incremented by
one (−129 . . . 126).
m Memory operand. If used together with ‘<’ or ‘>’, the operand can
have postincrement which requires printing with ‘%In’ and ‘%in’ on
TILE-Gx. For example:
asm ("st_add %I0,%1,%i0" : "=m<>" (*mem) : "r" (val));
TILEPro—‘config/tilepro/constraints.md’
R00
R01
R02
R03
R04
R05
R06
R07
R08
R09
R10 Each of these represents a register constraint for an individual reg-
ister, from r0 to r10.
I Signed 8-bit integer constant.
J Signed 16-bit integer constant.
K Nonzero integer constant with low 16 bits zero.
L Integer constant that fits in one signed byte when incremented by
one (−129 . . . 126).
m Memory operand. If used together with ‘<’ or ‘>’, the operand can
have postincrement which requires printing with ‘%In’ and ‘%in’ on
TILEPro. For example:
asm ("swadd %I0,%1,%i0" : "=m<>" (mem) : "r" (val));
preferred_for_speed
Says whether an enabled alternative should be used in code that is optimized
for speed.
All these attributes should use (const_int 1) to allow an alternative or (const_int 0)
to disallow it. The attributes must be a static property of the subtarget; they cannot for
example depend on the current operands, on the current optimization level, on the location
of the insn within the body of a loop, on whether register allocation has finished, or on the
current compiler pass.
The enabled attribute is a correctness property. It tells GCC to act as though the
disabled alternatives were never defined in the first place. This is useful when adding new
instructions to an existing pattern in cases where the new instructions are only available for
certain cpu architecture levels (typically mapped to the -march= command-line option).
In contrast, the preferred_for_size and preferred_for_speed attributes are strong
optimization hints rather than correctness properties. preferred_for_size tells GCC
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")])
Chapter 16: Machine Descriptions 355
Non-register constraints are more like predicates: the constraint definition gives a boolean
expression which indicates whether the constraint matches.
it doesn’t. Constraint expressions should indicate which RTL codes they might
match, just like predicate expressions.
match_test C expressions have access to the following variables:
op The RTL object defining the operand.
mode The machine mode of op.
ival ‘INTVAL (op)’, if op is a const_int.
hval ‘CONST_DOUBLE_HIGH (op)’, if op is an integer const_double.
lval ‘CONST_DOUBLE_LOW (op)’, if op is an integer const_double.
rval ‘CONST_DOUBLE_REAL_VALUE (op)’, if op is a floating-point
const_double.
The *val variables should only be used once another piece of the expression has verified
that op is the appropriate kind of RTL object.
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 16.8.5 [Machine Constraints], page 325, 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.
constraint_num [Enum]
For each constraint except g, there is a corresponding enumeration constant:
‘CONSTRAINT_’ plus the mangled name of the constraint. Functions that take an
enum constraint_num as an argument expect one of these constants.
inline bool satisfies_constraint_m (rtx exp) [Function]
For each non-register constraint m except g, there is one of these functions; it returns
true if exp satisfies the constraint. These functions are only visible if ‘rtl.h’ was
included before ‘tm_p.h’.
bool constraint_satisfied_p (rtx exp, enum constraint num c) [Function]
Like the satisfies_constraint_m functions, but the constraint to test is given as
an argument, c. If c specifies a register constraint, this function will always return
false.
enum reg_class reg_class_for_constraint (enum constraint num [Function]
c)
Returns the register class associated with c. If c is not a register constraint, or those
registers are not available for the currently selected subtarget, returns NO_REGS.
Here is an example use of satisfies_constraint_m. In peephole optimizations (see
Section 16.18 [Peephole Definitions], page 403), operand constraint strings are ignored, so if
there are relevant constraints, they must be tested in the C condition. In the example, the
optimization is applied if operand 2 does not satisfy the ‘K’ constraint. (This is a simplified
version of a peephole definition from the i386 machine description.)
(define_peephole2
[(match_scratch:SI 3 "r")
(set (match_operand:SI 0 "register_operand" "")
(mult:SI (match_operand:SI 1 "memory_operand" "")
(match_operand:SI 2 "immediate_operand" "")))]
"!satisfies_constraint_K (operands[2])"
"")
This class of patterns is special in several ways. First of all, each of these names
up to and including full word size must be defined, because there is no other
way to copy a datum from one place to another. If there are patterns accepting
operands in larger modes, ‘movm’ must be defined for integer modes of those
sizes.
Second, these patterns are not used solely in the RTL generation pass. Even
the reload pass can generate move insns to copy values from stack slots into
temporary registers. When it does so, one of the operands is a hard register
and the other is an operand that can need to be reloaded into a register.
Therefore, when given such a pair of operands, the pattern must generate RTL
which needs no reloading and needs no temporary registers—no registers other
than the operands. For example, if you support the pattern with a define_
expand, then in such a case the define_expand mustn’t call force_reg or any
other such function which might generate new pseudo registers.
This requirement exists even for subword modes on a RISC machine where
fetching those modes from memory normally requires several insns and some
temporary registers.
During reload a memory reference with an invalid address may be passed as
an operand. Such an address will be replaced with a valid address later in the
reload pass. In this case, nothing may be done with the address except to use
it as it stands. If it is copied, it will not be replaced with a valid address. No
attempt should be made to make such an address into a valid address and no
routine (such as change_address) that will do so may be called. Note that
general_operand will fail when applied to such an address.
The global variable reload_in_progress (which must be explicitly declared if
required) can be used to determine whether such special handling is required.
The variety of operands that have reloads depends on the rest of the machine
description, but typically on a RISC machine these can only be pseudo regis-
ters that did not get hard registers, while on other machines explicit memory
references will get optional reloads.
If a scratch register is required to move an object to or from memory, it can be
allocated using gen_reg_rtx prior to life analysis.
If there are cases which need scratch registers during or after reload, you must
provide an appropriate secondary reload target hook.
The macro can_create_pseudo_p can be used to determine if it is unsafe to
create new pseudo registers. If this variable is nonzero, then it is unsafe to call
gen_reg_rtx to allocate a new pseudo.
The constraints on a ‘movm’ must permit moving any hard register to any other
hard register provided that HARD_REGNO_MODE_OK permits mode m in both reg-
isters and TARGET_REGISTER_MOVE_COST applied to their classes returns a value
of 2.
It is obligatory to support floating point ‘movm’ instructions into and out of any
registers that can hold fixed point values, because unions and structures (which
have modes SImode or DImode) can be in those registers and they may have
floating point members.
360 GNU Compiler Collection (GCC) Internals
There may also be a need to support fixed point ‘movm’ instructions in and out
of floating point registers. Unfortunately, I have forgotten why this was so, and
I don’t know whether it is still true. If HARD_REGNO_MODE_OK rejects fixed point
values in floating point registers, then the constraints of the fixed point ‘movm’
instructions must be designed to avoid ever trying to reload into a floating point
register.
‘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 17.8 [Register
Classes], page 467.
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.
‘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
Chapter 16: Machine Descriptions 361
Section 16.15 [Expander Definitions], page 396) 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 16.4 [RTL Template], page 307)
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];
For example, ‘vec_load_lanestiv4hi’ loads 8 16-bit values from memory into
a register of mode ‘TI’. The register contains two consecutive vectors of mode
‘V4HI’.
This pattern can only be used if:
TARGET_ARRAY_MODE_SUPPORTED_P (n, c)
is true. GCC assumes that, if a target supports this kind of instruction for
some mode n, it also supports unaligned loads for vectors of mode n.
This pattern is not allowed to FAIL.
‘vec_store_lanesmn’
Equivalent to ‘vec_load_lanesmn’, with the memory and register operands
reversed. That is, the instruction 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[j * c + i] = operand1[i][j];
for a memory operand 0 and register operand 1.
This pattern is not allowed to FAIL.
‘vec_setm’
Set given field in the vector value. Operand 0 is the vector to modify, operand
1 is new value of field and operand 2 specify the field index.
‘vec_extractm’
Extract given field from the vector value. Operand 1 is the vector, operand 2
specify field index and operand 0 place to store value into.
362 GNU Compiler Collection (GCC) Internals
‘vec_initm’
Initialize the vector to given values. Operand 0 is the vector to initialize and
operand 1 is parallel containing values for individual fields.
‘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.
‘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.
This pattern is not allowed to FAIL.
‘maskstoremn’
Perform a masked store of vector from register operand 1 of mode m into
memory operand 0. Mask is provided in register operand 2 of mode n.
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
Chapter 16: Machine Descriptions 363
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.
‘vec_perm_constm’
Like ‘vec_perm’ except that the permutation is a compile-time constant. That
is, operand 3, the selector, is a CONST_VECTOR.
Some targets cannot perform a permutation with a variable selector, but can
efficiently perform a constant permutation. Further, the target hook vec_perm_
ok is queried to determine if the specific constant permutation is available effi-
ciently; the named pattern is never expanded without vec_perm_ok returning
true.
There is no need for a target to supply both ‘vec_permm’ and
‘vec_perm_constm’ if the former can trivially implement the operation with,
say, the vector constant loaded into a register.
‘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.
364 GNU Compiler Collection (GCC) Internals
‘usubvm4’, ‘umulvm4’
Similar, for other unsigned arithmetic operations.
‘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 calcula-
tions 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
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.
Chapter 16: Machine Descriptions 365
‘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.
‘sdot_prodm’
‘udot_prodm’
Compute the sum of the products of two signed/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.
‘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.
‘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.)
‘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 N/2 are
concatenated after narrowing them down using truncation.
‘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 N/2 are concatenated.
366 GNU Compiler Collection (GCC) Internals
‘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_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).
‘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).
‘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.
Chapter 16: Machine Descriptions 367
‘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.
‘umulm3_highpart’
Similar, but the multiplication is unsigned.
‘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.
‘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.
368 GNU Compiler Collection (GCC) Internals
‘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.
‘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.
‘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.
Chapter 16: Machine Descriptions 371
‘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.
‘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).
372 GNU Compiler Collection (GCC) Internals
‘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.
‘ffsm2’ Store into operand 0 one plus the index of the least significant 1-bit of operand
1. If operand 1 is zero, store zero.
m is either a scalar or vector integer mode. When it is a scalar, operand 1 has
mode m but operand 0 can have whatever scalar integer mode is suitable for the
target. The compiler will insert conversion instructions as necessary (typically
to convert the result to the same width as int). When m is a vector, both
operands must have mode m.
This pattern is not allowed to FAIL.
‘clrsbm2’ Count leading redundant sign bits. Store into operand 0 the number of redun-
dant sign bits in operand 1, starting at the most significant bit position. A
redundant sign bit is defined as any sign bit after the first. As such, this count
will be one less than the count of leading sign bits.
m is either a scalar or vector integer mode. When it is a scalar, operand 1 has
mode m but operand 0 can have whatever scalar integer mode is suitable for the
target. The compiler will insert conversion instructions as necessary (typically
to convert the result to the same width as int). When m is a vector, both
operands must have mode m.
This pattern is not allowed to FAIL.
‘clzm2’ Store into operand 0 the number of leading 0-bits in operand 1, starting at the
most significant bit position. If operand 1 is 0, the CLZ_DEFINED_VALUE_AT_
ZERO (see Section 17.30 [Misc], page 593) macro defines if the result is undefined
or has a useful value.
m is either a scalar or vector integer mode. When it is a scalar, operand 1 has
mode m but operand 0 can have whatever scalar integer mode is suitable for the
target. The compiler will insert conversion instructions as necessary (typically
to convert the result to the same width as int). When m is a vector, both
operands must have mode m.
This pattern is not allowed to FAIL.
Chapter 16: Machine Descriptions 373
‘ctzm2’ Store into operand 0 the number of trailing 0-bits in operand 1, starting at the
least significant bit position. If operand 1 is 0, the CTZ_DEFINED_VALUE_AT_
ZERO (see Section 17.30 [Misc], page 593) macro defines if the result is undefined
or has a useful value.
m is either a scalar or vector integer mode. When it is a scalar, operand 1 has
mode m but operand 0 can have whatever scalar integer mode is suitable for the
target. The compiler will insert conversion instructions as necessary (typically
to convert the result to the same width as int). When m is a vector, both
operands must have mode m.
This pattern is not allowed to FAIL.
‘popcountm2’
Store into operand 0 the number of 1-bits in operand 1.
m is either a scalar or vector integer mode. When it is a scalar, operand 1 has
mode m but operand 0 can have whatever scalar integer mode is suitable for the
target. The compiler will insert conversion instructions as necessary (typically
to convert the result to the same width as int). When m is a vector, both
operands must have mode m.
This pattern is not allowed to FAIL.
‘paritym2’
Store into operand 0 the parity of operand 1, i.e. the number of 1-bits in operand
1 modulo 2.
m is either a scalar or vector integer mode. When it is a scalar, operand 1 has
mode m but operand 0 can have whatever scalar integer mode is suitable for the
target. The compiler will insert conversion instructions as necessary (typically
to convert the result to the same width as int). When m is a vector, both
operands must have mode m.
This pattern is not allowed to FAIL.
‘one_cmplm2’
Store the bitwise-complement of operand 1 into operand 0.
‘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 move 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
374 GNU Compiler Collection (GCC) Internals
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 moved data units in the block.
These patterns need not give special consideration to the possibility that the
source and destination strings might overlap.
‘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 ‘movmemm’ 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 can not be
represented as CONST INT). Operand 9 is the probable maximal size (i.e. we
can not 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 movmemm.
‘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 ‘movmemm’.
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.
Chapter 16: Machine Descriptions 375
‘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
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.
‘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).
376 GNU Compiler Collection (GCC) Internals
‘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.
‘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.
Chapter 16: Machine Descriptions 377
‘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.
‘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.
378 GNU Compiler Collection (GCC) Internals
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.
‘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.
‘call_value’
Subroutine call instruction returning a value. Operand 0 is the hard register in
which the value is returned. There are three more operands, the same as the
three operands of the ‘call’ instruction (but with numbers increased by one).
Subroutines that return BLKmode objects use the ‘call’ insn.
380 GNU Compiler Collection (GCC) Internals
‘call_pop’, ‘call_value_pop’
Similar to ‘call’ and ‘call_value’, except used if defined and if RETURN_POPS_
ARGS is nonzero. They should emit a parallel that contains both the function
call and a set to indicate the adjustment made to the frame pointer.
For machines where RETURN_POPS_ARGS can be nonzero, the use of these pat-
terns increases the number of functions for which the frame pointer can be
eliminated, if desired.
‘untyped_call’
Subroutine call instruction returning a value of any type. Operand 0 is the
function to call; operand 1 is a memory location where the result of calling the
function is to be stored; operand 2 is a parallel expression where each element
is a set expression that indicates the saving of a function return value into the
result block.
This instruction pattern should be defined to support __builtin_apply on
machines where special instructions are needed to call a subroutine with ar-
bitrary arguments or to save the value returned. This instruction pattern is
required on machines that have multiple registers that can hold a return value
(i.e. FUNCTION_VALUE_REGNO_P is true for more than one register).
‘return’ Subroutine return instruction. This instruction pattern name should be defined
only if a single instruction can do all the work of returning from a function.
Like the ‘movm’ patterns, this pattern is also used after the RTL generation
phase. In this case it is to support machines where multiple instructions are
usually needed to return from a function, but some class of functions only re-
quires one instruction to implement a return. Normally, the applicable functions
are those which do not need to save any registers or allocate stack space.
It is valid for this pattern to expand to an instruction using simple_return if
no epilogue is required.
‘simple_return’
Subroutine return instruction. This instruction pattern name should be defined
only if a single instruction can do all the work of returning from a function on a
path where no epilogue is required. This pattern is very similar to the return
instruction pattern, but it is emitted only by the shrink-wrapping optimization
on paths where the function prologue has not been executed, and a function
return should occur without any of the effects of the epilogue. Additional uses
may be introduced on paths where both the prologue and the epilogue have
executed.
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
Chapter 16: Machine Descriptions 381
0 "comparison_operator"
[(cc0) (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.
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.
382 GNU Compiler Collection (GCC) Internals
‘decrement_and_branch_until_zero’
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 16.13 [Looping
Patterns], page 393.
This optional instruction pattern is only used by the combiner, typically for
loops reversed by the loop optimizer when strength reduction is enabled.
‘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 16.13 [Looping
Patterns], page 393.
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 16.15 [Expander Definitions], page 396) 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.
Some machines require special handling for stack pointer saves and restores. On
those machines, define the patterns corresponding to the non-standard cases by
Chapter 16: Machine Descriptions 383
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 17.9.3 [Stack Checking], page 483) 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 17.9.3 [Stack Checking], page 483) 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.
‘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
Chapter 16: Machine Descriptions 385
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.
386 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 16: Machine Descriptions 387
‘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.
‘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
to a function with the same interface as the __sync_val_compare_and_swap_n
built-in. If the entire set of sync builtins are supported via library calls, the
target can initialize all of the optabs at once with init_sync_libfuncs. For
the purposes of C++11 std::atomic::is_lock_free, it is assumed that these
library calls do not use any kind of interruptable locking.
‘sync_addmode’, ‘sync_submode’
‘sync_iormode’, ‘sync_andmode’
‘sync_xormode’, ‘sync_nandmode’
These patterns emit code for an atomic operation on memory. Operand 0 is the
memory on which the atomic operation is performed. Operand 1 is the second
operand to the binary operator.
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.
If these patterns are not defined, the operation will be constructed from a
compare-and-swap operation, if defined.
388 GNU Compiler Collection (GCC) Internals
‘sync_old_addmode’, ‘sync_old_submode’
‘sync_old_iormode’, ‘sync_old_andmode’
‘sync_old_xormode’, ‘sync_old_nandmode’
These patterns emit code for an atomic operation on memory, and return the
value that the memory contained before the operation. Operand 0 is the result
value, operand 1 is the memory on which the atomic operation is performed,
and operand 2 is the second operand to the binary operator.
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.
If these patterns are not defined, the operation will be constructed from a
compare-and-swap operation, if defined.
‘sync_new_addmode’, ‘sync_new_submode’
‘sync_new_iormode’, ‘sync_new_andmode’
‘sync_new_xormode’, ‘sync_new_nandmode’
These patterns are like their sync_old_op counterparts, except that they return
the value that exists in the memory location after the operation, rather than
before the operation.
‘sync_lock_test_and_setmode’
This pattern takes two forms, based on the capabilities of the target. In either
case, operand 0 is the result of the operand, operand 1 is the memory on which
the atomic operation is performed, and operand 2 is the value to set in the lock.
In the ideal case, this operation is an atomic exchange operation, in which the
previous value in memory operand is copied into the result operand, and the
value operand is stored in the memory operand.
For less capable targets, any value operand that is not the constant 1 should
be rejected with FAIL. In this case the target may use an atomic test-and-set
bit operation. The result operand should contain 1 if the bit was previously set
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.
Chapter 16: Machine Descriptions 389
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.
‘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.
390 GNU Compiler Collection (GCC) Internals
‘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.
‘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
Chapter 16: Machine Descriptions 391
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.
‘mem_thread_fencemode’
This pattern emits code required to implement a thread fence with memory
model semantics. Operand 0 is the memory model to be used.
If this pattern is not specified, all memory models except __ATOMIC_RELAXED
will result in issuing a sync_synchronize barrier pattern.
‘mem_signal_fencemode’
This pattern emits code required to implement a signal fence with memory
model semantics. Operand 0 is the memory model to be used.
This pattern should impact the compiler optimizers the same way that
mem signal fence does, but it does not need to issue any barrier instructions.
If this pattern is not specified, all memory models except __ATOMIC_RELAXED
will result in issuing a sync_synchronize barrier pattern.
‘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.
392 GNU Compiler Collection (GCC) Internals
‘stack_protect_set’
This pattern, if defined, moves a ptr_mode value from the memory 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.
If this pattern is not defined, then a plain move pattern is generated.
‘stack_protect_test’
This pattern, if defined, compares a ptr_mode value from the memory 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.
(HImode, here). If the pattern matches the QImode instruction, the results will be incorrect
if the constant value does not actually fit that mode.
Such instructions to extend constants are rarely generated because they are optimized
away, but they do occasionally happen in nonoptimized compilations.
If a constraint in a pattern allows a constant, the reload pass may replace a register with
a constant permitted by the constraint in some cases. Similarly for memory references.
Because of this substitution, you should not provide separate patterns for increment and
decrement instructions. Instead, they should be generated from the same pattern that sup-
ports register-register add insns by examining the operands and generating the appropriate
machine instruction.
instruction that loads special registers to mark the top and end of a loop and to count the
number of loop iterations. This avoids the need for fetching and executing a ‘dbra’-like
instruction and avoids pipeline stalls associated with the jump.
GCC has three special named patterns to support low overhead looping. They are
‘decrement_and_branch_until_zero’, ‘doloop_begin’, and ‘doloop_end’. The first pat-
tern, ‘decrement_and_branch_until_zero’, is not emitted during RTL generation but may
be emitted during the instruction combination phase. This requires the assistance of the
loop optimizer, using information collected during strength reduction, to reverse a loop to
count down to zero. Some targets also require the loop optimizer to add a REG_NONNEG
note to indicate that the iteration count is always positive. This is needed if the target
performs a signed loop termination test. For example, the 68000 uses a pattern similar to
the following for its dbra instruction:
(define_insn "decrement_and_branch_until_zero"
[(set (pc)
(if_then_else
(ge (plus:SI (match_operand:SI 0 "general_operand" "+d*am")
(const_int -1))
(const_int 0))
(label_ref (match_operand 1 "" ""))
(pc)))
(set (match_dup 0)
(plus:SI (match_dup 0)
(const_int -1)))]
"find_reg_note (insn, REG_NONNEG, 0)"
"...")
Note that since the insn is both a jump insn and has an output, it must deal with its
own reloads, hence the ‘m’ constraints. Also note that since this insn is generated by
the instruction combination phase combining two sequential insns together into an implicit
parallel insn, the iteration counter needs to be biased by the same amount as the decrement
operation, in this case −1. Note that the following similar pattern will not be matched by
the combiner.
(define_insn "decrement_and_branch_until_zero"
[(set (pc)
(if_then_else
(ge (match_operand:SI 0 "general_operand" "+d*am")
(const_int 1))
(label_ref (match_operand 1 "" ""))
(pc)))
(set (match_dup 0)
(plus:SI (match_dup 0)
(const_int -1)))]
"find_reg_note (insn, REG_NONNEG, 0)"
"...")
The other two special looping patterns, ‘doloop_begin’ and ‘doloop_end’, 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
Chapter 16: Machine Descriptions 395
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.
The essential difference between the ‘decrement_and_branch_until_zero’ and the
‘doloop_end’ patterns is that the loop optimizer allocates an additional pseudo register
for the latter 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 name. Each define_expand must have a name, since the only use for it is to refer
to it by name.
• The RTL template. This is a vector of RTL expressions representing a sequence of
separate instructions. Unlike define_insn, there is no implicit surrounding PARALLEL.
• The condition, a string containing a C expression. This expression is used to express
how the availability of this pattern depends on subclasses of target machine, selected
by command-line options when GCC is run. This is just like the condition of a define_
insn that has a standard name. Therefore, the condition (if present) 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.
• The preparation statements, a string containing zero or more C statements which are
to be executed before RTL code is generated from the RTL template.
Usually these statements prepare temporary registers for use as internal operands in
the RTL template, but they can also generate RTL insns directly by calling routines
such as emit_insn, etc. Any such insns precede the ones that come from the RTL
template.
• Optionally, a vector containing the values of attributes. See Section 16.19 [Insn At-
tributes], page 407.
Every RTL insn emitted by a define_expand must match some define_insn in the
machine description. Otherwise, the compiler will crash when trying to generate code for
the insn or trying to optimize it.
The RTL template, in addition to controlling generation of RTL insns, also describes
the operands that need to be specified when this pattern is used. In particular, it gives a
predicate for each operand.
A true operand, which needs to be specified in order to generate RTL from the pattern,
should be described with a match_operand in its first occurrence in the RTL template.
This enters information on the operand’s predicate into the tables that record such things.
GCC uses the information to preload the operand into a register if that is required for valid
RTL code. If the operand is referred to more than once, subsequent references should use
match_dup.
The RTL template may also refer to internal “operands” which are temporary registers
or labels used only within the sequence made by the define_expand. Internal operands are
substituted into the RTL template with match_dup, never with match_operand. The values
of the internal operands are not passed in as arguments by the compiler when it requests
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.
398 GNU Compiler Collection (GCC) Internals
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:
(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]);")
Chapter 16: Machine Descriptions 399
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)); ")
Note: If the define_expand is used to serve a standard binary or unary arithmetic
operation or a bit-field operation, then the last insn it generates must not be a code_label,
barrier or note. It must be an insn, jump_insn or call_insn. If you don’t need a real
insn at the end, emit an insn to copy the result of the operation into itself. Such an insn
will generate no code, but it can avoid problems in the compiler.
(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 16.15 [Expander Definitions], page 396) 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.
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
[(set (match_operand:SI 0 "gen_reg_operand" "")
(sign_extend:SI (match_operand:HI 1 "gen_reg_operand" "")))]
""
[(set (match_dup 0)
(ashift:SI (match_dup 1)
(const_int 16)))
(set (match_dup 0)
(ashiftrt:SI (match_dup 0)
(const_int 16)))]
"
{ operands[1] = gen_lowpart (SImode, operands[1]); }")
When the combiner phase tries to split an insn pattern, it is always the case that the
pattern is not matched by any define_insn. The combiner pass first tries to split a single
set expression and then the same set expression inside a parallel, but followed by a
clobber of a pseudo-reg to use as a scratch register. In these cases, the combiner expects
exactly two new insn patterns to be generated. It will verify that these patterns match
some define_insn definitions, so you need not do this test in the define_split (of course,
there is no point in writing a define_split that will never produce insns that match).
Here is an example of this use of define_split, taken from ‘rs6000.md’:
(define_split
[(set (match_operand:SI 0 "gen_reg_operand" "")
(plus:SI (match_operand:SI 1 "gen_reg_operand" "")
(match_operand:SI 2 "non_add_cint_operand" "")))]
""
Chapter 16: Machine Descriptions 401
it must attach a REG_BR_PROB note to each conditional jump. A global variable split_
branch_probability holds the probability of the original branch in case it was a simple
conditional jump, −1 otherwise. To simplify recomputing of edge frequencies, the new
sequence is required to have only forward jumps to the newly created labels.
For the common case where the pattern of a define split exactly matches the pattern of
a define insn, use define_insn_and_split. It looks like this:
(define_insn_and_split
[insn-pattern]
"condition"
"output-template"
"split-condition"
[new-insn-pattern-1
new-insn-pattern-2
...]
"preparation-statements"
[insn-attributes])
(include
pathname)
For example:
Chapter 16: Machine Descriptions 403
(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.
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
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"
406 GNU Compiler Collection (GCC) Internals
"divsl%.l %2,%3:%0")
The definition is almost identical to define_split (see Section 16.16 [Insn Splitting],
page 399) except that the pattern to match is not a single instruction, but a sequence of
instructions.
It is possible to request additional scratch registers for use in the output template. If
appropriate registers are not free, the pattern will simply not match.
Scratch registers are requested with a match_scratch pattern at the top level of the input
pattern. The allocated register (initially) will be dead at the point requested within the
original sequence. If the scratch is used at more than a single point, a match_dup pattern
at the top level of the input pattern marks the last position in the input sequence at which
the register must be available.
Here is an example from the IA-32 machine description:
(define_peephole2
[(match_scratch:SI 2 "r")
(parallel [(set (match_operand:SI 0 "register_operand" "")
(match_operator:SI 3 "arith_or_logical_operator"
[(match_dup 0)
(match_operand:SI 1 "memory_operand" "")]))
(clobber (reg:CC 17))])]
"! optimize_size && ! TARGET_READ_MODIFY"
[(set (match_dup 2) (match_dup 1))
(parallel [(set (match_dup 0)
(match_op_dup 3 [(match_dup 0) (match_dup 2)]))
(clobber (reg:CC 17))])]
"")
Chapter 16: Machine Descriptions 407
This pattern tries to split a load from its use in the hopes that we’ll be able to schedule
around the memory load latency. It allocates a single SImode register of class GENERAL_REGS
("r") that needs to be live only at the point just before the arithmetic.
A real example requiring extended scratch lifetimes is harder to come by, so here’s a silly
made-up example:
(define_peephole2
[(match_scratch:SI 4 "r")
(set (match_operand:SI 0 "" "") (match_operand:SI 1 "" ""))
(set (match_operand:SI 2 "" "") (match_dup 1))
(match_dup 4)
(set (match_operand:SI 3 "" "") (match_dup 1))]
"/* determine 1 does not overlap 0 and 2 */"
[(set (match_dup 4) (match_dup 1))
(set (match_dup 0) (match_dup 4))
(set (match_dup 2) (match_dup 4))
(set (match_dup 3) (match_dup 4))]
"")
If we had not added the (match_dup 4) in the middle of the input sequence, it might have
been the case that the register we chose at the beginning of the sequence is killed by the
first or second set.
See Section 16.19.6 [Constant Attributes], page 415, for information on attributes that do
not depend on any particular insn.
For each defined attribute, a number of definitions are written to the ‘insn-attr.h’ file.
For cases where an explicit set of values is specified for an attribute, the following are
defined:
• A ‘#define’ is written for the symbol ‘HAVE_ATTR_name’.
• An enumerated class is defined for ‘attr_name’ with elements of the form ‘upper-
name_upper-value’ where the attribute name and value are first converted to upper-
case.
• A function ‘get_attr_name’ is defined that is passed an insn and returns the attribute
value for that insn.
For example, if the following is present in the ‘md’ file:
(define_attr "type" "branch,fp,load,store,arith" ...)
the following lines will be written to the file ‘insn-attr.h’.
#define HAVE_ATTR_type 1
enum attr_type {TYPE_BRANCH, TYPE_FP, TYPE_LOAD,
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 16.19.5 [Insn Lengths], page 414.
enabled The enabled attribute can be defined to prevent certain alternatives of an insn
definition from being used during code generation. See Section 16.8.6 [Disable
Insn Alternatives], page 353.
mnemonic The mnemonic attribute can be defined to implement instruction specific checks
in e.g. the pipeline description. See Section 16.19.7 [Mnemonic Attribute],
page 415.
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 428). 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
...
])
Chapter 16: Machine Descriptions 409
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).
(const_int i)
The integer i specifies the value of a numeric attribute. i must be non-negative.
The value of a numeric attribute can be specified either with a const_int, or
as an integer represented as a string in const_string, eq_attr (see below),
attr, symbol_ref, simple arithmetic expressions, and set_attr overrides on
specific instructions (see Section 16.19.3 [Tagging Insns], page 411).
(const_string value)
The string value specifies a constant attribute value. If value is specified as
‘"*"’, it means that the default value of the attribute is to be used for the
insn containing this expression. ‘"*"’ obviously cannot be used in the default
expression of a define_attr.
If the attribute whose value is being specified is numeric, value must be a string
containing a non-negative integer (normally const_int would be used in this
case). Otherwise, it must contain one of the valid values for the attribute.
(if_then_else test true-value false-value)
test specifies an attribute test, whose format is defined below. The value of this
expression is true-value if test is true, otherwise it is false-value.
(cond [test1 value1 ...] default)
The first operand of this expression is a vector containing an even number of
expressions and consisting of pairs of test and value expressions. The value
of the cond expression is that of the value corresponding to the first true test
expression. If none of the test expressions are true, the value of the cond
expression is that of the default expression.
(const_int i)
This test is true if i is nonzero and false otherwise.
410 GNU Compiler Collection (GCC) Internals
(not test)
(ior test1 test2)
(and test1 test2)
These tests are true if the indicated logical function is true.
(match_operand:m n pred constraints)
This test is true if operand n of the insn whose attribute value is being de-
termined has mode m (this part of the test is ignored if m is VOIDmode) and
the function specified by the string pred returns a nonzero value when passed
operand n and mode m (this part of the test is ignored if pred is the null string).
The constraints operand is ignored and should be the null string.
(match_test c-expr)
The test is true if C expression c-expr is true. In non-constant attributes, c-expr
has access to the following variables:
insn The rtl instruction under test.
which alternative
The define_insn alternative that insn matches. See Section 16.6
[Output Statement], page 312.
operands An array of insn’s rtl operands.
c-expr behaves like the condition in a C if statement, so there is no need to
explicitly convert the expression into a boolean 0 or 1 value. For example, the
following two tests are equivalent:
(match_test "x & 2")
(match_test "(x & 2) != 0")
value is a string that is either a valid value for attribute name, a comma-
separated list of values, or ‘!’ followed by a value or list. If value does not
begin with a ‘!’, this test is true if the value of the name attribute of the
current insn is in the list specified by value. If value begins with a ‘!’, this test
is true if the attribute’s value is not in the specified list.
For example,
(eq_attr "type" "load,store")
is equivalent to
(ior (eq_attr "type" "load") (eq_attr "type" "store"))
If name specifies an attribute of ‘alternative’, it refers to the value of the
compiler variable which_alternative (see Section 16.6 [Output Statement],
page 312) and the values must be small integers. For example,
(eq_attr "alternative" "2,3")
is equivalent to
(ior (eq (symbol_ref "which_alternative") (const_int 2))
(eq (symbol_ref "which_alternative") (const_int 3)))
Note that, for most attributes, an eq_attr test is simplified in cases where the
value of the attribute being tested is known for all insns matching a particular
pattern. This is by far the most common case.
(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.
define_peephole can have an optional last argument to specify the values of attributes for
matching insns. The value of any attribute not specified in a particular insn is set to the
default value for that attribute, as specified in its define_attr. Extensive use of default
values for attributes permits the specification of the values for only one or two attributes
in the definition of most insn patterns, as seen in the example in the next section.
The optional last argument of define_insn and define_peephole is a vector of ex-
pressions, each of which defines the value for a single attribute. The most general way of
assigning an attribute’s value is to use a set expression whose first operand is an attr
expression giving the name of the attribute being set. The second operand of the set is
an attribute expression (see Section 16.19.2 [Expressions], page 409) giving the value of the
attribute.
When the attribute value depends on the ‘alternative’ attribute (i.e., which is the
applicable alternative in the constraint of the insn), the set_attr_alternative expression
can be used. It allows the specification of a vector of attribute expressions, one for each
alternative.
When the generality of arbitrary attribute expressions is not required, the simpler set_
attr expression can be used, which allows specifying a string giving either a single attribute
value or a list of attribute values, one for each alternative.
The form of each of the above specifications is shown below. In each case, name is a
string specifying the attribute to be set.
(set_attr name value-string)
value-string is either a string giving the desired attribute value, or a string
containing a comma-separated list giving the values for succeeding alternatives.
The number of elements must match the number of alternatives in the constraint
of the insn pattern.
Note that it may be useful to specify ‘*’ for some alternative, in which case the
attribute will assume its default value for insns matching that alternative.
(set_attr_alternative name [value1 value2 ...])
Depending on the alternative of the insn, the value will be one of the specified
values. This is a shorthand for using a cond with tests on the ‘alternative’
attribute.
(set (attr name) value)
The first operand of this set must be the special RTL expression attr, whose
sole operand is a string giving the name of the attribute being set. value is the
value of the attribute.
The following shows three different ways of representing the same attribute value speci-
fication:
(set_attr "type" "load,store,arith")
(set_attr_alternative "type"
[(const_string "load") (const_string "store")
(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
414 GNU Compiler Collection (GCC) Internals
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.
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 mnemonic attribute is useful for dealing with instruction specific properties in the
pipeline description without defining additional insn attributes.
(define_attr "ooo_expanded" ""
(cond [(eq_attr "mnemonic" "dlr,dsgr,d,dsgf,stam,dsgfr,dlgr")
(const_int 1)]
(const_int 0)))
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
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 17.17
[Scheduling], page 533).
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
Chapter 16: Machine Descriptions 419
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 can not be the reserved name ‘nothing’.
420 GNU Compiler Collection (GCC) Internals
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.
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 can not 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 can not 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
Chapter 16: Machine Descriptions 421
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")
Or ‘slot2’ can not 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
422 GNU Compiler Collection (GCC) Internals
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")
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 8 and 4 cycles. The integer division is not pipelined, i.e. the subsequent integer
division insn can not 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")
(define_cond_exec
[(ne (match_operand:CC 0 "register_operand" "c")
(const_int 0))]
"test2"
"(%0)")
424 GNU Compiler Collection (GCC) Internals
This define_subst can be applied to any RTL pattern containing set of mode SI and
generates a copy with clobber when it is applied.
To mark the RTL template for define_subst application, subst-attributes are used.
They should be declared in advance:
(define_subst_attr "add_clobber_name" "add_clobber_subst" "_noclobber" "_clobber")
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}"
[...])
426 GNU Compiler Collection (GCC) Internals
the MD file, it is as if the corresponding value had been written instead. You may use
define_constants multiple times; each appearance adds more constants to the table. It
is an error to redefine a constant with a different value.
To come back to the a29k load multiple example, instead of
(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 179))
(clobber (reg:SI 179))])]
""
"loadm 0,0,%1,%2")
You could write:
(define_constants [
(R_BP 177)
(R_FC 178)
(R_CR 179)
(R_Q 180)
])
(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
...
valuen
])
This definition causes the equivalent of the following C code to appear in
‘insn-constants.h’:
enum name {
value0 = 0,
value1 = 1,
...
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:
428 GNU Compiler Collection (GCC) Internals
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
])
16.23 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.
Chapter 16: Machine Descriptions 429
(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")))]
""
"dsubu\t%0,%1,%2"
[(set_attr "type" "arith")
(set_attr "mode" "DI")])
Chapter 16: Machine Descriptions 431
(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;
})
(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;
432 GNU Compiler Collection (GCC) Internals
})
...
(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"
Chapter 16: Machine Descriptions 433
In addition to the file ‘machine.md’, a machine description includes a C header file conven-
tionally given the name ‘machine.h’ and a C source file named ‘machine.c’. The header file
defines numerous macros that convey the information about the target machine that does
not fit into the scheme of the ‘.md’ file. The file ‘tm.h’ should be a link to ‘machine.h’. The
header file ‘config.h’ includes ‘tm.h’ and most compiler source files include ‘config.h’.
The source file defines a variable targetm, which is a structure containing pointers to
functions and data relating to the target machine. ‘machine.c’ should also contain their
definitions, if they are not defined elsewhere in GCC, and other functions called through
the macros defined in the ‘.h’ file.
#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’; other-
wise 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 defini-
tion is used.
436 GNU Compiler Collection (GCC) Internals
DRIVER_SELF_SPECS [Macro]
A list of specs for the driver itself. It should be a suitable initializer for an array of
strings, with no surrounding braces.
The driver applies these specs to its own command line between loading default
‘specs’ files (but not command-line specified ones) and choosing the multilib directory
or running any subcommands. It applies them in the order given, so each spec can
depend on the options added by earlier ones. It is also possible to remove options
using ‘%<option’ in the usual way.
This macro can be useful when a port has several interdependent target options. It
provides a way of standardizing the command line so that the other specs are easier
to write.
Do not define this macro if it does not need to do anything.
OPTION_DEFAULT_SPECS [Macro]
A list of specs used to support configure-time default options (i.e. ‘--with’ options) in
the driver. It should be a suitable initializer for an array of structures, each containing
two strings, without the outermost pair of surrounding braces.
The first item in the pair is the name of the default. This must match the code in
‘config.gcc’ for the target. The second item is a spec to apply if a default with this
name was specified. The string ‘%(VALUE)’ in the spec will be replaced by the value
of the default everywhere it occurs.
The driver will apply these specs to its own command line between loading de-
fault ‘specs’ files and processing DRIVER_SELF_SPECS, using the same mechanism
as DRIVER_SELF_SPECS.
Do not define this macro if it does not need to do anything.
CPP_SPEC [Macro]
A C string constant that tells the GCC driver program options to pass to CPP. It
can also specify how to translate options you give to GCC into options for GCC to
pass to the CPP.
Do not define this macro if it does not need to do anything.
CPLUSPLUS_CPP_SPEC [Macro]
This macro is just like CPP_SPEC, but is used for C++, rather than C. If you do not
define this macro, then the value of CPP_SPEC (if any) will be used instead.
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.
Chapter 17: Target Description Macros and Functions 437
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.c’.
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.
438 GNU Compiler Collection (GCC) Internals
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.c’.
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.
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.
Chapter 17: Target Description Macros and Functions 439
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.
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.c’. Therefore, define this macro only if you need
440 GNU Compiler Collection (GCC) Internals
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 19.1 [Target Fragment], page 619.
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.
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.
Chapter 17: Target Description Macros and Functions 441
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 auto-
matically 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} \
}
2. The environment variable GCC_EXEC_PREFIX or, if GCC_EXEC_PREFIX is not set and the
compiler has not been installed in the configure-time prefix, the location in which the
compiler has actually been installed.
3. The directories specified by the environment variable COMPILER_PATH.
4. The macro STANDARD_EXEC_PREFIX, if the compiler has been installed in the configured-
time prefix.
5. The location ‘/usr/libexec/gcc/’, but only if this is a native compiler.
6. The location ‘/usr/lib/gcc/’, but only if this is a native compiler.
7. The macro MD_EXEC_PREFIX, if defined, but only if this is a native compiler.
Here is the order of prefixes tried for startfiles:
1. Any prefixes specified by the user with ‘-B’.
2. The environment variable GCC_EXEC_PREFIX or its automatically determined value
based on the installed toolchain location.
3. The directories specified by the environment variable LIBRARY_PATH (or port-specific
name; native only, cross compilers do not use this).
4. The macro STANDARD_EXEC_PREFIX, but only if the toolchain is installed in the config-
ured prefix or this is a native compiler.
5. The location ‘/usr/lib/gcc/’, but only if this is a native compiler.
6. The macro MD_EXEC_PREFIX, if defined, but only if this is a native compiler.
7. The macro MD_STARTFILE_PREFIX, if defined, but only if this is a native compiler, or
we have a target system root.
8. The macro MD_STARTFILE_PREFIX_1, if defined, but only if this is a native compiler,
or we have a target system root.
9. The macro STANDARD_STARTFILE_PREFIX, with any sysroot modifications. If this path
is relative it will be prefixed by GCC_EXEC_PREFIX and the machine suffix or STANDARD_
EXEC_PREFIX and the machine suffix.
10. The macro STANDARD_STARTFILE_PREFIX_1, but only if this is a native compiler, or
we have a target system root. The default for this macro is ‘/lib/’.
11. The macro STANDARD_STARTFILE_PREFIX_2, but only if this is a native compiler, or
we have a target system root. The default for this macro is ‘/usr/lib/’.
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.
bool TARGET_HANDLE_C_OPTION (size t code, const char *arg, int [C Target Hook]
value)
This target hook is called whenever the user specifies one of the target-specific C lan-
guage family options described by the ‘.opt’ definition files(see Chapter 8 [Options],
page 109). 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.
444 GNU Compiler Collection (GCC) Internals
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 17: Target Description Macros and Functions 445
If a target needs per-function specific data it should define the type struct machine_
function and also the macro INIT_EXPANDERS. This macro should be used to initialize the
function pointer init_machine_status. This pointer is explained below.
One typical use of per-function, target specific data is to create an RTX to hold the
register containing the function’s return address. This RTX can then be used to implement
the __builtin_return_address function, for level 0.
Note—earlier implementations of GCC used a single data area to hold all of the per-
function information. Thus when processing of a nested function began the old per-function
data had to be pushed onto a stack, and when the processing was finished, it had to be
popped off the stack. GCC used to provide function pointers called save_machine_status
and restore_machine_status to handle the saving and restoring of the target specific
information. Since the single data area approach is no longer used, these pointers are no
longer supported.
INIT_EXPANDERS [Macro]
Macro called to initialize any target specific information. This macro is called once
per function, before generation of any RTL has begun. The intention of this macro
is to allow the initialization of the function pointer init_machine_status.
BITS_BIG_ENDIAN [Macro]
Define this macro to have the value 1 if the most significant bit in a byte has the
lowest number; otherwise define it to have the value zero. This means that bit-
field instructions count from the most significant bit. If the machine has no bit-field
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.
Chapter 17: Target Description Macros and Functions 447
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.
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.
448 GNU Compiler Collection (GCC) Internals
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.
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
450 GNU Compiler Collection (GCC) Internals
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. 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 << 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.
DATA_ALIGNMENT (type, basic-align) [Macro]
If defined, a C expression to compute the alignment for a variable in the static store.
type is the data type, and basic-align is the alignment that the object would ordinarily
have. The value of this macro is used instead of that alignment to align the object.
If this macro is not defined, then basic-align is used.
One use of this macro is to increase alignment of medium-size data to make it all fit
in fewer cache lines. Another is to cause character arrays to be word-aligned so that
strcpy calls that copy constants to character arrays can be done inline.
DATA_ABI_ALIGNMENT (type, basic-align) [Macro]
Similar to DATA_ALIGNMENT, but for the cases where the ABI mandates some align-
ment increase, instead of optimization only purposes. E.g. AMD x86-64 psABI says
that variables with array type larger than 15 bytes must be aligned to 16 byte bound-
aries.
If this macro is not defined, then basic-align is used.
CONSTANT_ALIGNMENT (constant, basic-align) [Macro]
If defined, a C expression to compute the alignment given to a constant that is being
placed in memory. constant is the constant and basic-align is the alignment that
the object would ordinarily have. The value of this macro is used instead of that
alignment to align the object.
The default definition just returns basic-align.
The typical use of this macro is to increase alignment for string constants to be word
aligned so that strcpy calls that copy constants can be done inline.
Chapter 17: Target Description Macros and Functions 451
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.
452 GNU Compiler Collection (GCC) Internals
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.
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;
};
Chapter 17: Target Description Macros and Functions 453
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.
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.
454 GNU Compiler Collection (GCC) Internals
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 16.9 [Standard
Names], page 358).
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.
If both MS bit-fields and ‘__attribute__((packed))’ are used, the latter will take
precedence. If ‘__attribute__((packed))’ is used on a single field when MS bit-
fields are in use, it will take precedence for that field, but the alignment of the rest
of the structure may affect its placement.
specific features of C and related languages, rather than to fundamental aspects of storage
layout.
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.
Chapter 17: Target Description Macros and Functions 457
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.
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’.
bool TARGET_DEFAULT_SHORT_ENUMS (void) [Target Hook]
This target hook should return true if the compiler should give an enum type only
as many bytes as it takes to represent the range of possible values of that type. It
should return false if all enum types should be allocated like int.
The default is to return false.
458 GNU Compiler Collection (GCC) Internals
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.c’. 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.
Chapter 17: Target Description Macros and Functions 459
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.
460 GNU Compiler Collection (GCC) Internals
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.
Chapter 17: Target Description Macros and Functions 461
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.
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). This macro is optional. If not specified, it defaults to the value of
CALL_USED_REGISTERS.
462 GNU Compiler Collection (GCC) Internals
PC_REGNUM [Macro]
If the program counter has a register number, define this as that register number.
Otherwise, do not define it.
Chapter 17: Target Description Macros and Functions 463
REG_ALLOC_ORDER [Macro]
If defined, an initializer for a vector of integers, containing the numbers of hard
registers in the order in which GCC should prefer to use them (from most preferred
to least).
If this macro is not defined, registers are used lowest numbered first (all else being
equal).
One use of this macro is on machines where the highest numbered registers must
always be saved and the save-multiple-registers instruction supports only sequences of
consecutive registers. On such machines, define REG_ALLOC_ORDER to be an initializer
that lists the highest numbered allocable register first.
ADJUST_REG_ALLOC_ORDER [Macro]
A C statement (sans semicolon) to choose the order in which to allocate hard registers
for pseudo-registers local to a basic block.
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.
return zero, even if a register cannot hold the requested mode - indicate that with
HARD REGNO MODE OK and/or CANNOT CHANGE MODE CLASS instead.
On a machine where all registers are exactly one word, a suitable definition of this
macro is
#define HARD_REGNO_NREGS(REGNO, MODE) \
((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
/ UNITS_PER_WORD)
Since the same instruction used to move word_mode will work for all narrower integer
modes, it is not necessary on any machine for HARD_REGNO_MODE_OK to distinguish
between these modes, provided you define patterns ‘movhi’, etc., to take advantage
of this. This is useful because of the interaction between HARD_REGNO_MODE_OK and
MODES_TIEABLE_P; it is very desirable for all integer modes to be tieable.
Many machines have special registers for floating point arithmetic. Often people
assume that floating point machine modes are allowed only in floating point registers.
This is not true. Any registers that can hold integers can safely hold a floating point
machine mode, whether or not floating arithmetic can be done on it in those registers.
Integer move instructions can be used to move the values.
On some machines, though, the converse is true: fixed-point machine modes may
not go in floating registers. This is true if the floating registers normalize any value
stored in them, because storing a non-floating value there would garble it. In this case,
HARD_REGNO_MODE_OK should reject fixed-point machine modes in floating registers.
But if the floating registers do not automatically normalize, if you can store any bit
pattern in one and retrieve it unchanged without a trap, then any machine mode may
go in a floating register, so you can define this macro to say so.
The primary significance of special floating registers is rather that they are the reg-
isters acceptable in floating point arithmetic instructions. However, this is of no
concern to HARD_REGNO_MODE_OK. You handle it by writing the proper constraints for
those instructions.
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.
One common use of this macro is to prevent using of a register that is not saved by
a prologue in an interrupt handler.
The default version of this hook always returns true.
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.
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.
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.
class is cheaper than moving a register in the class to or from memory (see Section 17.16
[Costs], page 527).
You should define a class for the union of two classes whenever some instruction allows
both classes. For example, if an instruction allows either a floating point (coprocessor)
register or a general register for a certain operand, you should define a class FLOAT_OR_
GENERAL_REGS which includes both of them. Otherwise you will get suboptimal code, or
even internal compiler errors when reload cannot find a register in the class computed via
reg_class_subunion.
You must also specify certain redundant information about the register classes: for each
class, which classes contain it and which ones are contained in it; for each pair of classes,
the largest class contained in their union.
When a value occupying several consecutive registers is expected in a certain class, all
the registers used must belong to that class. Therefore, register classes cannot be used to
enforce a requirement for a register pair to start with an even-numbered register. The way
to specify this requirement is with HARD_REGNO_MODE_OK.
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.
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
Chapter 17: Target Description Macros and Functions 469
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.
MODE_BASE_REG_REG_CLASS (mode) [Macro]
A C expression whose value is the register class to which a valid base register must
belong in order to be used in a base plus index register address. You should define
this macro if base plus index addresses have different requirements than other base
register uses.
MODE_CODE_BASE_REG_CLASS (mode, address_space, outer_code, [Macro]
index_code)
A C expression whose value is the register class to which a valid base register for
a memory reference in mode mode to address space address space must belong.
outer code and index code define the context in which the base register occurs.
outer code is the code of the immediately enclosing expression (MEM for the top level of
an address, ADDRESS for something that occurs in an address_operand). index code
is the code of the corresponding index expression if outer code is PLUS; SCRATCH
otherwise.
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).
REGNO_OK_FOR_BASE_P (num) [Macro]
A C expression which is nonzero if register number num is suitable for use as a base
register in operand addresses.
REGNO_MODE_OK_FOR_BASE_P (num, mode) [Macro]
A C expression that is just like REGNO_OK_FOR_BASE_P, except that that expression
may examine the mode of the memory reference in mode. You should define this
macro if the mode of the memory reference affects whether a register may be used as
a base register. If you define this macro, the compiler will use it instead of REGNO_OK_
FOR_BASE_P. The mode may be VOIDmode for addresses that appear outside a MEM,
i.e., as an address_operand.
470 GNU Compiler Collection (GCC) Internals
Sometimes returning a more restrictive class makes better code. For example, on the
68000, when x is an integer constant that is in range for a ‘moveq’ instruction, the
value of this macro is always DATA_REGS as long as rclass includes the data registers.
Requiring a data register guarantees that a ‘moveq’ will be used.
One case where TARGET_PREFERRED_RELOAD_CLASS must not return rclass is if x is
a legitimate constant which cannot be loaded into some register class. By returning
NO_REGS you can force x into a memory location. For example, rs6000 can load
immediate values into general-purpose registers, but does not have an instruction
for loading an immediate value into a floating-point register, so TARGET_PREFERRED_
RELOAD_CLASS returns NO_REGS when x is a floating-point constant. If the constant
can’t be loaded into any kind of register, code generation will be better if TARGET_
LEGITIMATE_CONSTANT_P makes the constant illegitimate instead of using TARGET_
PREFERRED_RELOAD_CLASS.
If an insn has pseudos in it after register allocation, reload will go through the alter-
natives and call repeatedly TARGET_PREFERRED_RELOAD_CLASS to find the best one.
Returning 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).
PREFERRED_RELOAD_CLASS (x, class) [Macro]
A C expression that places additional restrictions on the register class to use when it
is necessary to copy value x into a register in class class. The value is a register class;
perhaps class, or perhaps another, smaller class. On many machines, the following
definition is safe:
#define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
Sometimes returning a more restrictive class makes better code. For example, on the
68000, when x is an integer constant that is in range for a ‘moveq’ instruction, the
value of this macro is always DATA_REGS as long as class includes the data registers.
Requiring a data register guarantees that a ‘moveq’ will be used.
One case where PREFERRED_RELOAD_CLASS must not return class is if x is a legitimate
constant which cannot be loaded into some register class. By returning NO_REGS
you can force x into a memory location. For example, rs6000 can load immediate
values into general-purpose registers, but does not have an instruction for loading an
immediate value into a floating-point register, so PREFERRED_RELOAD_CLASS returns
NO_REGS when x is a floating-point constant. If the constant cannot be loaded into any
kind of register, code generation will be better if TARGET_LEGITIMATE_CONSTANT_P
makes the constant illegitimate instead of using TARGET_PREFERRED_RELOAD_CLASS.
If an insn has pseudos in it after register allocation, reload will go through the alter-
natives and call repeatedly PREFERRED_RELOAD_CLASS to find the best one. Returning
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).
reg_class_t TARGET_PREFERRED_OUTPUT_RELOAD_CLASS (rtx x, [Target Hook]
reg class t rclass)
Like TARGET_PREFERRED_RELOAD_CLASS, but for output reloads instead of input
reloads.
472 GNU Compiler Collection (GCC) Internals
The default version of this hook always returns value of rclass argument.
You can also use TARGET_PREFERRED_OUTPUT_RELOAD_CLASS to discourage reload
from using some alternatives, like TARGET_PREFERRED_RELOAD_CLASS.
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 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.
of an N-word pseudo, and that the pseudo will eventually be allocated to N word_
mode hard registers. Failure to prevent this kind of mode change will result in the
entire raw_reg_mode being modified instead of the partial value that the middle-end
intended.
reg_class_t TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS (int, [Target Hook]
reg_class_t, reg_class_t)
A target hook which can change allocno class for given pseudo from allocno and best
class calculated by IRA.
The default version of this target hook always returns given class.
bool TARGET_LRA_P (void) [Target Hook]
A target hook which returns true if we use LRA instead of reload pass. The default
version of this target hook returns true. New ports should use LRA, and existing
ports are encouraged to convert.
int TARGET_REGISTER_PRIORITY (int) [Target Hook]
A target hook which returns the register priority number to which the register
hard regno belongs to. The bigger the number, the more preferable the hard register
usage (when all other conditions are the same). This hook can be used to prefer
some hard register over others in LRA. For example, some x86-64 register usage
needs additional prefix which makes instructions longer. The hook can return lower
priority number for such registers make them less favorable and as result making the
generated code smaller. The default version of this target hook returns always zero.
bool TARGET_REGISTER_USAGE_LEVELING_P (void) [Target Hook]
A target hook which returns true if we need register usage leveling. That means if a
few hard registers are equally good for the assignment, we choose the least used hard
register. The register usage leveling may be profitable for some targets. Don’t use
the usage leveling for targets with conditional execution or targets with big register
files as it hurts if-conversion and cross-jumping optimizations. The default version of
this target hook returns always false.
bool TARGET_DIFFERENT_ADDR_DISPLACEMENT_P (void) [Target Hook]
A target hook which returns true if an address with the same structure can have
different maximal legitimate displacement. For example, the displacement can depend
on memory mode or on operand combinations in the insn. The default version of this
target hook returns always false.
bool TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P (rtx subst) [Target Hook]
A target hook which returns true if subst can’t substitute safely pseudos with equiv-
alent memory values during register allocation. The default version of this target
hook returns false. On most machines, this default should be used. For generally
machines with non orthogonal register usage for addressing, such as SH, this hook
can be used to avoid excessive spilling.
bool TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT (rtx *disp, [Target Hook]
rtx *offset, machine mode mode)
A target hook which returns true if *disp is legitimezed to valid address displace-
ment with subtracting *offset at memory mode mode. The default version of this
Chapter 17: Target Description Macros and Functions 477
target hook returns false. This hook will benefit machines with limited base plus
displacement addressing.
STACK_GROWS_DOWNWARD [Macro]
Define this macro to be true if pushing a word onto the stack moves the stack pointer
to a smaller address, and false otherwise.
STACK_PUSH_CODE [Macro]
This macro defines the operation used when something is pushed on the stack. In
RTL, a push operation will be (set (mem (STACK_PUSH_CODE (reg sp))) ...)
The choices are PRE_DEC, POST_DEC, PRE_INC, and POST_INC. Which of these is
correct depends on the stack direction and on whether the stack pointer points to the
last item on the stack or whether it points to the space for the next item on the stack.
The default is PRE_DEC when STACK_GROWS_DOWNWARD is true, which is almost always
right, and PRE_INC otherwise, which is often wrong.
478 GNU Compiler Collection (GCC) Internals
FRAME_GROWS_DOWNWARD [Macro]
Define this macro to nonzero value if the addresses of local variable slots are at
negative offsets from the frame pointer.
ARGS_GROW_DOWNWARD [Macro]
Define this macro if successive arguments to a function occupy decreasing addresses
on the stack.
STARTING_FRAME_OFFSET [Macro]
Offset from the frame pointer to the first local variable slot to be allocated.
If FRAME_GROWS_DOWNWARD, find the next slot’s offset by subtracting the first slot’s
length from STARTING_FRAME_OFFSET. Otherwise, it is found by adding the length of
the first slot to the value STARTING_FRAME_OFFSET.
STACK_ALIGNMENT_NEEDED [Macro]
Define to zero to disable final alignment of the stack during reload. The nonzero
default for this macro is suitable for most ports.
On ports where STARTING_FRAME_OFFSET is nonzero or where there is a register save
block following the local block that doesn’t require alignment to STACK_BOUNDARY, it
may be beneficial to disable stack alignment and do it in the backend.
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.
Chapter 17: Target Description Macros and Functions 479
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.
INCOMING_FRAME_SP_OFFSET [Macro]
A C expression whose value is an integer giving the offset, in bytes, from the value
of the stack pointer register to the top of the stack frame at the beginning of any
function, before the prologue. The top of the frame is defined to be the value of the
stack pointer in the previous frame, just before the call instruction.
You only need to define this macro if you want to support call frame debugging
information like that provided by DWARF 2.
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.
482 GNU Compiler Collection (GCC) Internals
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.
If you want to support call frame exception handling, you must define either this
macro or the eh_return instruction pattern.
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.
484 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.
Chapter 17: Target Description Macros and Functions 485
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
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.
Chapter 17: Target Description Macros and Functions 487
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.
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 [Macro]
A C expression. If nonzero, push insns will be used to pass outgoing arguments. If
the target machine does not have a push instruction, set it to zero. That directs GCC
to use an alternate strategy: to allocate the entire argument block and then store the
arguments into it. When PUSH_ARGS is nonzero, PUSH_ROUNDING must be defined too.
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.
PUSH_ROUNDING (npushed) [Macro]
A C expression that is the number of bytes actually pushed onto the stack when an
instruction attempts to push npushed bytes.
On some machines, the definition
#define PUSH_ROUNDING(BYTES) (BYTES)
will suffice. But on other machines, instructions that appear to push one byte actually
push two bytes in an attempt to maintain alignment. Then the definition should be
#define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1)
If the value of this macro has a type, it should be an unsigned type.
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.
REG_PARM_STACK_SPACE (fndecl) [Macro]
Define this macro if functions should assume that stack space has been allocated for
arguments even when their values are passed in registers.
The value of this macro is the size, in bytes, of the area reserved for arguments passed
in registers for the function represented by fndecl, which can be zero if GCC is calling
a library function. The argument fndecl can be the FUNCTION DECL, or the type
itself of the function.
This space can be allocated by the caller, or be a part of the machine-dependent stack
frame: OUTGOING_REG_PARM_STACK_SPACE says which.
INCOMING_REG_PARM_STACK_SPACE (fndecl) [Macro]
Like REG_PARM_STACK_SPACE, but for incoming register arguments. Define this macro
if space guaranteed when compiling a function body is different to space required when
making a call, a situation that can arise with K&R style function definitions.
OUTGOING_REG_PARM_STACK_SPACE (fntype) [Macro]
Define this to a nonzero value if it is the responsibility of the caller to allocate the area
reserved for arguments passed in registers when calling a function of fntype. fntype
may be NULL if the function called is a library function.
If ACCUMULATE_OUTGOING_ARGS is defined, this macro controls whether the space for
these arguments counts in the value of crtl->outgoing_args_size.
490 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.
The arguments are ca, which summarizes all the previous arguments; mode, the
machine mode of the argument; type, the data type of the argument as a tree node or
0 if that is not known (which happens for C support library functions); and named,
which is true for an ordinary argument and false for nameless arguments that
correspond to ‘...’ in the called function’s prototype. type can be an incomplete
type if a syntax error has previously occurred.
The return value is usually either a reg RTX for the hard register in which to pass
the argument, or zero to pass the argument on the stack.
The return value can be a const_int which means argument is passed in a tar-
get specific slot with specified number. Target hooks should be used to store or
load argument in such case. See TARGET_STORE_BOUNDS_FOR_ARG and TARGET_LOAD_
BOUNDS_FOR_ARG for more information.
The value of the expression can also be a parallel RTX. This is used when an
argument is passed in multiple locations. The mode of the parallel should be the
mode of the entire argument. The parallel holds any number of expr_list pairs;
each one describes where part of the argument is passed. In each expr_list the
first operand must be a reg RTX for the hard register in which to pass this part
of the argument, and the mode of the register RTX indicates how large this part of
the argument is. The second operand of the expr_list is a const_int which gives
the offset in bytes into the entire argument of where this part starts. As a special
exception the first expr_list in the parallel RTX may have a first operand of zero.
This indicates that the entire argument is also stored on the stack.
The last time this hook is called, it is called with MODE == VOIDmode, and its result is
passed to the call or call_value pattern as operands 2 and 3 respectively.
The usual way to make the ISO library ‘stdarg.h’ work on a machine where some
arguments are usually passed in registers, is to cause nameless arguments to be passed
on the stack instead. This is done by making TARGET_FUNCTION_ARG return 0 when-
ever named is false.
string. libname is 0 when an ordinary C function call is being processed. Thus, each
time this macro is called, either libname or fntype is nonzero, but never both of them
at once.
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.
int TARGET_ENUM_VA_LIST_P (int idx, const char **pname, tree [Target Hook]
*ptree)
This target hook is used in function c_common_nodes_and_builtins to iterate
through the target specific builtin types for va list. The variable idx is used as
496 GNU Compiler Collection (GCC) Internals
iterator. pname has to be a pointer to a const char * and ptree a pointer to a tree
typed variable. The arguments pname and ptree are used to store the result of this
macro and are set to the name of the va list builtin type and its internal type. If
the return value of this macro is zero, then there is no more element. Otherwise the
IDX should be increased for the next call of this macro to iterate through all types.
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.
Note that “library function” in this context means a compiler support routine, used
to perform arithmetic, whose name is known specially by the compiler and was not
mentioned in the C code being compiled.
rtx TARGET_LIBCALL_VALUE (machine mode mode, const rtx fun) [Target Hook]
Define this hook if the back-end needs to know the name of the libcall function in
order to determine where the result should be returned.
The mode of the result is given by mode and the name of the called library function
is given by fun. The hook should return an RTX representing the place where the
library function result will be returned.
If this hook is not defined, then LIBCALL VALUE will be used.
APPLY_RESULT_SIZE [Macro]
Define this macro if ‘untyped_call’ and ‘untyped_return’ need more space than
is implied by FUNCTION_VALUE_REGNO_P for saving and restoring an arbitrary return
value.
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.
machine_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.
machine_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.
This implies the function prologue should save register r, provided it is not one of the
call-used registers. (TARGET_ASM_FUNCTION_EPILOGUE must likewise use regs_ever_
live.)
On machines that have “register windows”, the function entry code does not save
on the stack the registers that are in the windows, even if they are supposed to be
preserved by function calls; instead it takes appropriate steps to “push” the register
stack, if any non-call-used registers are used in the function.
On machines where functions may or may not have frame-pointers, the function entry
code must vary accordingly; it must set up the frame pointer if one is wanted, and not
otherwise. To determine whether a frame pointer is in wanted, the macro can refer
to the variable frame_pointer_needed. The variable’s value will be 1 at run time in
a function that needs a frame pointer. See Section 17.9.5 [Elimination], page 487.
The function entry code is responsible for allocating any stack space required for the
function. This stack space consists of the regions listed below. In most cases, these
regions are allocated in the order listed, with the last listed region closest to the top
of the stack (the lowest address if STACK_GROWS_DOWNWARD is defined, and the highest
address if it is not defined). You can use a different order for a machine if doing so is
more convenient or required for compatibility reasons. Except in cases where required
by standard or by a debugger, there is no reason why the stack layout used by GCC
need agree with that used by other compilers for a machine.
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 17.7.4 [Leaf Functions], page 466.
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 17.9.8 [Scalar Return], page 498.
• 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>.
• 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 Section 17.9.6 [Stack Arguments], page 488.
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.
504 GNU Compiler Collection (GCC) Internals
PROFILE_HOOK [Macro]
A C statement or compound statement to output to file some assembly code to call
the profiling subroutine mcount even the target does not support profiling.
NO_PROFILE_COUNTERS [Macro]
Define this macro to be an expression with a nonzero value if the mcount subroutine
on your system does not need a counter variable allocated for each function. This is
true for almost all modern implementations. If you define this macro, you must not
use the labelno argument to FUNCTION_PROFILER.
PROFILE_BEFORE_PROLOGUE [Macro]
Define this macro if the code for function profiling should come before the function
prologue. Normally, the profiling code comes after.
branch islands), but not including those modifiable by the callee. The affected reg-
isters may be mentioned explicitly in the call pattern, or included as clobbers in
CALL INSN FUNCTION USAGE. The default version of this hook is set to false.
The purpose of this hook is to enable the fipa-ra optimization.
__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.
The file ‘typeclass.h’ defines an enumeration that you can use to interpret the values
of __builtin_classify_type.
TRAMPOLINE_SECTION [Macro]
Return the section into which the trampoline template is to be placed (see
Section 17.18 [Sections], page 541). The default value is readonly_data_section.
TRAMPOLINE_SIZE [Macro]
A C expression for the size in bytes of the trampoline, as an integer.
TRAMPOLINE_ALIGNMENT [Macro]
Alignment required for trampolines, in bits.
If you don’t define this macro, the value of FUNCTION_ALIGNMENT is used for aligning
trampolines.
512 GNU Compiler Collection (GCC) Internals
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.
Chapter 17: Target Description Macros and Functions 513
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.
NEXT_OBJC_RUNTIME [Macro]
Set this macro to 1 to use the "NeXT" Objective-C message sending conventions
by default. This calling convention involves passing the object, the selector and the
method arguments all at once to the method-lookup library function. This is the usual
setting when targeting Darwin/Mac OS X systems, which have the NeXT runtime
installed.
If the macro is set to 0, the "GNU" Objective-C message sending convention will
be used by default. This convention passes just the object and the selector to the
method-lookup function, which returns a pointer to the method.
In either case, it remains possible to select code-generation for the alternate scheme,
by means of compiler command line switches.
Chapter 17: Target Description Macros and Functions 515
The non-strict variant is used in other passes. It must be defined to accept all pseudo-
registers in every context where some kind of register is required.
Normally, constant addresses which are the sum of a symbol_ref and an integer are
stored inside a const RTX to mark them as constant. Therefore, there is no need to
recognize such sums specifically as legitimate addresses. Normally you would simply
recognize any const as legitimate.
Usually PRINT_OPERAND_ADDRESS is not prepared to handle constant sums that are
not marked with const. It assumes that a naked plus indicates indexing. If so, then
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 17.20 [Assembler Format], page 547.
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.
FIND_BASE_TERM (x) [Macro]
A C expression to determine the base term of address x, or to provide a simplified
version of x from which ‘alias.c’ can easily find the base term. This macro is used
in only two places: find_base_value and find_base_term in ‘alias.c’.
It is always safe for this macro to not be defined. It exists so that alias analysis can
understand machine-dependent addresses.
The typical use of this macro is to handle addresses containing a label ref or sym-
bol ref within an UNSPEC.
rtx TARGET_LEGITIMIZE_ADDRESS (rtx x, rtx oldx, machine mode [Target Hook]
mode)
This hook is given an invalid memory address x for an operand of mode mode and
should try to return a valid memory address.
Chapter 17: Target Description Macros and Functions 517
x will always be the result of a call to break_out_memory_refs, and oldx will be the
operand that was given to that function to produce x.
The code of the hook should not alter the substructure of x. If it transforms x into
a more legitimate form, it should return the new x.
It is not necessary for this hook to come up with a legitimate address, with the
exception of native TLS addresses (see Section 17.25 [Emulated TLS], page 587). The
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.
basic block. If loop info is non-NULL, it identifies the loop being vectorized; otherwise
a single block is being vectorized.
bool TARGET_GOACC_FORK_JOIN (gcall *call, const int *dims, bool [Target Hook]
is_fork)
This hook can be used to convert IFN GOACC FORK and IFN GOACC JOIN func-
tion calls to target-specific gimple, or indicate whether they should be retained. It is
executed during the oacc device lower pass. It should return true, if the call should
be retained. It should return false, if it is to be deleted (either because target-specific
gimple has been inserted before it, or there is no need for it). The default hook returns
false, if there are no RTL expanders for them.
The hooks below describe the target properties that GCC needs to know in order to
make effective use of section anchors. It won’t use section anchors at all unless either
TARGET_MIN_ANCHOR_OFFSET or TARGET_MAX_ANCHOR_OFFSET is set to a nonzero value.
HOST_WIDE_INT TARGET_MIN_ANCHOR_OFFSET [Target Hook]
The minimum offset that should be applied to a section anchor. On most targets, it
should be the smallest offset that can be applied to a base register while still giving
a legitimate address for every mode. The default value is 0.
HOST_WIDE_INT TARGET_MAX_ANCHOR_OFFSET [Target Hook]
Like TARGET_MIN_ANCHOR_OFFSET, but the maximum (inclusive) offset that should be
applied to section anchors. The default value is 0.
void TARGET_ASM_OUTPUT_ANCHOR (rtx x) [Target Hook]
Write the assembly code to define section anchor x, which is a SYMBOL_REF for which
‘SYMBOL_REF_ANCHOR_P (x)’ is true. The hook is called with the assembly output
position set to the beginning of SYMBOL_REF_BLOCK (x).
If ASM_OUTPUT_DEF is available, the hook’s default definition uses it to define the sym-
bol as ‘. + SYMBOL_REF_BLOCK_OFFSET (x)’. If ASM_OUTPUT_DEF is not available, the
hook’s default definition is NULL, which disables the use of section anchors altogether.
bool TARGET_USE_ANCHORS_FOR_SYMBOL_P (const rtx x) [Target Hook]
Return true if GCC should attempt to use anchors to access SYMBOL_REF x. You can
assume ‘SYMBOL_REF_HAS_BLOCK_INFO_P (x)’ and ‘!SYMBOL_REF_ANCHOR_P (x)’.
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.
register. If the condition code or comparison result can be placed in any general register,
or if there are multiple condition registers, use a pseudo register. Registers used to store
the condition code value will usually have a mode that is in class MODE_CC.
Alternatively, you can use BImode if the comparison operator is specified already in the
compare instruction. In this case, you are not interested in most macros in this section.
CC_STATUS_MDEP [Macro]
C code for a data type which is used for declaring the mdep component of cc_status.
It defaults to int.
This macro is not used on machines that do not use cc0.
CC_STATUS_MDEP_INIT [Macro]
A C expression to initialize the mdep field to “empty”. The default definition does
nothing, since most machines don’t use the field anyway. If you want to use the field,
you should probably define this macro to initialize it.
This macro is not used on machines that do not use cc0.
is not sufficient to indicate what the insns actually do. What NOTICE_UPDATE_CC
should do when it sees one is just to run CC_STATUS_INIT.
A possible definition of NOTICE_UPDATE_CC is to call a function that looks at an
attribute (see Section 16.19 [Insn Attributes], page 407) named, for example, ‘cc’.
This avoids having detailed information about patterns in two places, the ‘md’ file
and in NOTICE_UPDATE_CC.
together with a SELECT_CC_MODE that returns CCNZmode for comparisons whose argu-
ment is a plus:
#define SELECT_CC_MODE(OP,X,Y) \
(GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
? ((OP == LT || OP == LE || OP == GT || OP == GE) \
? CCFPEmode : CCFPmode) \
: ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS \
|| GET_CODE (X) == NEG || GET_CODE (x) == ASHIFT) \
? CCNZmode : CCmode))
Another reason to use modes is to retain information on which operands were used
by the comparison; see REVERSIBLE_CC_MODE later in this section.
You should define this macro if and only if you define extra CC modes in
‘machine-modes.def’.
526 GNU Compiler Collection (GCC) Internals
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, reg class t [Target Hook]
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.
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.
BRANCH_COST (speed_p, predictable_p) [Macro]
A C expression for the cost of a branch instruction. A value of 1 is the default; other
values are interpreted relative to that. Parameter speed p is true when the branch
Chapter 17: Target Description Macros and Functions 529
store or move insns. Alternate strategies are to expand the movmem or setmem optabs,
to emit a library call, or to emit unit-by-unit, loop-based operations.
This target hook should return true if, for a memory operation with a given size and
alignment, using the by_pieces infrastructure is expected to result in better code
generation. Both size and alignment are measured in terms of storage units.
The parameter op is one of: CLEAR_BY_PIECES, MOVE_BY_PIECES, SET_BY_PIECES,
STORE_BY_PIECES or COMPARE_BY_PIECES. These describe the type of memory oper-
ation under consideration.
The parameter speed p is true if the code is currently being optimized for speed
rather than size.
Returning true for higher values of size can improve code generation for speed if the
target does not provide an implementation of the movmem or setmem standard names,
if the movmem or setmem implementation would be more expensive than a sequence
of insns, or if the overhead of a library call would dominate that of the body of the
memory operation.
Returning true for higher values of size may also cause an increase in code size, for
example where the number of insns emitted to perform a move would be greater than
that of a library call.
int TARGET_COMPARE_BY_PIECES_BRANCH_RATIO (machine mode [Target Hook]
mode)
When expanding a block comparison in MODE, gcc can try to reduce the number
of branches at the expense of more memory operations. This hook allows the target
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.
CLEAR_RATIO (speed) [Macro]
The threshold of number of scalar move insns, below which a sequence of insns should
be generated to clear memory instead of a string clear insn or a library call. Increasing
the value will always make code faster, but eventually incurs high cost in increased
code size.
The parameter speed is true if the code is currently being optimized for speed rather
than size.
Chapter 17: Target Description Macros and Functions 531
register. On machines where the cost of the addressing mode containing the sum is
no higher than that of a simple indirect reference, this will produce an additional
instruction and possibly require an additional register. Proper specification of this
macro eliminates this overhead for such machines.
This hook is never called with an invalid address.
On machines where an address involving more than one register is as cheap as an
address computation involving only one register, defining TARGET_ADDRESS_COST to
reflect this can cause two registers to be live over a region of code where only one
would have been if TARGET_ADDRESS_COST were not defined in that manner. This
effect should be considered in the definition of this macro. Equivalent costs should
probably only be given to addresses with different numbers of registers on machines
with lots of registers.
unsigned int TARGET_MAX_NOCE_IFCVT_SEQ_COST (edge e) [Target Hook]
This hook returns a value in the same units as TARGET_RTX_COSTS, giving the max-
imum acceptable cost for a sequence generated by the RTL if-conversion pass when
conditional execution is not available. The RTL if-conversion pass attempts to con-
vert conditional operations that would require a branch to a series of unconditional
operations and movmodecc insns. This hook returns the maximum cost of the uncon-
ditional instructions and the movmodecc insns. RTL if-conversion is cancelled if the
cost of the converted sequence is greater than the value returned by this hook.
e is the edge between the basic block containing the conditional branch to the basic
block which would be executed if the condition were true.
The default implementation of this hook uses the max-rtl-if-conversion-
[un]predictable parameters if they are set, and uses a multiple of BRANCH_COST
otherwise.
bool TARGET_NOCE_CONVERSION_PROFITABLE_P (rtx insn *seq, [Target Hook]
struct noce if info *if_info)
This hook returns true if the instruction sequence seq is a good candidate as a
replacement for the if-convertible sequence described in if_info.
bool TARGET_NO_SPECULATION_IN_DELAY_SLOTS_P (void) [Target Hook]
This predicate controls the use of the eager delay slot filler to disallow speculatively
executed instructions being placed in delay slots. Targets such as certain MIPS archi-
tectures possess both branches with and without delay slots. As the eager delay slot
filler can decrease performance, disabling it is beneficial when ordinary branches are
available. Use of delay slot branches filled using the basic filler is often still desirable
as the delay slot can hide a pipeline bubble.
can define itself the possibility of issue an insn on the same cycle, the value can serve
as an additional constraint to issue insns on the same simulated processor cycle (see
hooks ‘TARGET_SCHED_REORDER’ and ‘TARGET_SCHED_REORDER2’). This value must be
constant over the entire compilation. If you need it to vary depending on what the
instructions are, you must use ‘TARGET_SCHED_VARIABLE_ISSUE’.
int TARGET_SCHED_VARIABLE_ISSUE (FILE *file, int verbose, [Target Hook]
rtx insn *insn, int more)
This hook is executed by the scheduler after it has scheduled an insn from the ready
list. It should return the number of insns which can still be issued in the current cycle.
The default is ‘more - 1’ for insns other than CLOBBER and USE, which normally are
not counted against the issue rate. You should define this hook if some insns take
more machine resources than others, so that fewer insns can follow them in the same
cycle. file is either a null pointer, or a stdio stream to write any debug output to.
verbose is the verbose level provided by ‘-fsched-verbose-n’. insn is the instruction
that was scheduled.
int TARGET_SCHED_ADJUST_COST (rtx insn *insn, int dep_type1, [Target Hook]
rtx insn *dep_insn, int cost, unsigned int dw)
This function corrects the value of cost based on the relationship between insn and
dep insn through a dependence of type dep type, and strength dw. It should return
the new value. The default is to make no adjustment to cost. This can be used for
example to specify to the scheduler using the traditional pipeline description that an
output- or anti-dependence does not incur the same cost as a data-dependence. If the
scheduler using the automaton based pipeline description, the cost of anti-dependence
is zero and the cost of output-dependence is maximum of one and the difference of
latency times of the first and the second insns. If these values are not acceptable,
you could use the hook to modify them too. See also see Section 16.19.9 [Processor
pipeline description], page 417.
int TARGET_SCHED_ADJUST_PRIORITY (rtx insn *insn, int [Target Hook]
priority)
This hook adjusts the integer scheduling priority priority of insn. It should return
the new priority. Increase the priority to execute insn earlier, reduce the priority to
execute insn later. Do not define this hook if you do not need to adjust the scheduling
priorities of insns.
int TARGET_SCHED_REORDER (FILE *file, int verbose, rtx insn [Target Hook]
**ready, int *n_readyp, int clock)
This hook is executed by the scheduler after it has scheduled the ready list, to allow
the machine description to reorder it (for example to combine two small instructions
together on ‘VLIW’ machines). file is either a null pointer, or a stdio stream to write
any debug output to. verbose is the verbose level provided by ‘-fsched-verbose-n’.
ready is a pointer to the ready list of instructions that are ready to be scheduled.
n readyp is a pointer to the number of elements in the ready list. The scheduler
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’.
Chapter 17: Target Description Macros and Functions 535
int TARGET_SCHED_REORDER2 (FILE *file, int verbose, rtx insn [Target Hook]
**ready, int *n_readyp, int clock)
Like ‘TARGET_SCHED_REORDER’, but called at a different time. That function is called
whenever the scheduler starts a new cycle. This one is called once per iteration over
a cycle, immediately after ‘TARGET_SCHED_VARIABLE_ISSUE’; it can reorder the ready
list and return the number of insns to be scheduled in the same cycle. Defining this
hook can be useful if there are frequent situations where scheduling one insn causes
other insns to become ready in the same cycle. These other insns can then be taken
into account properly.
bool TARGET_SCHED_MACRO_FUSION_P (void) [Target Hook]
This hook is used to check whether target platform supports macro fusion.
bool TARGET_SCHED_MACRO_FUSION_PAIR_P (rtx insn *prev, [Target Hook]
rtx insn *curr)
This hook is used to check whether two insns should be macro fused for a target
microarchitecture. If this hook returns true for the given insn pair (prev and curr),
the scheduler will put them into a sched group, and they will not be scheduled apart.
The two insns will be either two SET insns or a compare and a conditional jump and
this hook should validate any dependencies needed to fuse the two insns together.
void TARGET_SCHED_DEPENDENCIES_EVALUATION_HOOK (rtx insn [Target Hook]
*head, rtx insn *tail)
This hook is called after evaluation forward dependencies of insns in chain given by
two parameter values (head and tail correspondingly) but before insns scheduling of
the insn chain. For example, it can be used for better insn classification if it requires
analysis of dependencies. This hook can use backward and forward dependencies of
the insn scheduler because they are already calculated.
void TARGET_SCHED_INIT (FILE *file, int verbose, int [Target Hook]
max_ready)
This hook is executed by the scheduler at the beginning of each block of instructions
that are to be scheduled. file is either a null pointer, or a stdio stream to write
any debug output to. verbose is the verbose level provided by ‘-fsched-verbose-n’.
max ready is the maximum number of insns in the current scheduling region that can
be live at the same time. This can be used to allocate scratch space if it is needed,
e.g. by ‘TARGET_SCHED_REORDER’.
void TARGET_SCHED_FINISH (FILE *file, int verbose) [Target Hook]
This hook is executed by the scheduler at the end of each block of instructions that
are to be scheduled. It can be used to perform cleanup of any actions done by the
other scheduling hooks. file is either a null pointer, or a stdio stream to write any
debug output to. verbose is the verbose level provided by ‘-fsched-verbose-n’.
void TARGET_SCHED_INIT_GLOBAL (FILE *file, int verbose, int [Target Hook]
old_max_uid)
This hook is executed by the scheduler after function level initializations. file is either
a null pointer, or a stdio stream to write any debug output to. verbose is the verbose
level provided by ‘-fsched-verbose-n’. old max uid is the maximum insn uid when
scheduling begins.
536 GNU Compiler Collection (GCC) Internals
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.
for debugging output. last clock and clock are, respectively, the processor cycle on
which the previous insn has been issued, and the current processor cycle.
speculative pattern. The hook should return 1, if the instruction has a speculative
form, or −1, if it doesn’t. request describes the type of requested speculation. If the
return value equals 1 then new pat is assigned the generated speculative pattern.
bool TARGET_SCHED_NEEDS_BLOCK_P (unsigned int dep_status) [Target Hook]
This hook is called by the insn scheduler during generation of recovery code for insn. It
should return true, if the corresponding check instruction should branch to recovery
code, or false otherwise.
rtx TARGET_SCHED_GEN_SPEC_CHECK (rtx insn *insn, rtx insn [Target Hook]
*label, unsigned int ds)
This hook is called by the insn scheduler to generate a pattern for recovery check
instruction. If mutate p is zero, then insn is a speculative instruction for which the
check should be generated. label is either a label of a basic block, where recovery
code should be emitted, or a null pointer, when requested check doesn’t branch to
recovery code (a simple check). If mutate p is nonzero, then a pattern for a branchy
check corresponding to a simple check denoted by insn should be generated. In this
case label can’t be null.
void TARGET_SCHED_SET_SCHED_FLAGS (struct spec info def [Target Hook]
*spec_info)
This hook is used by the insn scheduler to find out what features should be en-
abled/used. The structure *spec info should be filled in by the target. The structure
describes speculation types that can be used in the scheduler.
bool TARGET_SCHED_CAN_SPECULATE_INSN (rtx insn *insn) [Target Hook]
Some instructions should never be speculated by the schedulers, usually because the
instruction is too expensive to get this wrong. Often such instructions have long
latency, and often they are not fully modeled in the pipeline descriptions. This hook
should return false if insn should not be speculated.
int TARGET_SCHED_SMS_RES_MII (struct ddg *g) [Target Hook]
This hook is called by the swing modulo scheduler to calculate a resource-based lower
bound which is based on the resources available in the machine and the resources
required by each instruction. The target backend can use g to calculate such bound.
A very simple lower bound will be used in case this hook is not implemented: the
total number of instructions divided by the issue rate.
bool TARGET_SCHED_DISPATCH (rtx insn *insn, int x) [Target Hook]
This hook is called by Haifa Scheduler. It returns true if dispatch scheduling is
supported in hardware and the condition specified in the parameter is true.
void TARGET_SCHED_DISPATCH_DO (rtx insn *insn, int x) [Target Hook]
This hook is called by Haifa Scheduler. It performs the operation specified in its
second parameter.
bool TARGET_SCHED_EXPOSED_PIPELINE [Target Hook]
True if the processor has an exposed pipeline, which means that not just the order
of instructions is important for correctness when scheduling, but also the latencies of
operations.
540 GNU Compiler Collection (GCC) Internals
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.
542 GNU Compiler Collection (GCC) Internals
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’.
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.
Chapter 17: Target Description Macros and Functions 543
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.
CRT_CALL_STATIC_FUNCTION (section_op, function) [Macro]
If defined, an ASM statement that switches to a different section via section op, calls
function, and switches back to the text section. This is used in ‘crtstuff.c’ if INIT_
SECTION_ASM_OP or FINI_SECTION_ASM_OP to calls to initialization and finalization
functions from the init and fini sections. By default, this macro uses a simple function
call. Some ports need hand-crafted assembly code to avoid dependencies on registers
initialized in the function prologue or to ensure that constant pools don’t end up too
far way in the text section.
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.
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.
void TARGET_ASM_INIT_SECTIONS (void) [Target Hook]
Define this hook if you need to do something special to set up the ‘varasm.c’ sections,
or if your target has some special sections of its own that you need to create.
544 GNU Compiler Collection (GCC) Internals
GCC calls this hook after processing the command line, but before writing any as-
sembly code, and before calling any of the section-returning hooks described below.
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.
SWITCH_TYPE_PASSED
text is a command line switch that has been set by the user.
SWITCH_TYPE_ENABLED
text is an option which has been enabled. This might be as a direct
result of a command line switch, or because it is enabled by default or
because it has been enabled as a side effect of a different command line
switch. For example, the ‘-O2’ switch enables various different individual
optimization passes.
SWITCH_TYPE_DESCRIPTIVE
text is either NULL or some descriptive text which should be ignored.
If text is NULL then it is being used to warn the target hook
that either recording is starting or ending. The first time type is
SWITCH TYPE DESCRIPTIVE and text is NULL, the warning is for
start up and the second time the warning is for wind down. This feature
is to allow the target hook to make any necessary preparations before it
starts to record switches and to perform any necessary tidying up after
it has finished recording switches.
SWITCH_TYPE_LINE_START
This option can be ignored by this target hook.
SWITCH_TYPE_LINE_END
This option can be ignored by this target hook.
The hook’s return value must be zero. Other return values may be supported in the
future.
By default this hook is set to NULL, but an example implementation is provided for
ELF based targets. Called elf record gcc switches, it records the switches as ASCII
text inside a new, string mergeable section in the assembler output file. The name
of the new section is provided by the TARGET_ASM_RECORD_GCC_SWITCHES_SECTION
target hook.
const char * TARGET_ASM_RECORD_GCC_SWITCHES_SECTION [Target Hook]
This is the name of the section that will be created by the example ELF implemen-
tation of the TARGET_ASM_RECORD_GCC_SWITCHES target hook.
ALIGNED_HI_OP one creates an aligned two-byte object, and so on. Any of the hooks
may be NULL, indicating that no suitable directive is available.
The compiler will print these strings at the start of a new line, followed immediately by
the object’s initial value. In most cases, the string should contain a tab, a pseudo-op,
and then another tab.
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, it can be obtained via fundecl. size is the size, in
bytes, of the constant pool that will be written immediately after this call.
If no constant-pool prefix is required, the usual case, this macro need not be defined.
These macros are provided by ‘real.h’ for writing the definitions of ASM_OUTPUT_DOUBLE
and the like:
name) to output the name itself; before and after that, output the additional assem-
bler syntax for defining the name, and a newline. A default definition of this macro
is provided which is correct for most systems.
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.
NO_DOLLAR_IN_LABEL [Macro]
Define this macro if the assembler does not accept the character ‘$’ in label names.
By default constructors and destructors in G++ have ‘$’ in the identifiers. If this
macro is defined, ‘.’ is used instead.
556 GNU Compiler Collection (GCC) Internals
NO_DOT_IN_LABEL [Macro]
Define this macro if the assembler does not accept the character ‘.’ in label names.
By default constructors and destructors in G++ have names that use ‘.’. If this macro
is defined, these names are rewritten to avoid ‘.’.
TYPE_ASM_OP [Macro]
A C string containing the appropriate assembler directive to specify the type of
a symbol, without any arguments. On systems that use ELF, the default (in
‘config/elfos.h’) is ‘"\t.type\t"’; on other systems, the default is not to define
this macro.
Define this macro only if it is correct to use the default definition of ASM_OUTPUT_
TYPE_DIRECTIVE for your system. If you need your own custom definition of this
macro, or if you do not need explicit symbol types at all, do not define this macro.
TYPE_OPERAND_FMT [Macro]
A C string which specifies (using printf syntax) the format of the second operand
to TYPE_ASM_OP. On systems that use ELF, the default (in ‘config/elfos.h’) is
‘"@%s"’; on other systems, the default is not to define this macro.
Define this macro only if it is correct to use the default definition of ASM_OUTPUT_
TYPE_DIRECTIVE for your system. If you need your own custom definition of this
macro, or if you do not need explicit symbol types at all, do not define this macro.
size of an array when controlled by an initializer. This is used on systems where it’s
necessary to declare something about the size of the object.
If you don’t define this macro, that is equivalent to defining it to do nothing.
You may wish to use ASM_OUTPUT_SIZE_DIRECTIVE and/or ASM_OUTPUT_MEASURED_
SIZE in the definition of this macro.
void TARGET_ASM_GLOBALIZE_LABEL (FILE *stream, const char [Target Hook]
*name)
This target hook is a function to output to the stdio stream stream some commands
that will make the label name global; that is, available for reference from other files.
The default implementation relies on a proper definition of GLOBAL_ASM_OP.
void TARGET_ASM_GLOBALIZE_DECL_NAME (FILE *stream, tree [Target Hook]
decl)
This target hook is a function to output to the stdio stream stream some commands
that will make the name associated with decl global; that is, available for reference
from other files.
The default implementation uses the TARGET ASM GLOBALIZE LABEL target
hook.
void TARGET_ASM_ASSEMBLE_UNDEFINED_DECL (FILE *stream, [Target Hook]
const char *name, const tree decl)
This target hook is a function to output to the stdio stream stream some commands
that will declare the name associated with decl which is not defined in the current
translation unit. Most assemblers do not require anything to be output in this case.
ASM_WEAKEN_LABEL (stream, name) [Macro]
A C statement (sans semicolon) to output to the stdio stream stream some commands
that will make the label name weak; that is, available for reference from other files
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.
Chapter 17: Target Description Macros and Functions 559
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’; oth-
erwise, 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’.
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.c’ 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.
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.
This macro need not be defined if it does not need to output anything. The GNU
assembler and most Unix assemblers don’t require anything.
void TARGET_ASM_EXTERNAL_LIBCALL (rtx symref) [Target Hook]
This target hook is a function to output to asm out file an assembler pseudo-op to
declare a library function name external. The name of the library function is given
by symref, which is a symbol_ref.
void TARGET_ASM_MARK_DECL_PRESERVED (const char *symbol) [Target Hook]
This target hook is a function to output to asm out file an assembler directive to
annotate symbol as used. The Darwin target uses the .no dead code strip directive.
ASM_OUTPUT_LABELREF (stream, name) [Macro]
A C statement (sans semicolon) to output to the stdio stream stream a reference in
assembler syntax to a label named name. This should add ‘_’ to the front of the
name, if that is customary on your operating system, as it is in most Berkeley Unix
systems. This macro is used in assemble_name.
tree TARGET_MANGLE_ASSEMBLER_NAME (const char *name) [Target Hook]
Given a symbol name, perform same mangling as varasm.c’s assemble_name, but
in memory rather than to a file stream, returning result as an IDENTIFIER_NODE.
Required for correct LTO symtabs. The default implementation calls the TARGET_
STRIP_NAME_ENCODING hook and then prepends the USER_LABEL_PREFIX, if any.
ASM_OUTPUT_SYMBOL_REF (stream, sym) [Macro]
A C statement (sans semicolon) to output a reference to SYMBOL_REF sym. If not
defined, assemble_name will be used to output the name of the symbol. This macro
may be used to modify the way a symbol is referenced depending on information
encoded by TARGET_ENCODE_SECTION_INFO.
ASM_OUTPUT_LABEL_REF (stream, buf) [Macro]
A C statement (sans semicolon) to output a reference to buf, the result of ASM_
GENERATE_INTERNAL_LABEL. If not defined, assemble_name will be used to output
the name of the symbol. This macro is not used by output_asm_label, or the %l
specifier that calls it; the intention is that this macro should be set when it is necessary
to output a label differently when its address is being taken.
void TARGET_ASM_INTERNAL_LABEL (FILE *stream, const char [Target Hook]
*prefix, unsigned long labelno)
A function to output to the stdio stream stream a label whose name is made from
the string prefix and the number labelno.
It is absolutely essential that these labels be distinct from the labels used for user-level
functions and variables. Otherwise, certain programs will have name conflicts with
internal labels.
It is desirable to exclude internal labels from the symbol table of the object file. Most
assemblers have a naming convention for labels that should be excluded; on many
systems, the letter ‘L’ at the beginning of a label has this effect. You should find out
what convention your system uses, and follow it.
The default version of this function utilizes ASM_GENERATE_INTERNAL_LABEL.
Chapter 17: Target Description Macros and Functions 561
There are two major ways that GCC currently supports the execution of initialization
and termination functions. Each way has two variants. Much of the structure is common
to all four variations.
The linker must build two lists of these functions—a list of initialization functions, called
__CTOR_LIST__, and a list of termination functions, called __DTOR_LIST__.
Each list always begins with an ignored function pointer (which may hold 0, −1, or a
count of the function pointers after it, depending on the environment). This is followed
by a series of zero or more function pointers to constructors (or destructors), followed by a
function pointer containing zero.
Depending on the operating system and its executable file format, either ‘crtstuff.c’
or ‘libgcc2.c’ traverses these lists at startup time and exit time. Constructors are called
in reverse order of the list; destructors in forward order.
The best way to handle static constructors works only for object file formats which provide
arbitrarily-named sections. A section is set aside for a list of constructors, and another for
a list of destructors. Traditionally these are called ‘.ctors’ and ‘.dtors’. Each object file
that defines an initialization function also puts a word in the constructor section to point to
that function. The linker accumulates all these words into one contiguous ‘.ctors’ section.
Termination functions are handled similarly.
This method will be chosen as the default by ‘target-def.h’ if TARGET_ASM_NAMED_
SECTION is defined. A target that does not support arbitrary sections, but does support
special designated constructor and destructor sections may define CTORS_SECTION_ASM_OP
and DTORS_SECTION_ASM_OP to achieve the same effect.
When arbitrary sections are available, there are two variants, depending upon how the
code in ‘crtstuff.c’ is called. On systems that support a .init section which is executed
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
564 GNU Compiler Collection (GCC) Internals
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 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.
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.
void TARGET_ASM_CONSTRUCTOR (rtx symbol, int priority) [Target Hook]
If defined, a function that outputs assembler code to arrange to call the function
referenced by symbol at initialization time.
Assume that symbol is a SYMBOL_REF for a function taking no arguments and with
no return value. If the target supports initialization priorities, priority is a value
between 0 and MAX_INIT_PRIORITY; otherwise it must be DEFAULT_INIT_PRIORITY.
If this macro is not defined by the target, a suitable default will be chosen if (1) the
target supports arbitrary section names, (2) the target defines CTORS_SECTION_ASM_
OP, or (3) USE_COLLECT2 is not defined.
void TARGET_ASM_DESTRUCTOR (rtx symbol, int priority) [Target Hook]
This is like TARGET_ASM_CONSTRUCTOR but used for termination functions rather than
initialization functions.
If TARGET_HAVE_CTORS_DTORS is true, the initialization routine generated for the gener-
ated object file will have static linkage.
If your system uses collect2 as the means of processing constructors, then that program
normally uses nm to scan an object file for constructor functions to be called.
On certain kinds of systems, you can define this macro to make collect2 work faster
(and, in some cases, make it work at all):
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.
566 GNU Compiler Collection (GCC) Internals
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.
PARSE_LDD_OUTPUT (ptr) [Macro]
Define this macro to be C code that extracts filenames from the output of the program
denoted by LDD_SUFFIX. ptr is a variable of type char * that points to the beginning
of a line of output from LDD_SUFFIX. If the line lists a dynamic dependency, the code
must advance ptr to the beginning of the filename on that line. Otherwise, it must
set ptr to NULL.
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.
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.
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.
Chapter 17: Target Description Macros and Functions 569
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.c’). 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 16.5 [Output Template], page 311) 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
collection and sections cannot be marked as not to be collected.
572 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 17: Target Description Macros and Functions 573
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 17.21.5 [SDB and
DWARF], page 579. Only applicable if the target supports DWARF 2 frame unwind
information.
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.
ASM_STABD_OP [Macro]
A C string constant, including spacing, naming the assembler pseudo op to use instead
of "\t.stabd\t" to define a debugging symbol whose value is the current location. If
you don’t define this macro, "\t.stabd\t" is used. This macro applies only to DBX
debugging information format.
ASM_STABN_OP [Macro]
A C string constant, including spacing, naming the assembler pseudo op to use instead
of "\t.stabn\t" to define a debugging symbol with no name. If you don’t define this
macro, "\t.stabn\t" is used. This macro applies only to DBX debugging information
format.
DBX_NO_XREFS [Macro]
Define this macro if DBX on your system does not support the construct ‘xstagname’.
On some systems, this construct is used to describe a forward reference to a structure
named tagname. On other systems, this construct is not supported at all.
DBX_CONTIN_LENGTH [Macro]
A symbol name in DBX-format debugging information is normally continued (split
into two separate .stabs directives) when it exceeds a certain length (by default,
80 characters). On some operating systems, DBX requires this splitting; on others,
splitting must not be done. You can inhibit splitting by defining this macro with the
value zero. You can override the default splitting-length by defining this macro as an
expression for the length you desire.
DBX_CONTIN_CHAR [Macro]
Normally continuation is indicated by adding a ‘\’ character to the end of a .stabs
string when a continuation follows. To use a different character instead, define this
macro as a character constant for the character you want to use. Do not define this
macro if backslash is correct for your system.
DBX_STATIC_STAB_DATA_SECTION [Macro]
Define this macro if it is necessary to go to the data section before outputting the
‘.stabs’ pseudo-op for a non-global static variable.
DBX_TYPE_DECL_STABS_CODE [Macro]
The value to use in the “code” field of the .stabs directive for a typedef. The default
is N_LSYM.
DBX_STATIC_CONST_VAR_CODE [Macro]
The value to use in the “code” field of the .stabs directive for a static variable located
in the text section. DBX format does not provide any “right” way to do this. The
default is N_FUN.
DBX_REGPARM_STABS_CODE [Macro]
The value to use in the “code” field of the .stabs directive for a parameter passed
in registers. DBX format does not provide any “right” way to do this. The default is
N_RSYM.
578 GNU Compiler Collection (GCC) Internals
DBX_REGPARM_STABS_LETTER [Macro]
The letter to use in DBX symbol data to identify a symbol as a parameter passed in
registers. DBX format does not customarily provide any way to do this. The default
is ’P’.
DBX_FUNCTION_FIRST [Macro]
Define this macro if the DBX information for a function and its arguments should
precede the assembler code for the function. Normally, in DBX format, the debugging
information entirely follows the assembler code.
DBX_BLOCKS_FUNCTION_RELATIVE [Macro]
Define this macro, with value 1, if the value of a symbol describing the scope of a
block (N_LBRAC or N_RBRAC) should be relative to the start of the enclosing function.
Normally, GCC uses an absolute address.
DBX_LINES_FUNCTION_RELATIVE [Macro]
Define this macro, with value 1, if the value of a symbol indicating the current line
number (N_SLINE) should be relative to the start of the enclosing function. Normally,
GCC uses an absolute address.
DBX_USE_BINCL [Macro]
Define this macro if GCC should generate N_BINCL and N_EINCL stabs for included
header files, as on Sun systems. This macro also directs GCC to output a type number
as a pair of a file number and a type number within the file. Normally, GCC does
not generate N_BINCL or N_EINCL stabs, and it outputs a single number for a type
number.
NO_DBX_FUNCTION_END [Macro]
Some stabs encapsulation formats (in particular ECOFF), cannot handle the .stabs
"",N_FUN,,0,0,Lscope-function-1 gdb dbx extension construct. On those ma-
chines, define this macro to turn this feature off without disturbing the rest of the
gdb extensions.
NO_DBX_BNSYM_ENSYM [Macro]
Some assemblers cannot handle the .stabd BNSYM/ENSYM,0,0 gdb dbx extension con-
struct. On those machines, define this macro to turn this feature off without disturb-
ing the rest of the gdb extensions.
Chapter 17: Target Description Macros and Functions 579
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 17.20.9 [Exception Region
Output], page 571) returns UI_DWARF2, and exceptions are enabled, GCC will output
this information not matter how you define DWARF2_FRAME_INFO.
enum unwind_info_type TARGET_DEBUG_UNWIND_INFO (void) [Target Hook]
This hook defines the mechanism that will be used for describing frame unwind in-
formation to the debugger. Normally the hook will return UI_DWARF2 if DWARF 2
debug information is enabled, and return UI_NONE otherwise.
A target may return UI_DWARF2 even when DWARF 2 debug information is disabled
in order to always output DWARF 2 frame information.
A target may return UI_TARGET if it has ABI specified unwind tables. This will
suppress generation of the normal debug frame unwind information.
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.
bool TARGET_WANT_DEBUG_PUB_SECTIONS [Target Hook]
True if the .debug_pubtypes and .debug_pubnames sections should be emitted.
These sections are not used on most platforms, and in particular GDB does not
use them.
bool TARGET_DELAY_SCHED2 [Target Hook]
True if sched2 is not to be run at its normal place. This usually means it will be run
as part of machine-specific reorg.
bool TARGET_DELAY_VARTRACK [Target Hook]
True if vartrack is not to be run at its normal place. This usually means it will be
run as part of machine-specific reorg.
bool TARGET_NO_REGISTER_ALLOCATION [Target Hook]
True if register allocation and the passes following it should not be run. Usually true
only for virtual assembler targets.
ASM_OUTPUT_DWARF_DELTA (stream, size, label1, label2) [Macro]
A C statement to issue assembly directives that create a difference lab1 minus lab2,
using an integer of the given size.
ASM_OUTPUT_DWARF_VMS_DELTA (stream, size, label1, label2) [Macro]
A C statement to issue assembly directives that create a difference between the two
given labels in system defined units, e.g. instruction slots on IA64 VMS, using an
integer of the given size.
Chapter 17: Target Description Macros and Functions 581
PUT_SDB_... [Macro]
Define these macros to override the assembler syntax for the special SDB assembler
directives. See ‘sdbout.c’ for a list of these macros and their arguments. If the
standard syntax is used, you need not define them yourself.
SDB_DELIM [Macro]
Some assemblers do not support a semicolon as a delimiter, even between SDB as-
sembler directives. In that case, define this macro to be the delimiter to use (usually
‘\n’). It is not necessary to define a new set of PUT_SDB_op macros if this is the only
change required.
SDB_ALLOW_UNKNOWN_REFERENCES [Macro]
Define this macro to allow references to unknown structure, union, or enumeration
tags to be emitted. Standard COFF does not allow handling of unknown references,
MIPS ECOFF has support for it.
SDB_ALLOW_FORWARD_REFERENCES [Macro]
Define this macro to allow references to structure, union, or enumeration tags that
have not yet been seen to be handled. Some assemblers choke if forward tags are
used, while some require it.
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 might need to be set
for this entity. The position of the initializer in the initializer—starting counting
at zero—determines the integer that is used to refer to the mode-switched entity in
question. In macros that take mode arguments / yield a mode result, modes are
represented as numbers 0 . . . N − 1. N is used to specify that no mode switch is
needed / supplied.
void TARGET_MODE_EMIT (int entity, int mode, int prev_mode, [Target Hook]
HARD REG SET regs_live)
Generate one or more insns to set entity to mode. hard reg live is the set of hard
registers live at the point where the insn(s) are to be inserted. prev moxde indicates
the mode to switch from. Sets of a lower numbered entity will be emitted before sets
of a higher numbered entity to a mode of the same or lower priority.
TARGET_DECLSPEC [Macro]
Define this macro to a nonzero value if you want to treat __declspec(X) as equivalent
to __attribute((X)). By default, this behavior is enabled only for targets that define
TARGET_DLLIMPORT_DECL_ATTRIBUTES. The current implementation of __declspec
is via a built-in macro, but you should not rely on this implementation detail.
Don’t use this hook to turn on various extra optimizations for ‘-O’. That is what
TARGET_OPTION_OPTIMIZATION is for.
If you need to do something whenever the optimization level is changed via the opti-
mize attribute or pragma, see TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
d = cp0count + 3;
const char * TARGET_PCH_VALID_P (const void *data, size t sz) [Target Hook]
This hook checks whether the options used to create a PCH file are compatible with
the current settings. It returns NULL if so and a suitable error message if not. Error
messages will be presented to the user and must be localized using ‘_(msg)’.
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.
default version of this hook returns true for the modes returned by either the TARGET_
ADDR_SPACE_POINTER_MODE or TARGET_ADDR_SPACE_ADDRESS_MODE target hooks for
the given address space.
bool TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P [Target Hook]
(machine mode mode, rtx exp, bool strict, addr space t as)
Define this to return true if exp is a valid address for mode mode in the named address
space as. The strict parameter says whether strict addressing is in effect after reload
has finished. This target hook is the same as the TARGET_LEGITIMATE_ADDRESS_P
target hook, except that it includes explicit named address space support.
rtx TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS (rtx x, rtx oldx, [Target Hook]
machine mode mode, addr space t as)
Define this to modify an invalid address x to be a valid address with mode mode in the
named address space as. This target hook is the same as the TARGET_LEGITIMIZE_
ADDRESS target hook, except that it includes explicit named address space support.
bool TARGET_ADDR_SPACE_SUBSET_P (addr space t subset, [Target Hook]
addr space t superset)
Define this to return whether the subset named address space is contained within the
superset named address space. Pointers to a named address space that is a subset
of another named address space will be converted automatically without a cast if
used together in arithmetic operations. Pointers to a superset address space can be
converted to pointers to a subset address space via explicit casts.
bool TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID (addr space t [Target Hook]
as)
Define this to modify the default handling of address 0 for the address space. Return
true if 0 should be considered a valid address.
rtx TARGET_ADDR_SPACE_CONVERT (rtx op, tree from_type, tree [Target Hook]
to_type)
Define this to convert the pointer expression represented by the RTL op with type
from type that points to a named address space to a new pointer expression with type
to type that points to a different named address space. When this hook it called, it is
guaranteed that one of the two address spaces is a subset of the other, as determined
by the TARGET_ADDR_SPACE_SUBSET_P target hook.
int TARGET_ADDR_SPACE_DEBUG (addr space t as) [Target Hook]
Define this to define how the address space is encoded in dwarf. The result is the
value to be used with DW_AT_address_class.
void TARGET_ADDR_SPACE_DIAGNOSE_USAGE (addr space t as, [Target Hook]
location t loc)
Define this hook if the availability of an address space depends on command line
options and some diagnostics should be printed when the address space is used. This
hook is called during parsing and allows to emit a better diagnostic compared to the
case where the address space was not registered with c_register_addr_space. as is
the address space as registered with c_register_addr_space. loc is the location of
the address space qualifier token. The default implementation does nothing.
Chapter 17: Target Description Macros and Functions 593
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.
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. Most RISC machines have this
property and most CISC machines do not.
On such architectures, defining this hook to 32 tells the compiler to try using 32-
bit arithmetical operations setting the condition codes instead of doing full 64-bit
arithmetic.
More generally, define this hook on RISC architectures if you want the compiler to
try using arithmetical operations setting the condition codes with a precision lower
than the word precision.
You need not define this hook if WORD_REGISTER_OPERATIONS is not defined to 1.
SHORT_IMMEDIATES_SIGN_EXTEND [Macro]
Define this macro to 1 if loading short immediate values into registers sign extends.
MOVE_MAX [Macro]
The maximum number of bytes that a single instruction can move quickly between
memory and registers or between two memory locations.
MAX_MOVE_MAX [Macro]
The maximum number of bytes that a single instruction can move quickly between
memory and registers or between two memory locations. If this is undefined, the
default is MOVE_MAX. Otherwise, it is the constant value that is the largest value that
MOVE_MAX can have at run-time.
Chapter 17: Target Description Macros and Functions 595
SHIFT_COUNT_TRUNCATED [Macro]
A C expression that is nonzero if on this machine the number of bits actually used
for the count of a shift operation is equal to the number of bits needed to represent
the size of the object being shifted. When this macro is nonzero, the compiler will
assume that it is safe to omit a sign-extend, zero-extend, and certain bitwise ‘and’
instructions that truncates the count of a shift operation. On machines that have
instructions that act on bit-fields at variable positions, which may include ‘bit test’
instructions, a nonzero SHIFT_COUNT_TRUNCATED also enables deletion of truncations
of the values that serve as arguments to bit-field instructions.
If both types of instructions truncate the count (for shifts) and position (for bit-field
operations), or if no variable-position bit-field instructions exist, you should define
this macro.
However, on some machines, such as the 80386 and the 680x0, truncation only applies
to shift operations and not the (real or pretended) bit-field operations. Define SHIFT_
COUNT_TRUNCATED to be zero on such machines. Instead, add patterns to the ‘md’ file
that include the implied truncation of the shift instructions.
You need not define this macro if it would always have the value of zero.
STORE_FLAG_VALUE [Macro]
A C expression describing the value returned by a comparison operator with an inte-
gral mode and stored by a store-flag instruction (‘cstoremode4’) when the condition
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.
Chapter 17: Target Description Macros and Functions 597
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
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.
applies also to the corresponding optab entry (which is normally the case if it expands
directly into the corresponding RTL), then the macro should evaluate to 2. In the
cases where the value is defined, value should be set to this value.
If this macro is not defined, the value of clz or ctz at zero is assumed to be undefined.
This macro must be defined if the target’s expansion for ffs relies on a particular
value to get correct results. Otherwise it is not necessary, though it may be used to
optimize some corner cases, and to provide a default expansion for the ffs optab.
Note that regardless of this macro the “definedness” of clz and ctz at zero do not
extend to the builtin functions visible to the user. Thus one may be free to adjust
the value at will to match the target expansion of these operations without fear of
breaking the API.
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.
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.
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.
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.
It may modify the outputs, inputs, and constraints as necessary for other
pre-processing. In this case the return value is a sequence of insns to emit after the
asm.
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.
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
if the machine does not use cc0, and 1 if it does use cc0.
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.
602 GNU Compiler Collection (GCC) Internals
int TARGET_CHKP_INITIALIZE_BOUNDS (tree var, tree lb, tree ub, [Target Hook]
tree *stmts)
Generate a list of statements stmts to initialize pointer bounds variable var with
bounds lb and ub. Return the number of generated statements.
tree TARGET_FOLD_BUILTIN (tree fndecl, int n_args, tree *argp, [Target Hook]
bool ignore)
Fold a call to a machine specific built-in function that was set up by
‘TARGET_INIT_BUILTINS’. fndecl is the declaration of the built-in function. n args
is the number of arguments passed to the function; the arguments themselves
are pointed to by argp. The result is another tree, valid for both GIMPLE and
GENERIC, containing a simplified expression for the call’s result. If ignore is true
the value will be ignored.
Chapter 17: Target Description Macros and Functions 605
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.
need saving are saved. after prologue epilogue gen indicates if prologues and epi-
logues have already been generated. Note, even if you only return true when af-
ter prologue epilogue gen is false, you still are likely to have to make special provi-
sions in INITIAL_ELIMINATION_OFFSET to reserve space for caller-saved target regis-
ters.
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 17: Target Description Macros and Functions 609
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 format
overrides for the ‘-Wformat’ option. The default is to have no target-specific format
overrides. If defined, TARGET_FORMAT_TYPES 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.
TARGET_SUPPORTS_WIDE_INT [Macro]
On older ports, large integers are stored in CONST_DOUBLE rtl objects. Newer ports
define TARGET_SUPPORTS_WIDE_INT to be nonzero to indicate that large integers are
stored in CONST_WIDE_INT rtl objects. The CONST_WIDE_INT allows very large integer
constants to be represented. CONST_DOUBLE is limited to twice the size of the host’s
HOST_WIDE_INT representation.
Converting a port mostly requires looking for the places where CONST_DOUBLEs are
used with VOIDmode and replacing that code with code that accesses CONST_WIDE_
INTs. ‘"grep -i const_double"’ at the port level gets you to 95% of the changes
that need to be made. There are a few places that require a deeper look.
• There is no equivalent to hval and lval for CONST_WIDE_INTs. This would
be difficult to express in the md language since there are a variable number of
elements.
Most ports only check that hval is either 0 or -1 to see if the value is small. As
mentioned above, this will no longer be necessary since small constants are always
CONST_INT. Of course there are still a few exceptions, the alpha’s constraint used
by the zap instruction certainly requires careful examination by C code. However,
all the current code does is pass the hval and lval to C code, so evolving the c
code to look at the CONST_WIDE_INT is not really a large change.
• Because there is no standard template that ports use to materialize constants,
there is likely to be some futzing that is unique to each port in this code.
• The rtx costs may have to be adjusted to properly account for larger constants
that are represented as CONST_WIDE_INT.
All and all it does not take long to convert ports that the maintainer is familiar with.
Chapter 17: Target Description Macros and Functions 613
18 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 64.
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.
Chapter 19: Makefile Fragments 619
19 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
[System Config], page 64.
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 19: Makefile Fragments 621
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.
20 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.
Chapter 21: Standard Header File Directories 625
cache
When the cache option is applied to a global variable gt clear 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.
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,
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
Chapter 22: Memory Management and Type Information 631
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
hence it should be treated by the GC and PCH machinery as an “atomic”
block of memory that does not need to be examined when scanning memory for
pointers. In particular, the machinery will not scan that memory for pointers
to mark them as reachable (when marking pointers for GC) or to relocate them
(when writing a PCH file).
The atomic option differs from the skip option. atomic keeps the memory
under Garbage Collection, but makes the GC ignore the contents of the mem-
ory. skip is more drastic in that it causes the pointer and the memory to be
completely ignored by the Garbage Collector. So, memory marked as atomic
is automatically freed when no longer reachable, while memory marked as skip
is not.
The atomic option must be used with great care, because all sorts of problem
can occur if used incorrectly, that is, if the memory the pointer points to does
actually contain a pointer.
Here is an example of how to use it:
struct GTY(()) my_struct {
int number_of_elements;
unsigned int * GTY ((atomic)) elements;
};
In this case, elements is a pointer under GC, and the memory it points to needs
to be allocated using the Garbage Collector, and will be freed automatically by
the Garbage Collector when it is no longer referenced. But the memory that
the pointer points to is an array of unsigned int elements, and the GC must
not try to scan it to find pointers to mark or relocate, which is why it is marked
with the atomic option.
Note that, currently, global variables can not be marked with atomic; only
fields of a struct can. This is a known limitation. It would be useful to be
able to mark global pointers with atomic to make the PCH machinery aware
of them so that they are saved and restored correctly to PCH files.
special ("name")
The special option is used to mark types that have to be dealt with by
special case machinery. The parameter is the name of the special case. See
‘gengtype.c’ for further details. Avoid adding new special cases unless there
is no other alternative.
user
632 GNU Compiler Collection (GCC) Internals
The user option indicates that the code to mark structure fields is completely
handled by user-provided routines. See section Section 22.3 [User GC], page 632
for details on what functions need to be provided.
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).
Chapter 22: Memory Management and Type Information 633
garbage collection, and two functions to act as marker and pointer walker for pre-compiled
headers.
Given a structure struct GTY((user)) my_struct, the following functions should be
defined to mark my_struct:
void gt_ggc_mx (my_struct *p)
{
/* This marks field ’fld’. */
gt_ggc_mx (p->fld);
}
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), cookie);
}
template<typename T>
void gt_pch_nx (TP<T> *tp, gt_pointer_operator, void *cookie)
{
extern void gt_pch_nx (T *, gt_pointer_operator, void *);
/* 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).
b. For files shared by all front ends, add the filename to the GTFILES variable in
‘Makefile.in’.
c. For files that are part of one front end, add the filename to the gtfiles variable
defined in the appropriate ‘config-lang.in’. Headers should appear before non-
headers in this list.
d. For files that are part of some but not all front ends, add the filename to the
gtfiles variable of all the front ends that use it.
2. If the file was a header file, you’ll need to check that it’s included in the right place to be
visible to the generated files. For a back-end header file, this should be done automati-
cally. For a front-end header file, it needs to be included by the same file that includes
‘gtype-lang.h’. For other header files, it needs to be included in ‘gtype-desc.c’,
which is a generated file, so add it to ifiles in open_base_file in ‘gengtype.c’.
For source files that aren’t header files, the machinery will generate a header file
that should be included in the source file you just changed. The file will be called
‘gt-path.h’ where path is the pathname relative to the ‘gcc’ directory with slashes
replaced by -, so for example the header file to be included in ‘cp/parser.c’ is called
‘gt-cp-parser.c’. The generated header file should be included after everything else
in the source file. Don’t forget to mention this file as a dependency in the ‘Makefile’!
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.
23 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.
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.
640 GNU Compiler Collection (GCC) Internals
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. */
};
...
...
Chapter 23: Plugins 641
...
}
/* Attribute definition */
static struct attribute_spec user_attr =
{ "user", 1, 1, false, false, false, handle_user_attribute, false };
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)
plugin.so: $(PLUGIN_SOURCE_FILES)
$(HOST_GCC) -shared $(CXXFLAGS) $^ -o $@
A single source file plugin may be built with g++ -I‘gcc -print-file-
name=plugin‘/include -fPIC -shared -fno-rtti -O2 plugin.c -o plugin.so, using
backquote shell syntax to query the ‘plugin’ directory.
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.
Chapter 24: Link Time Optimization 645
perform on the function body, and, for inlined functions, a pointer to the function that it
will be inlined into.
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.
variables that are called or referenced by other compilation units (such as from a dynamically
linked library). We say that such functions and variables are externally visible.
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 spec-
ify the visibility of externally visible symbols (or alternatively an ‘-fdefault-visibility’
command line option). ELF defines the default, protected, hidden and internal visi-
bilities.
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.
652 GNU Compiler Collection (GCC) Internals
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’.
Without the linker plugin GCC also assumes that symbols are declared hidden and not
referred by non-LTO code by default.
thus providing n-ary overloads for operation or function. The additional arguments are a
gimple seq where built statements are inserted on (if NULL then simplifications requiring new
statements are not performed) and a valueization hook that can be used to tie simplifications
to a SSA lattice.
In addition to those APIs fold_stmt is overloaded with a valueization hook:
tree gimple_build (gimple seq *, location t, enum tree code, [GIMPLE function]
tree, tree, tree (*valueize) (tree) = NULL);
tree gimple_build (gimple seq *, location t, enum tree code, [GIMPLE function]
tree, tree, tree, tree (*valueize) (tree) = NULL);
tree gimple_build (gimple seq *, location t, enum tree code, [GIMPLE function]
tree, tree, tree, tree, tree (*valueize) (tree) = NULL);
654 GNU Compiler Collection (GCC) Internals
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
(simplify
(pointer_plus (addr@2 @0) INTEGER_CST_P@1)
(if (is_gimple_min_invariant (@2)))
{
HOST_WIDE_INT off;
656 GNU Compiler Collection (GCC) Internals
(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.
Funding Free Software 659
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.
664 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.
666 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 667
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.
668 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 669
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.
670 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 671
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.
672 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 673
You should have received a copy of the GNU General Public License
along with this program. If not, see http://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 http://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
http://www.gnu.org/philosophy/why-not-lgpl.html.
GNU Free Documentation License 675
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 677
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,
678 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 679
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.
680 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 law@redhat.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 tests weekly snapshots of GCC trunk against Fedora Rawhide for
several architectures.
• 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.
684 GNU Compiler Collection (GCC) Internals
Initial implementations of cpplib, fix-header, config.guess, libio, and past C++ library
(libg++) maintainer. Dreaming up, designing and implementing much of GCJ.
• Devon Bowen helped port GCC to the Tahoe.
• Don Bowman for mips-vxworks contributions.
• James Bowman for the FT32 port.
• Dave Brolley for work on cpplib and Chill.
• Paul Brook for work on the ARM architecture and maintaining GNU Fortran.
• Robert Brown implemented the support for Encore 32000 systems.
• Christian Bruel for improvements to local store elimination.
• Herman A.J. ten Brugge for various fixes.
• Joerg Brunsmann for Java compiler hacking and help with the GCJ FAQ.
• Joe Buck for his direction via the steering committee from its creation to 2013.
• Craig Burley for leadership of the G77 Fortran effort.
• Tobias Burnus for contributions to GNU Fortran.
• Stephan Buys for contributing Doxygen notes for libstdc++.
• Paolo Carlini for libstdc++ work: lots of efficiency improvements to the C++ strings,
streambufs and formatted I/O, hard detective work on the frustrating localization
issues, and keeping up with the problem reports.
• John Carr for his alias work, SPARC hacking, infrastructure improvements, previous
contributions to the steering committee, loop optimizations, etc.
• Stephane Carrez for 68HC11 and 68HC12 ports.
• Steve Chamberlain for support for the Renesas SH and H8 processors and the PicoJava
processor, and for GCJ config fixes.
• Glenn Chambers for help with the GCJ FAQ.
• John-Marc Chandonia for various libgcj patches.
• Denis Chertykov for contributing and maintaining the AVR port, the first GCC port
for an 8-bit architecture.
• Kito Cheng for his work on the RISC-V port, including bringing up the test suite and
maintenance.
• Scott Christley for his Objective-C contributions.
• Eric Christopher for his Java porting help and clean-ups.
• Branko Cibej for more warning contributions.
• The GNU Classpath project for all of their merged runtime code.
• Nick Clifton for arm, mcore, fr30, v850, m32r, msp430 rx work, ‘--help’, and other
random hacking.
• Michael Cook for libstdc++ cleanup patches to reduce warnings.
• R. Kelley Cook for making GCC buildable from a read-only directory as well as other
miscellaneous build process and documentation clean-ups.
• Ralf Corsepius for SH testing and minor bug fixing.
• François-Xavier Coudert for contributions to GNU Fortran.
Contributors to GCC 685
• Stan Cox for care and feeding of the x86 port and lots of behind the scenes hacking.
• Alex Crain provided changes for the 3b1.
• Ian Dall for major improvements to the NS32k port.
• Paul Dale for his work to add uClinux platform support to the m68k backend.
• Palmer Dabbelt for his work maintaining the RISC-V port.
• Dario Dariol contributed the four varieties of sample programs that print a copy of
their source.
• Russell Davidson for fstream and stringstream fixes in libstdc++.
• Bud Davis for work on the G77 and GNU Fortran compilers.
• Mo DeJong for GCJ and libgcj bug fixes.
• Jerry DeLisle for contributions to GNU Fortran.
• DJ Delorie for the DJGPP port, build and libiberty maintenance, various bug fixes,
and the M32C, MeP, MSP430, and RL78 ports.
• Arnaud Desitter for helping to debug GNU Fortran.
• Gabriel Dos Reis for contributions to G++, contributions and maintenance of GCC
diagnostics infrastructure, libstdc++-v3, including valarray<>, complex<>, maintain-
ing the numerics library (including that pesky <limits> :-) and keeping up-to-date
anything to do with numbers.
• Ulrich Drepper for his work on glibc, testing of GCC using glibc, ISO C99 support,
CFG dumping support, etc., plus support of the C++ runtime libraries including for all
kinds of C interface issues, contributing and maintaining complex<>, sanity checking
and disbursement, configuration architecture, libio maintenance, and early math work.
• François Dumont for his work on libstdc++-v3, especially maintaining and improving
debug-mode and associative and unordered containers.
• Zdenek Dvorak for a new loop unroller and various fixes.
• Michael Eager for his work on the Xilinx MicroBlaze port.
• Richard Earnshaw for his ongoing work with the ARM.
• David Edelsohn for his direction via the steering committee, ongoing work with the
RS6000/PowerPC port, help cleaning up Haifa loop changes, doing the entire AIX
port of libstdc++ with his bare hands, and for ensuring GCC properly keeps working
on AIX.
• Kevin Ediger for the floating point formatting of num put::do put in libstdc++.
• Phil Edwards for libstdc++ work including configuration hackery, documentation main-
tainer, chief breaker of the web pages, the occasional iostream bug fix, and work on
shared library symbol versioning.
• Paul Eggert for random hacking all over GCC.
• Mark Elbrecht for various DJGPP improvements, and for libstdc++ configuration sup-
port for locales and fstream-related fixes.
• Vadim Egorov for libstdc++ fixes in strings, streambufs, and iostreams.
• Christian Ehrhardt for dealing with bug reports.
• Ben Elliston for his work to move the Objective-C runtime into its own subdirectory
and for his work on autoconf.
686 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
688 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.
• 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.
• Martin von Löwis for internal consistency checking infrastructure, various C++ improve-
ments including namespace support, and tons of assistance with libstdc++/compiler
merges.
Contributors to GCC 689
• 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, and design and implementation of the automaton based in-
struction scheduler.
• Bob Manson for his behind the scenes work on dejagnu.
• 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.c 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.
• 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.
690 GNU Compiler Collection (GCC) Internals
• 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.
• 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.
• Hartmut Penner for work on the s390 port.
• Paul Petersen wrote the machine description for the Alliant FX/8.
• Alexandre Petit-Bianco for implementing much of the Java compiler and continued
Java maintainership.
• Matthias Pfaller for major improvements to the NS32k port.
• Gerald Pfeifer for his direction via the steering committee, pointing out lots of problems
we need to solve, maintenance of the web pages, and taking care of documentation
maintenance in general.
• Andrew Pinski for processing bug reports by the dozen.
• Ovidiu Predescu for his work on the Objective-C front end and runtime libraries.
• Jerry Quinn for major performance improvements in C++ formatted I/O.
• Ken Raeburn for various improvements to checker, MIPS ports and various cleanups
in the compiler.
Contributors to GCC 691
• 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.
• Jayant Sonar for contributing the CR16 port.
• Brad Spencer for contributions to the GLIBCPP FORCE NEW technique.
• Richard Stallman, for writing the original GCC and launching the GNU project.
• Jan Stein of the Chalmers Computer Society provided support for Genix, as well as
part of the 32000 machine description.
• Nigel Stephens for various mips16 related fixes/improvements.
• Jonathan Stone wrote the machine description for the Pyramid computer.
• Graham Stott for various infrastructure improvements.
• John Stracke for his Java HTTP protocol fixes.
• Mike Stump for his Elxsi port, G++ contributions over the years and more recently his
vxworks contributions
• Jeff Sturm for Java porting help, bug fixes, and encouragement.
• Shigeya Suzuki for this fixes for the bsdi platforms.
• Ian Lance Taylor for the Go frontend, the initial mips16 and mips64 support, general
configury hacking, fixincludes, etc.
• Holger Teutsch provided the support for the Clipper CPU.
• Gary Thomas for his ongoing work to make the PPC work for GNU/Linux.
• Paul Thomas for contributions to GNU Fortran.
• Philipp Thomas for random bug fixes throughout the compiler
Contributors to GCC 693
• 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).
• Xiaoqiang Zhang for work on GNU Fortran.
• Gilles Zunino for help porting Java to Irix.
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
Contributors to GCC 695
• 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
• 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.
696 GNU Compiler Collection (GCC) Internals
• 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.
• Bastiaan Huisman for TimeZone bug fixing.
• Andreas Jaeger for mprec updates.
• Paul Jenner for better ‘-Werror’ support.
• Ito Kazumitsu for NetworkInterface implementation and updates.
• Roman Kennke for BoxLayout, GrayFilter and SplitPane, plus bug fixes all over.
Lots of Free Swing work including styled text.
• Simon Kitching for String cleanups and optimization suggestions.
• Michael Koch for configuration fixes, Locale updates, bug and build fixes.
• Guilhem Lavaux for configuration, thread and channel fixes and Kaffe integration. JCL
native Pointer updates. Logger bug fixes.
• David Lichteblau for JCL support library global/local reference cleanups.
• Aaron Luchko for JDWP updates and documentation fixes.
• Ziga Mahkovec for Graphics2D upgraded to Cairo 0.5 and new regex features.
• Sven de Marothy for BMP imageio support, CSS and TextLayout fixes. GtkImage
rewrite, 2D, awt, free swing and date/time fixes and implementing the Qt4 peers.
• Casey Marshall for crypto algorithm fixes, FileChannel lock, SystemLogger and
FileHandler rotate implementations, NIO FileChannel.map support, security and
policy updates.
• Bryce McKinlay for RMI work.
• Audrius Meskauskas for lots of Free Corba, RMI and HTML work plus testing and
documenting.
• Kalle Olavi Niemitalo for build fixes.
• Rainer Orth for build fixes.
• Andrew Overholt for File locking fixes.
• Ingo Proetel for Image, Logger and URLClassLoader updates.
• Olga Rodimina for MenuSelectionManager implementation.
Contributors to GCC 697
• 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
• 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
Contributors to GCC 699
• 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
• 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.
Option Index 701
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’), rele-
vant entries in the manual are indexed under the most appropriate form; it may sometimes
be useful to look up both forms.
F fwpa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
fltrans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
fltrans-output-list . . . . . . . . . . . . . . . . . . . . . . . . 652 M
fresolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 msoft-float . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Concept Index 703
Concept Index
! *gimple_build_resx . . . . . . . . . . . . . . . . . . . . . . . . . 209
‘!’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 *gimple_build_return . . . . . . . . . . . . . . . . . . . . . . . 210
*gimple_build_switch . . . . . . . . . . . . . . . . . . . . . . . 210
*gimple_build_try . . . . . . . . . . . . . . . . . . . . . . . . . . 211
#
‘#’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 +
# in template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
#pragma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 ‘+’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
$ -
‘-fsection-anchors’ . . . . . . . . . . . . . . . . . . . . 237, 522
‘$’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
% /
‘/c’ in RTL dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
‘%’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
‘/f’ in RTL dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
% in GTY option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
‘/i’ in RTL dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
‘%’ in template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
‘/j’ in RTL dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
‘/s’ in RTL dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
& ‘/u’ in RTL dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
‘/v’ in RTL dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
‘&’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
<
( ‘<’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
(gimple_stmt_iterator . . . . . . . . . . . . . . . . . . . . . . 653
(nil) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
=
‘=’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
*
‘*’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
* in template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
>
*gimple_build_asm_vec . . . . . . . . . . . . . . . . . . . . . . 194 ‘>’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
*gimple_build_assign . . . . . . . . . . . . . . . . . . 195, 196
*gimple_build_bind . . . . . . . . . . . . . . . . . . . . . . . . . 197
*gimple_build_call . . . . . . . . . . . . . . . . . . . . . . . . . 198 ?
*gimple_build_call_from_tree . . . . . . . . . . . . . . 198 ‘?’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
*gimple_build_call_vec . . . . . . . . . . . . . . . . . . . . . 198
*gimple_build_catch . . . . . . . . . . . . . . . . . . . . . . . . 199
*gimple_build_cond . . . . . . . . . . . . . . . . . . . . . . . . . 200 ^
*gimple_build_cond_from_tree . . . . . . . . . . . . . . 200 ‘^’ in constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
*gimple_build_debug_bind . . . . . . . . . . . . . . . . . . 201
*gimple_build_eh_filter . . . . . . . . . . . . . . . . . . . 202
*gimple_build_goto . . . . . . . . . . . . . . . . . . . . . . . . . 203
*gimple_build_label . . . . . . . . . . . . . . . . . . . . . . . . 202 __absvdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
*gimple_build_omp_atomic_load . . . . . . . . . . . . . 203 __absvsi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
*gimple_build_omp_atomic_store . . . . . . . . . . . 203 __addda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
*gimple_build_omp_continue . . . . . . . . . . . . . . . . 204 __adddf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
*gimple_build_omp_critical . . . . . . . . . . . . . . . . 204 __adddq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
*gimple_build_omp_for . . . . . . . . . . . . . . . . . . . . . . 205 __addha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
*gimple_build_omp_parallel . . . . . . . . . . . . . . . . 206 __addhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
*gimple_build_omp_sections . . . . . . . . . . . . . . . . 208 __addqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
*gimple_build_omp_single . . . . . . . . . . . . . . . . . . 208 __addsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
704 GNU Compiler Collection (GCC) Internals
__addsf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __bid_extenddftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __bid_extendsddd2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__addta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __bid_extendsddf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addtf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __bid_extendsdtd2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__adduda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendsdtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __bid_extendsdxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__adduha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __bid_extendsfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__adduhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __bid_extendsfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__adduqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __bid_extendsftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__addusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_extendtftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__addusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __bid_extendxftd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
__adduta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __bid_fixdddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__addvdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __bid_fixddsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__addvsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __bid_fixsddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__addxf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __bid_fixsdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_fixtddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashldi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_fixtdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashldq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_fixunsdddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_fixunsddsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_fixunssddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_fixunssdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_fixunstddi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_fixunstdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
__ashlsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatdidd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashlta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatdisd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashlti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_floatditd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashluda3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatsidd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashludq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatsisd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashluha3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatsitd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashluhq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatunsdidd . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashluqq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatunsdisd . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashlusa3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatunsditd . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashlusq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatunssidd . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashluta3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __bid_floatunssisd . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_floatunssitd . . . . . . . . . . . . . . . . . . . . . . . . . . 20
__ashrdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_gedd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__ashrdq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_gesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__ashrha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_getd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__ashrhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_gtdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
__ashrqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_gtsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
__ashrsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_gttd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
__ashrsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_ledd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__ashrsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_lesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__ashrta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __bid_letd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__ashrti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __bid_ltdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__bid_adddd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __bid_ltsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__bid_addsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __bid_lttd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__bid_addtd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __bid_muldd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__bid_divdd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __bid_mulsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__bid_divsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __bid_multd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__bid_divtd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __bid_nedd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__bid_eqdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __bid_negdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__bid_eqsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __bid_negsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__bid_eqtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __bid_negtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__bid_extendddtd2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __bid_nesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__bid_extendddtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __bid_netd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
__bid_extendddxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __bid_subdd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
__bid_extenddfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __bid_subsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Concept Index 705
__dpd_fixunstdsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __eqtf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__dpd_floatdidd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extenddftf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatdisd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extenddfxf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatditd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extendsfdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatsidd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extendsftf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatsisd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __extendsfxf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatsitd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __ffsdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__dpd_floatunsdidd . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __ffsti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__dpd_floatunsdisd . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixdfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatunsditd . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixdfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatunssidd . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixdfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatunssisd . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixsfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_floatunssitd . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __fixsfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_gedd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixsfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_gesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixtfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_getd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixtfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_gtdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixtfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_gtsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixunsdfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_gttd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 __fixunsdfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_ledd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixunsdfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_lesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixunssfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_letd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixunssfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_ltdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixunssfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_ltsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixunstfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_lttd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixunstfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_muldd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixunstfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_mulsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixunsxfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_multd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixunsxfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_nedd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __fixunsxfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_negdd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixxfdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_negsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixxfsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_negtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __fixxfti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__dpd_nesd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __floatdidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_netd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 __floatdisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_subdd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __floatditf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_subsd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __floatdixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_subtd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 __floatsidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncdddf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __floatsisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncddsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatsitf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncddsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatsixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncdfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floattidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncsdsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __floattisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_trunctddd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floattitf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_trunctddf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floattixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_trunctdsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatundidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_trunctdsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatundisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_trunctdtf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 __floatunditf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_trunctdxf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatundixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_trunctfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatunsidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_trunctfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatunsisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncxfdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatunsitf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_truncxfsd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 __floatunsixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_unorddd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __floatuntidf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_unordsd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __floatuntisf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__dpd_unordtd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 __floatuntitf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__DTOR_LIST__ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 __floatuntixf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
__eqdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __fractdadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__eqsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __fractdadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Concept Index 707
__fractdadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractdquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractdquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fracthada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fracthadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fracthadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fracthadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdfuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdfuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __fracthausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractdidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractdiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fracthiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fracthiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fracthiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractdqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fracthqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fractdqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fracthqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fractdqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fracthqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fractdqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fracthqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
708 GNU Compiler Collection (GCC) Internals
__fracthqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fracthquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractqida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractqidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
__fractqiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractqiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractqiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractqiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractqiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractqiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __fractsfusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractqqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsfusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractqqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsfuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
__fractqqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractqqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractqqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractqqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractqqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractqqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractqqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractqqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractqqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
__fractqqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
__fractqquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fractqqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractqqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 __fractsqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
__fractqquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractsqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fractsada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractsqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
__fractsadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 __fractsqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Concept Index 709
__fractsqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractsqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractsqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudauha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 __fractudauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fractsquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 __fractudausa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudauta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
__fracttadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudquhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudquqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 __fractudqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractudqusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractudquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fracttiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
__fracttiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 __fractuhata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractudada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractuhati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractudadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractuhauda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractudadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractuhaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractudadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __fractuhauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
710 GNU Compiler Collection (GCC) Internals
__fractuhauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhausa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhauta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 __fractunshiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractuhqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractuhqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractuhqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractuhqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractuhquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunshqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractuhqudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunsqida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunsqidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhquqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunsqiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunsqihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhqusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunsqiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractuhquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __fractunsqisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunsqisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunsqita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunsqiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunsqiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunsqiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunsdisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractunsdisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractunsdita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractunsdiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractunsdiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsqqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__fractunsdiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunssadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunsdiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunssahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunsdiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunssaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunsdiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunssasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunsdiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunssati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunsdiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunssida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunsdqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunssidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunsdqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunssiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunsdqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunssihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunsdqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunssiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunsdqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunssisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunshadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunssisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunshahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunssita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunshaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunssiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunshasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunssiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunshati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunssiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
__fractunshida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractunssiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Concept Index 711
__fractunssiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsusasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunssiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsusati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunssiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsusqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunssiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 __fractunsusqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunssqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunsusqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunssqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunsusqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunssqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunsusqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
__fractunssqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunsutadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunssqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __fractunsutahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunstadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunsutaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunstahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunsutasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunstaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractunsutati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
__fractunstasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractuqqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractuqqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunstiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqqudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunstiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __fractuqquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunsudadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractuqquhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunsudahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractuqqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunsudaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractuqqusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
__fractunsudasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractuqquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunsudati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractusada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsudqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsudqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsudqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsudqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsudqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractusasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuhqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusauda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuqqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuqqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusauha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuqqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuqqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsuqqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 __fractusausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsusadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractusauta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
__fractunsusahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractusqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
__fractunsusaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 __fractusqdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
712 GNU Compiler Collection (GCC) Internals
__fractusqdi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __lshruqq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__fractusqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __lshrusa3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__fractusqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __lshrusq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__fractusqhi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __lshruta3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__fractusqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __ltdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusqqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __ltsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __lttf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__fractusqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
__fractusqsf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __moddi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__fractusqsi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __modsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__fractusqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __modti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__fractusqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __morestack_current_segment . . . . . . . . . . . . . . . . 58
__fractusqti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __morestack_initial_sp . . . . . . . . . . . . . . . . . . . . . . 58
__fractusquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __morestack_segments . . . . . . . . . . . . . . . . . . . . . . . . 58
__fractusqudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __mulda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractusquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __muldc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__fractusquhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __muldf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__fractusquqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 __muldi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__fractusqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __muldq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractusquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 __mulha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __mulhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutadf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __mulqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutadi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __mulsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __mulsc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__fractutaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __mulsf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__fractutahi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __mulsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__fractutahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __mulsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutaqi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __multa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __multc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__fractutasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __multf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__fractutasf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __multi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__fractutasi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __muluda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __muludq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __muluha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutati . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 __muluhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutauda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __muluqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __mulusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutauha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __mulusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __muluta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
__fractutauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __mulvdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__fractutausa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __mulvsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__fractutausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 __mulxc3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
__gedf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __mulxf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__gesf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __nedf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__getf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __negda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__gtdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __negdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__gtsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __negdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__gttf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __negdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__ledf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __negha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__lesf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __neghq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__letf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __negqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__lshrdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __negsa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__lshrsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __negsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__lshrti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 __negsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__lshruda3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __negta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__lshrudq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __negtf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__lshruha3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __negti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__lshruhq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __neguda2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Concept Index 713
__negudq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __satfractdisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__neguha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __satfractdisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__neguhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __satfractdita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__neguqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __satfractdiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__negusa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __satfractdiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__negusq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __satfractdiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__neguta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __satfractdiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__negvdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__negvsi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__negxf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __satfractdiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__nesf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__netf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 __satfractdqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__paritydi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__paritysi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__parityti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __satfractdqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__popcountdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __satfractdqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__popcountsi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __satfractdqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__popcountti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __satfractdqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__powidf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __satfractdquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__powisf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __satfractdqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__powitf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __satfractdquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__powixf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 __satfractdquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractdadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractdquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractdaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractdqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractdahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractdqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractdaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractdquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractdasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractdauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractdaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractdauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracthauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdfda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdfdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdfha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdfhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractdfqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdfuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 __satfracthiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfracthiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfracthiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfracthiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfracthiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractdiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfracthqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
714 GNU Compiler Collection (GCC) Internals
__satfracthqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfracthqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfracthqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsfda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracthqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracthqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsfha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracthqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracthquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracthqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracthquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracthquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfracthquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfracthqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfracthqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfracthquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 __satfractsfuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfractqida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsfuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractqidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsfusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfractqiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsfusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfractqihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsfuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
__satfractqiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractqiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractqiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractqiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 __satfractsiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractqqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractqqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractqqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
__satfractqqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqqsq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsqdq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsqhq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsqqq2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsqudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractqquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 __satfractsquhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractsada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsquqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractsadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractsaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsqusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractsahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfractsquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
__satfractsaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracttada2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractsasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracttadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractsata2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracttaha2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractsauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracttahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractsaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracttaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
__satfractsauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracttasa2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractsauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracttasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractsauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracttauda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractsausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 __satfracttaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Concept Index 715
__satfracttauha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractuhasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracttauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractuhata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracttauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractuhauda2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracttausa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractuhaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracttausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractuhauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracttauta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractuhauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracttida . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhausa2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracttidq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracttiha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhauta2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfracttihq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracttiqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracttisa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracttisq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracttita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracttiuda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracttiudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracttiuha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracttiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracttiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqudq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracttiusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfracttiusq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhquqq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfracttiuta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 __satfractuhqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractudada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractuhqusq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractudadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractuhquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractudaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdida. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdidq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdiha. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdihq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdiqq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdisa. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdisq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudauha2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdita. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdiuda . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdiudq . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudausa2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdiuha . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudauta2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 __satfractunsdiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunsdiusa . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunsdiusq . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunsdiuta . . . . . . . . . . . . . . . . . . . . . . . . . . 56
__satfractudqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunshida. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunshidq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunshiha. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunshihq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunshiqq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunshisa. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunshisq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudquhq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunshita. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudquqq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunshiuda . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunshiudq . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudqusq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 __satfractunshiuha . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractudquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunshiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractuhada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunshiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractuhadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunshiusa . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractuhaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunshiusq . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractuhahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunshiuta . . . . . . . . . . . . . . . . . . . . . . . . . . 55
__satfractuhaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunsqida. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
__satfractuhasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 __satfractunsqidq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
716 GNU Compiler Collection (GCC) Internals
__satfractunsqiha. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractuqqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractunsqihq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractuqqusq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractunsqiqq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractuqquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
__satfractunsqisa. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunsqisq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunsqita. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunsqiuda . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunsqiudq . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunsqiuha . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunsqiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunsqiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunsqiusa . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusauda2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunsqiusq . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunsqiuta . . . . . . . . . . . . . . . . . . . . . . . . . . 54 __satfractusauha2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunssida. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunssidq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunssiha. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
__satfractunssihq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusauta2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunssiqq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssisa. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssisq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssita. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssiuda . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssiudq . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssiuha . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssiusa . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusqudq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssiusq . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunssiuta . . . . . . . . . . . . . . . . . . . . . . . . . . 55 __satfractusquhq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunstida. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractusquqq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunstidq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractusqusa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunstiha. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractusquta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
__satfractunstihq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstiqq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutadq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstisa. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutaha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstisq. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutahq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstita. . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutaqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstiuda . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutasa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstiudq . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutasq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstiuha . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstiuhq . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutauda2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
__satfractunstiuqq . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutaudq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstiusa . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutauha2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstiusq . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutauhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractunstiuta . . . . . . . . . . . . . . . . . . . . . . . . . . 56 __satfractutauqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractuqqda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractutausa2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractuqqdq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __satfractutausq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
__satfractuqqha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __splitstack_find. . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
__satfractuqqhq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __ssaddda3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__satfractuqqqq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __ssadddq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__satfractuqqsa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __ssaddha3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__satfractuqqsq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __ssaddhq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__satfractuqqta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __ssaddqq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__satfractuqquda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __ssaddsa3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__satfractuqqudq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __ssaddsq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__satfractuqquha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __ssaddta3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__satfractuqquhq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 __ssashlda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Concept Index 717
__ssashldq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __subvsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
__ssashlha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __subxf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
__ssashlhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __truncdfsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__ssashlsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __trunctfdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__ssashlsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __trunctfsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__ssashlta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 __truncxfdf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__ssdivda3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __truncxfsf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
__ssdivdq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __ucmpdi2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssdivha3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __ucmpti2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssdivhq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssdivqq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivmoddi4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssdivsa3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivmodti4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssdivsq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssdivta3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 __udivti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssmulda3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __udivuda3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__ssmuldq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __udivudq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__ssmulha3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __udivuha3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__ssmulhq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __udivuhq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__ssmulqq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __udivuqq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__ssmulsa3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __udivusa3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__ssmulsq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __udivusq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__ssmulta3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 __udivuta3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__ssnegda2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __umoddi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssnegdq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __umodsi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssnegha2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __umodti3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
__ssneghq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __unorddf2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__ssnegqq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __unordsf2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__ssnegsa2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __unordtf2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
__ssnegsq2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __usadduda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__ssnegta2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 __usaddudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__sssubda3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usadduha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__sssubdq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usadduhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__sssubha3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usadduqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__sssubhq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usaddusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__sssubqq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usaddusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__sssubsa3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usadduta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
__sssubsq3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usashluda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__sssubta3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usashludq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__subda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usashluha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__subdf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __usashluhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__subdq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __usashluqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__subha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usashlusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__subhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __usashlusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
__subqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __usashluta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
__subsa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usdivuda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__subsf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __usdivudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__subsq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __usdivuha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__subta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usdivuhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__subtf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 __usdivuqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__subuda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usdivusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__subudq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usdivusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__subuha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usdivuta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
__subuhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __usmuluda3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__subuqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 __usmuludq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__subusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usmuluha3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__subusq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usmuluhq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__subuta3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 __usmuluqq3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
__subvdi3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 __usmulusa3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
718 GNU Compiler Collection (GCC) Internals