1 1 18 Target Description Macros and Functions 1 ****************************************** 1 1 In addition to the file 'MACHINE.md', a machine description includes a C 1 header file conventionally given the name 'MACHINE.h' and a C source 1 file named 'MACHINE.c'. The header file defines numerous macros that 1 convey the information about the target machine that does not fit into 1 the scheme of the '.md' file. The file 'tm.h' should be a link to 1 'MACHINE.h'. The header file 'config.h' includes 'tm.h' and most 1 compiler source files include 'config.h'. The source file defines a 1 variable 'targetm', which is a structure containing pointers to 1 functions and data relating to the target machine. 'MACHINE.c' should 1 also contain their definitions, if they are not defined elsewhere in 1 GCC, and other functions called through the macros defined in the '.h' 1 file. 1
1 · 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. 1