1 |
12 |
jlechner |
\input texinfo @c -*-texinfo-*-
|
2 |
|
|
@c %**start of header
|
3 |
|
|
@setfilename gccint.info
|
4 |
|
|
@c INTERNALS is used by md.texi to determine whether to include the
|
5 |
|
|
@c whole of that file, in the internals manual, or only the part
|
6 |
|
|
@c dealing with constraints, in the user manual.
|
7 |
|
|
@set INTERNALS
|
8 |
|
|
|
9 |
|
|
@c See miscellaneous notes in gcc.texi on checks/things to do.
|
10 |
|
|
|
11 |
|
|
@include gcc-common.texi
|
12 |
|
|
|
13 |
|
|
@settitle GNU Compiler Collection (GCC) Internals
|
14 |
|
|
|
15 |
|
|
@c Create a separate index for command line options.
|
16 |
|
|
@defcodeindex op
|
17 |
|
|
@c Merge the standard indexes into a single one.
|
18 |
|
|
@syncodeindex fn cp
|
19 |
|
|
@syncodeindex vr cp
|
20 |
|
|
@syncodeindex ky cp
|
21 |
|
|
@syncodeindex pg cp
|
22 |
|
|
@syncodeindex tp cp
|
23 |
|
|
|
24 |
|
|
@paragraphindent 1
|
25 |
|
|
|
26 |
|
|
@c %**end of header
|
27 |
|
|
|
28 |
|
|
@copying
|
29 |
|
|
Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
30 |
|
|
1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
31 |
|
|
|
32 |
|
|
Permission is granted to copy, distribute and/or modify this document
|
33 |
|
|
under the terms of the GNU Free Documentation License, Version 1.2 or
|
34 |
|
|
any later version published by the Free Software Foundation; with the
|
35 |
|
|
Invariant Sections being ``GNU General Public License'' and ``Funding
|
36 |
|
|
Free Software'', the Front-Cover texts being (a) (see below), and with
|
37 |
|
|
the Back-Cover Texts being (b) (see below). A copy of the license is
|
38 |
|
|
included in the section entitled ``GNU Free Documentation License''.
|
39 |
|
|
|
40 |
|
|
(a) The FSF's Front-Cover Text is:
|
41 |
|
|
|
42 |
|
|
A GNU Manual
|
43 |
|
|
|
44 |
|
|
(b) The FSF's Back-Cover Text is:
|
45 |
|
|
|
46 |
|
|
You have freedom to copy and modify this GNU Manual, like GNU
|
47 |
|
|
software. Copies published by the Free Software Foundation raise
|
48 |
|
|
funds for GNU development.
|
49 |
|
|
@end copying
|
50 |
|
|
@ifnottex
|
51 |
|
|
@dircategory Programming
|
52 |
|
|
@direntry
|
53 |
|
|
* gccint: (gccint). Internals of the GNU Compiler Collection.
|
54 |
|
|
@end direntry
|
55 |
|
|
This file documents the internals of the GNU compilers.
|
56 |
|
|
@sp 1
|
57 |
|
|
@insertcopying
|
58 |
|
|
@sp 1
|
59 |
|
|
@end ifnottex
|
60 |
|
|
|
61 |
|
|
@setchapternewpage odd
|
62 |
|
|
@shorttitlepage GNU Compiler Collection Internals (GCC)
|
63 |
|
|
@titlepage
|
64 |
|
|
@center @titlefont{GNU Compiler Collection Internals}
|
65 |
|
|
@sp 2
|
66 |
|
|
@center by Richard M. Stallman and the GCC Developer Community
|
67 |
|
|
@page
|
68 |
|
|
@vskip 0pt plus 1filll
|
69 |
|
|
For GCC Version @value{version-GCC}@*
|
70 |
|
|
@sp 1
|
71 |
|
|
@insertcopying
|
72 |
|
|
@end titlepage
|
73 |
|
|
@summarycontents
|
74 |
|
|
@contents
|
75 |
|
|
@page
|
76 |
|
|
|
77 |
|
|
@node Top, Contributing,, (DIR)
|
78 |
|
|
@top Introduction
|
79 |
|
|
@cindex introduction
|
80 |
|
|
|
81 |
|
|
This manual documents the internals of the GNU compilers, including
|
82 |
|
|
how to port them to new targets and some information about how to
|
83 |
|
|
write front ends for new languages. It corresponds to GCC version
|
84 |
|
|
@value{version-GCC}. The use of the GNU compilers is documented in a
|
85 |
|
|
separate manual. @xref{Top,, Introduction, gcc, Using the GNU
|
86 |
|
|
Compiler Collection (GCC)}.
|
87 |
|
|
|
88 |
|
|
This manual is mainly a reference manual rather than a tutorial. It
|
89 |
|
|
discusses how to contribute to GCC (@pxref{Contributing}), the
|
90 |
|
|
characteristics of the machines supported by GCC as hosts and targets
|
91 |
|
|
(@pxref{Portability}), how GCC relates to the ABIs on such systems
|
92 |
|
|
(@pxref{Interface}), and the characteristics of the languages for
|
93 |
|
|
which GCC front ends are written (@pxref{Languages}). It then
|
94 |
|
|
describes the GCC source tree structure and build system, some of the
|
95 |
|
|
interfaces to GCC front ends, and how support for a target system is
|
96 |
|
|
implemented in GCC@.
|
97 |
|
|
|
98 |
|
|
Additional tutorial information is linked to from
|
99 |
|
|
@uref{http://gcc.gnu.org/readings.html}.
|
100 |
|
|
|
101 |
|
|
@menu
|
102 |
|
|
* Contributing:: How to contribute to testing and developing GCC.
|
103 |
|
|
* Portability:: Goals of GCC's portability features.
|
104 |
|
|
* Interface:: Function-call interface of GCC output.
|
105 |
|
|
* Libgcc:: Low-level runtime library used by GCC.
|
106 |
|
|
* Languages:: Languages for which GCC front ends are written.
|
107 |
|
|
* Source Tree:: GCC source tree structure and build system.
|
108 |
|
|
* Options:: Option specification files.
|
109 |
|
|
* Passes:: Order of passes, what they do, and what each file is for.
|
110 |
|
|
* Trees:: The source representation used by the C and C++ front ends.
|
111 |
|
|
* RTL:: The intermediate representation that most passes work on.
|
112 |
|
|
* Control Flow:: Maintaining and manipulating the control flow graph.
|
113 |
|
|
* Tree SSA:: Analysis and optimization of the tree representation.
|
114 |
|
|
* Machine Desc:: How to write machine description instruction patterns.
|
115 |
|
|
* Target Macros:: How to write the machine description C macros and functions.
|
116 |
|
|
* Host Config:: Writing the @file{xm-@var{machine}.h} file.
|
117 |
|
|
* Fragments:: Writing the @file{t-@var{target}} and @file{x-@var{host}} files.
|
118 |
|
|
* Collect2:: How @code{collect2} works; how it finds @code{ld}.
|
119 |
|
|
* Header Dirs:: Understanding the standard header file directories.
|
120 |
|
|
* Type Information:: GCC's memory management; generating type information.
|
121 |
|
|
|
122 |
|
|
* Funding:: How to help assure funding for free software.
|
123 |
|
|
* GNU Project:: The GNU Project and GNU/Linux.
|
124 |
|
|
|
125 |
|
|
* Copying:: GNU General Public License says
|
126 |
|
|
how you can copy and share GCC.
|
127 |
|
|
* GNU Free Documentation License:: How you can copy and share this manual.
|
128 |
|
|
* Contributors:: People who have contributed to GCC.
|
129 |
|
|
|
130 |
|
|
* Option Index:: Index to command line options.
|
131 |
|
|
* Concept Index:: Index of concepts and symbol names.
|
132 |
|
|
@end menu
|
133 |
|
|
|
134 |
|
|
@include contribute.texi
|
135 |
|
|
@include portability.texi
|
136 |
|
|
@include interface.texi
|
137 |
|
|
@include libgcc.texi
|
138 |
|
|
@include languages.texi
|
139 |
|
|
@include sourcebuild.texi
|
140 |
|
|
@include options.texi
|
141 |
|
|
@include passes.texi
|
142 |
|
|
@include c-tree.texi
|
143 |
|
|
@include tree-ssa.texi
|
144 |
|
|
@include rtl.texi
|
145 |
|
|
@include cfg.texi
|
146 |
|
|
@include md.texi
|
147 |
|
|
@include tm.texi
|
148 |
|
|
@include hostconfig.texi
|
149 |
|
|
@include fragments.texi
|
150 |
|
|
@include collect2.texi
|
151 |
|
|
@include headerdirs.texi
|
152 |
|
|
@include gty.texi
|
153 |
|
|
|
154 |
|
|
@include funding.texi
|
155 |
|
|
@include gnu.texi
|
156 |
|
|
@include gpl.texi
|
157 |
|
|
|
158 |
|
|
@c ---------------------------------------------------------------------
|
159 |
|
|
@c GFDL
|
160 |
|
|
@c ---------------------------------------------------------------------
|
161 |
|
|
|
162 |
|
|
@include fdl.texi
|
163 |
|
|
|
164 |
|
|
@include contrib.texi
|
165 |
|
|
|
166 |
|
|
@c ---------------------------------------------------------------------
|
167 |
|
|
@c Indexes
|
168 |
|
|
@c ---------------------------------------------------------------------
|
169 |
|
|
|
170 |
|
|
@node Option Index
|
171 |
|
|
@unnumbered Option Index
|
172 |
|
|
|
173 |
|
|
GCC's command line options are indexed here without any initial @samp{-}
|
174 |
|
|
or @samp{--}. Where an option has both positive and negative forms
|
175 |
|
|
(such as @option{-f@var{option}} and @option{-fno-@var{option}}),
|
176 |
|
|
relevant entries in the manual are indexed under the most appropriate
|
177 |
|
|
form; it may sometimes be useful to look up both forms.
|
178 |
|
|
|
179 |
|
|
@printindex op
|
180 |
|
|
|
181 |
|
|
@node Concept Index
|
182 |
|
|
@unnumbered Concept Index
|
183 |
|
|
|
184 |
|
|
@printindex cp
|
185 |
|
|
|
186 |
|
|
@c ---------------------------------------------------------------------
|
187 |
|
|
@c Epilogue
|
188 |
|
|
@c ---------------------------------------------------------------------
|
189 |
|
|
|
190 |
|
|
@bye
|