www.delorie.com/gnu/docs/gcc/gccint_106.html   search  
 
Buy the book!


GNU Compiler Collection (GCC) Internals

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10. 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.

10.1 The Global targetm Variable  The targetm variable.
10.2 Controlling the Compilation Driver, `gcc'  Controlling how the driver runs the compilation passes.
10.3 Run-time Target Specification  Defining `-m' options like `-m68000' and `-m68020'.
10.4 Defining data structures for per-function information.  
10.5 Storage Layout  Defining sizes and alignments of data.
10.6 Layout of Source Language Data Types  Defining sizes and properties of basic user data types.
10.7 Target Character Escape Sequences  Defining the value of target character escape sequences
10.8 Register Usage  Naming and describing the hardware registers.
10.9 Register Classes  Defining the classes of hardware registers.
10.10 Stack Layout and Calling Conventions  Defining which way the stack grows and by how much.
10.11 Implementing the Varargs Macros  Defining the varargs macros.
10.12 Trampolines for Nested Functions  Code set up at run time to enter a nested function.
10.13 Implicit Calls to Library Routines  Controlling how library routines are implicitly called.
10.14 Addressing Modes  Defining addressing modes valid for memory operands.
10.15 Condition Code Status  Defining how insns update the condition code.
10.16 Describing Relative Costs of Operations  Defining relative costs of different operations.
10.17 Adjusting the Instruction Scheduler  Adjusting the behavior of the instruction scheduler.
10.18 Dividing the Output into Sections (Texts, Data, ...)  Dividing storage into text, data, and other sections.
10.19 Position Independent Code  Macros for position independent code.
10.20 Defining the Output Assembler Language  Defining how to write insns and pseudo-ops to output.
10.21 Controlling Debugging Information Format  Defining the format of debugging output.
10.22 Cross Compilation and Floating Point  Handling floating point for cross-compilers.
10.23 Mode Switching Instructions  Insertion of mode-switching instructions.
10.24 Defining target-specific uses of __attribute__  
10.25 Miscellaneous Parameters  Everything else.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003