Target Description Macros and Functions#
In addition to the file machine.md
, a machine description
includes a C header file conventionally 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.
- 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