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


GNU Compiler Collection (GCC) Internals

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

9. Machine Descriptions

A machine description has two parts: a file of instruction patterns (`.md' file) and a C header file of macro definitions.

The `.md' file for a target machine contains a pattern for each instruction that the target machine supports (or at least each instruction that is worth telling the compiler about). It may also contain comments. A semicolon causes the rest of the line to be a comment, unless the semicolon is inside a quoted string.

See the next chapter for information on the C header file.

9.1 Overview of How the Machine Description is Used  How the machine description is used.
9.2 Everything about Instruction Patterns  How to write instruction patterns.
9.3 Example of define_insn  An explained example of a define_insn pattern.
9.4 RTL Template  The RTL template defines what insns match a pattern.
9.5 Output Templates and Operand Substitution  The output template says how to make assembler code from such an insn.
9.6 C Statements for Assembler Output  For more generality, write C code to output the assembler code.
9.7 Operand Constraints  When not all operands are general operands.
9.8 Standard Pattern Names For Generation  Names mark patterns to use for code generation.
9.9 When the Order of Patterns Matters  When the order of patterns makes a difference.
9.10 Interdependence of Patterns  Having one pattern may make you need another.
9.11 Defining Jump Instruction Patterns  Special considerations for patterns for jump insns.
9.12 Defining Looping Instruction Patterns  How to define patterns for special looping insns.
9.13 Canonicalization of Instructions  
9.14 Defining RTL Sequences for Code Generation  Generating a sequence of several RTL insns for a standard operation.
9.15 Defining How to Split Instructions  Splitting Instructions into Multiple Instructions.
9.16 Including Patterns in Machine Descriptions.  
9.17 Machine-Specific Peephole Optimizers  Defining machine-specific peephole optimizations.
9.18 Instruction Attributes  Specifying the value of attributes for generated insns.
9.19 Conditional Execution  Generating define_insn patterns for predication.
9.20 Constant Definitions  Defining symbolic constants that can be used in the md file.


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

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