Next: Host Config, Previous: Machine Desc, Up: Top [Contents][Index]
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.
• Target Structure: | The targetm variable.
| |
• Driver: | Controlling how the driver runs the compilation passes. | |
• Run-time Target: | Defining ‘-m’ options like -m68000 and -m68020. | |
• Per-Function Data: | Defining data structures for per-function information. | |
• Storage Layout: | Defining sizes and alignments of data. | |
• Type Layout: | Defining sizes and properties of basic user data types. | |
• Registers: | Naming and describing the hardware registers. | |
• Register Classes: | Defining the classes of hardware registers. | |
• Stack and Calling: | Defining which way the stack grows and by how much. | |
• Varargs: | Defining the varargs macros. | |
• Trampolines: | Code set up at run time to enter a nested function. | |
• Library Calls: | Controlling how library routines are implicitly called. | |
• Addressing Modes: | Defining addressing modes valid for memory operands. | |
• Anchored Addresses: | Defining how -fsection-anchors should work. | |
• Condition Code: | Defining how insns update the condition code. | |
• Costs: | Defining relative costs of different operations. | |
• Scheduling: | Adjusting the behavior of the instruction scheduler. | |
• Sections: | Dividing storage into text, data, and other sections. | |
• PIC: | Macros for position independent code. | |
• Assembler Format: | Defining how to write insns and pseudo-ops to output. | |
• Debugging Info: | Defining the format of debugging output. | |
• Floating Point: | Handling floating point for cross-compilers. | |
• Mode Switching: | Insertion of mode-switching instructions. | |
• Target Attributes: | Defining target-specific uses of __attribute__ .
| |
• Emulated TLS: | Emulated TLS support. | |
• MIPS Coprocessors: | MIPS coprocessor support and how to customize it. | |
• PCH Target: | Validity checking for precompiled headers. | |
• C++ ABI: | Controlling C++ ABI changes. | |
• Named Address Spaces: | Adding support for named address spaces | |
• Misc: | Everything else. |
Next: Host Config, Previous: Machine Desc, Up: Top [Contents][Index]