GNU Compiler Collection (GCC) Internals#
Contents:
- Copyright
- Introduction
- Contributing to GCC Development
- GCC and Portability
- Interfacing to GCC Output
- The GCC low-level runtime library
- Language Front Ends in GCC
- Source Tree Structure and Build System
- Configure Terms and History
- Top Level Source Directory
- The gcc Subdirectory
- Subdirectories of gcc
- Configuration in the gcc Directory
- Build System in the gcc Directory
- Makefile Targets
- Library Source Files and Headers under the gcc Directory
- Headers Installed by GCC
- Building Documentation
- Miscellaneous Documentation
- Anatomy of a Language Front End
- Anatomy of a Target Back End
- Testsuites
- Idioms Used in Testsuite Code
- Directives used within DejaGnu tests
- Syntax and Descriptions of test directives
- Specify how to build the test
- Specify additional compiler options
- Modify the test timeout value
- Skip a test for some targets
- Expect a test to fail for some targets
- Expect the compiler to crash
- Expect the test executable to fail
- Verify compiler messages
- Verify output of the test executable
- Specify environment variables for a test
- Specify additional files for a test
- Add checks at the end of a test
- Selecting targets to which a test applies
- Keywords describing target attributes
- Endianness
- Data type sizes
- Fortran-specific attributes
- Vector-specific attributes
- Thread Local Storage attributes
- Decimal floating point attributes
- ARM-specific attributes
- AArch64-specific attributes
- MIPS-specific attributes
- MSP430-specific attributes
- PowerPC-specific attributes
- RISC-V specific attributes
- Other hardware attributes
- Environment attributes
- Other attributes
- Local to tests in gcc.target/i386
- Local to tests in gcc.test-framework
- Features for dg-add-options
- Variants of dg-require-support
- Commands for use in dg-final
- Syntax and Descriptions of test directives
- Ada Language Testsuites
- C Language Testsuites
- Support for testing link-time optimizations
- Support for testing gcov
- Support for testing profile-directed optimizations
- Support for testing binary compatibility
- Support for torture testing using multiple options
- Support for testing GIMPLE passes
- Support for testing RTL passes
- Option specification files
- Passes and Files of the Compiler
- Sizes and offsets as runtime invariants
- GENERIC
- GIMPLE
- Tuple representation
- Class hierarchy of GIMPLE statements
- GIMPLE instruction set
- Temporaries
- Operands
- Manipulating GIMPLE statements
- Tuple specific accessors
- GIMPLE_ASM
- GIMPLE_ASSIGN
- GIMPLE_BIND
- GIMPLE_CALL
- GIMPLE_CATCH
- GIMPLE_COND
- GIMPLE_DEBUG
- GIMPLE_EH_FILTER
- GIMPLE_LABEL
- GIMPLE_GOTO
- GIMPLE_NOP
- GIMPLE_OMP_ATOMIC_LOAD
- GIMPLE_OMP_ATOMIC_STORE
- GIMPLE_OMP_CONTINUE
- GIMPLE_OMP_CRITICAL
- GIMPLE_OMP_FOR
- GIMPLE_OMP_MASTER
- GIMPLE_OMP_ORDERED
- GIMPLE_OMP_PARALLEL
- GIMPLE_OMP_RETURN
- GIMPLE_OMP_SECTION
- GIMPLE_OMP_SECTIONS
- GIMPLE_OMP_SINGLE
- GIMPLE_PHI
- GIMPLE_RESX
- GIMPLE_RETURN
- GIMPLE_SWITCH
- GIMPLE_TRY
- GIMPLE_WITH_CLEANUP_EXPR
- GIMPLE sequences
- Sequence iterators
- Adding a new GIMPLE statement code
- Statement and operand traversals
- Exception Handling
- Analysis and Optimization of GIMPLE tuples
- RTL Representation
- RTL Object Types
- RTL Classes and Formats
- Access to Operands
- Access to Special Operands
- Flags in an RTL Expression
- Machine Modes
- Constant Expression Types
- Registers and Memory
- RTL Expressions for Arithmetic
- Comparison Operations
- Bit-Fields
- Vector Operations
- Conversions
- Declarations
- Side Effect Expressions
- Embedded Side-Effects on Addresses
- Assembler Instructions as Expressions
- Variable Location Debug Information in RTL
- Insns
- RTL Representation of Function-Call Insns
- On-the-Side SSA Form for RTL
- Structure Sharing Assumptions
- Reading RTL
- Control Flow Graph
- Analysis and Representation of Loops
- Machine Descriptions
- Overview of How the Machine Description is Used
- Everything about Instruction Patterns
- Example of define_insn
- RTL Template
- Output Templates and Operand Substitution
- C Statements for Assembler Output
- Predicates
- Operand Constraints
- Simple Constraints
- Multiple Alternative Constraints
- Register Class Preferences
- Constraint Modifier Characters
- Constraints for Particular Machines
- AArch64 family—
config/aarch64/constraints.md
- AMD GCN —
config/gcn/constraints.md
- ARC —
config/arc/constraints.md
- ARM family—
config/arm/constraints.md
- AVR family—
config/avr/constraints.md
- Blackfin family—
config/bfin/constraints.md
- Epiphany—
config/epiphany/constraints.md
- FRV—
config/frv/frv.h
- FT32—
config/ft32/constraints.md
- Hewlett-Packard PA-RISC—
config/pa/pa.h
- Intel IA-64—
config/ia64/ia64.h
- M32C—
config/m32c/m32c.cc
- LoongArch—
config/loongarch/constraints.md
- MicroBlaze—
config/microblaze/constraints.md
- MIPS—
config/mips/constraints.md
- Motorola 680x0—
config/m68k/constraints.md
- Moxie—
config/moxie/constraints.md
- MSP430—
config/msp430/constraints.md
- NDS32—
config/nds32/constraints.md
- Nios II family—
config/nios2/constraints.md
- OpenRISC—
config/or1k/constraints.md
- PDP-11—
config/pdp11/constraints.md
- PowerPC and IBM RS6000—
config/rs6000/constraints.md
- PRU—
config/pru/constraints.md
- RL78—
config/rl78/constraints.md
- RISC-V—
config/riscv/constraints.md
- RX—
config/rx/constraints.md
- S/390 and zSeries—
config/s390/s390.h
- SPARC—
config/sparc/sparc.h
- TI C6X family—
config/c6x/constraints.md
- Visium—
config/visium/constraints.md
- x86 family—
config/i386/constraints.md
- Xstormy16—
config/stormy16/stormy16.h
- Xtensa—
config/xtensa/constraints.md
- AArch64 family—
- Disable insn alternatives using the enabled attribute
- Defining Machine-Specific Constraints
- Testing constraints from C
- Standard Pattern Names For Generation
- When the Order of Patterns Matters
- Interdependence of Patterns
- Defining Jump Instruction Patterns
- Defining Looping Instruction Patterns
- Canonicalization of Instructions
- Defining RTL Sequences for Code Generation
- Defining How to Split Instructions
- Including Patterns in Machine Descriptions.
- Machine-Specific Peephole Optimizers
- Instruction Attributes
- Conditional Execution
- RTL Templates Transformations
- Constant Definitions
- Iterators
- Target Description Macros and Functions
- The Global targetm Variable
- Controlling the Compilation Driver, gcc
- Run-time Target Specification
- Defining data structures for per-function information.
- Storage Layout
- Layout of Source Language Data Types
- Register Usage
- Register Classes
- Stack Layout and Calling Conventions
- Basic Stack Layout
- Exception Handling Support
- Specifying How Stack Checking is Done
- Registers That Address the Stack Frame
- Eliminating Frame Pointer and Arg Pointer
- Passing Function Arguments on the Stack
- Passing Arguments in Registers
- How Scalar Function Values Are Returned
- How Large Values Are Returned
- Caller-Saves Register Allocation
- Function Entry and Exit
- Generating Code for Profiling
- Permitting tail calls
- Shrink-wrapping separate components
- Stack smashing protection
- Miscellaneous register hooks
- Implementing the Varargs Macros
- Support for Nested Functions
- Implicit Calls to Library Routines
- Addressing Modes
- Anchored Addresses
- Condition Code Status
- Describing Relative Costs of Operations
- Adjusting the Instruction Scheduler
- Dividing the Output into Sections (Texts, Data, …)
- Position Independent Code
- Defining the Output Assembler Language
- The Overall Framework of an Assembler File
- Output of Data
- Output of Uninitialized Variables
- Output and Generation of Labels
- How Initialization Functions Are Handled
- Macros Controlling Initialization Routines
- Output of Assembler Instructions
- Output of Dispatch Tables
- Assembler Commands for Exception Regions
- Assembler Commands for Alignment
- Controlling Debugging Information Format
- Cross Compilation and Floating Point
- Mode Switching Instructions
- Defining target-specific uses of __attribute__
- Emulating TLS
- Defining coprocessor specifics for MIPS targets.
- Parameters for Precompiled Header Validity Checking
- C++ ABI parameters
- D ABI parameters
- Adding support for named address spaces
- Miscellaneous Parameters
- Host Configuration
- Makefile Fragments
- collect2
- Standard Header File Directories
- Memory Management and Type Information
- Plugins
- Loading Plugins
- Plugin API
- Interacting with the pass manager
- Interacting with the GCC Garbage Collector
- Giving information about a plugin
- Registering custom attributes or pragmas
- Recording information about pass execution
- Controlling which passes are being run
- Keeping track of available passes
- Building GCC plugins
- Link Time Optimization
- Match and Simplify
- Static Analyzer
- User Experience Guidelines
- Guidelines for Diagnostics
- Talk in terms of the user’s code
- Diagnostics are actionable
- The user’s attention is important
- Sometimes the user didn’t write the code
- Precision of Wording
- Try the diagnostic on real-world code
- Make mismatches clear
- Location Information
- Coding Conventions
- Group logically-related diagnostics
- Quoting
- Spelling and Terminology
- Fix-it hints
- Guidelines for Options
- Guidelines for Diagnostics
- Funding Free Software
- Contributors to GCC
- GNU GENERAL PUBLIC LICENSE
- Preamble
- TERMS AND CONDITIONS
- 0. Definitions.
- 1. Source Code.
- 2. Basic Permissions.
- 3. Protecting Users’ Legal Rights From Anti-Circumvention Law.
- 4. Conveying Verbatim Copies.
- 5. Conveying Modified Source Versions.
- 6. Conveying Non-Source Forms.
- 7. Additional Terms.
- 8. Termination.
- 9. Acceptance Not Required for Having Copies.
- 10. Automatic Licensing of Downstream Recipients.
- 11. Patents.
- 12. No Surrender of Others’ Freedom.
- 13. Use with the GNU Affero General Public License.
- 14. Revised Versions of this License.
- 15. Disclaimer of Warranty.
- 16. Limitation of Liability.
- 17. Interpretation of Sections 15 and 16.
- How to Apply These Terms to Your New Programs
- GNU Free Documentation License
- Preamble
- 1. APPLICABILITY AND DEFINITIONS
- 2. VERBATIM COPYING
- 3. COPYING IN QUANTITY
- 4. MODIFICATIONS
- 5. COMBINING DOCUMENTS
- 6. COLLECTIONS OF DOCUMENTS
- 7. AGGREGATION WITH INDEPENDENT WORKS
- 8. TRANSLATION
- 9. TERMINATION
- 10. FUTURE REVISIONS OF THIS LICENSE
- 11. RELICENSING
- ADDENDUM: How to use this License for your documents
- Indexes and tables