1 1 17 Machine Descriptions 1 *********************** 1 1 A machine description has two parts: a file of instruction patterns 1 ('.md' file) and a C header file of macro definitions. 1 1 The '.md' file for a target machine contains a pattern for each 1 instruction that the target machine supports (or at least each 1 instruction that is worth telling the compiler about). It may also 1 contain comments. A semicolon causes the rest of the line to be a 1 comment, unless the semicolon is inside a quoted string. 1 1 See the next chapter for information on the C header file. 1
1 · Overview How the machine description is used. · Patterns How to write instruction patterns. · Example An explained example of a 'define_insn' pattern. · RTL Template The RTL template defines what insns match a pattern. · Output Template The output template says how to make assembler code 1 from such an insn. · Output Statement For more generality, write C code to output 1 the assembler code. · Predicates Controlling what kinds of operands can be used 1 for an insn. · Constraints Fine-tuning operand selection. · Standard Names Names mark patterns to use for code generation. · Pattern Ordering When the order of patterns makes a difference. · Dependent Patterns Having one pattern may make you need another. · Jump Patterns Special considerations for patterns for jump insns. · Looping Patterns How to define patterns for special looping insns. · Insn CanonicalizationsCanonicalization of Instructions · Expander DefinitionsGenerating a sequence of several RTL insns 1 for a standard operation. · Insn Splitting Splitting Instructions into Multiple Instructions. · Including Patterns Including Patterns in Machine Descriptions. · Peephole DefinitionsDefining machine-specific peephole optimizations. · Insn Attributes Specifying the value of attributes for generated insns. · Conditional ExecutionGenerating 'define_insn' patterns for 1 predication. · Define Subst Generating 'define_insn' and 'define_expand' 1 patterns from other patterns. · Constant DefinitionsDefining symbolic constants that can be used in the 1 md file. · Iterators Using iterators to generate patterns from a template. 1