GNU Compiler Collection Internals
For gcc version 4.6.2
(GNU Tools for ARM Embedded Processors)
Richard M. Stallman and the GCC Developer Community
Copyright
c
1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of
the GNU Free Documentation License, Version 1.3 or any later version published by the
Free Software Foundation; with the Invariant Sections being “Funding Free Software”, the
Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see
below). A copy of the license is included in the section entitled “GNU Free Documentation
License”.
(a) The FSF’s Front-Cover Text is:
A GNU Manual
(b) The FSF’s Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU software. Copies
published by the Free Software Foundation raise funds for GNU development.
i
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. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
9 Passes and Files of the Compiler . . . . . . . . . . . . . . . . . . . . . . . 111
10 RTL Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
11 GENERIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
12 GIMPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
13 Analysis and Optimization of GIMPLE tuples . . . . . . . . . . . . 257
14 Analysis and Representation of Loops . . . . . . . . . . . . . . . . . . . 269
15 Control Flow Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
16 Machine Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
17 Target Description Macros and Functions . . . . . . . . . . . . . . . . 393
18 Host Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
19 Makefile Fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
20 collect2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
21 Standard Header File Directories . . . . . . . . . . . . . . . . . . . . . . . 569
22 Memory Management and Type Information . . . . . . . . . . . . . 571
23 Plugins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
24 Link Time Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
Funding Free Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
The GNU Project and GNU/Linux. . . . . . . . . . . . . . . . . . . . . . . . . 597
GNU General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . . . 611
Contributors to GCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
Option Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
Concept Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
iii
Table of 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
4.1 Routines for integer arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1.1 Arithmetic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1.2 Comparison functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1.3 Trapping arithmetic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.1.4 Bit operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Routines for floating point emulation . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2.1 Arithmetic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2.2 Conversion functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.3 Comparison functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2.4 Other floating-point functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3 Routines for decimal floating point emulation . . . . . . . . . . . . . . . . . . 16
4.3.1 Arithmetic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3.2 Conversion functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3.3 Comparison functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4 Routines for fixed-point fractional emulation. . . . . . . . . . . . . . . . . . . 22
4.4.1 Arithmetic functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.4.2 Comparison functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4.3 Conversion functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.5 Language-independent routines for exception handling . . . . . . . . . 57
4.6 Miscellaneous runtime library routines. . . . . . . . . . . . . . . . . . . . . . . . . 57
4.6.1 Cache control functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.6.2 Split stack functions and variables . . . . . . . . . . . . . . . . . . . . . . . . 57
5 Language Front Ends in GCC . . . . . . . . . . . . . . . . 59
6 Source Tree Structure and Build System . . . . 61
6.1 Configure Terms and History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.2 Top Level Source Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6.3 The ‘gcc’ Subdirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.3.1 Subdirectories of ‘gcc’. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.3.2 Configuration in the ‘gcc’ Directory . . . . . . . . . . . . . . . . . . . . . . 64
6.3.2.1 Scripts Used by ‘configure’ . . . . . . . . . . . . . . . . . . . . . . . . . 64