You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
6.2 KiB
HTML

<html lang="en">
<head>
<title>Machine Desc - GNU Compiler Collection (GCC) Internals</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Compiler Collection (GCC) Internals">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Loop-Analysis-and-Representation.html#Loop-Analysis-and-Representation" title="Loop Analysis and Representation">
<link rel="next" href="Target-Macros.html#Target-Macros" title="Target Macros">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2015 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Machine-Desc"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Target-Macros.html#Target-Macros">Target Macros</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Loop-Analysis-and-Representation.html#Loop-Analysis-and-Representation">Loop Analysis and Representation</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">16 Machine Descriptions</h2>
<p><a name="index-machine-descriptions-3241"></a>
A machine description has two parts: a file of instruction patterns
(<samp><span class="file">.md</span></samp> file) and a C header file of macro definitions.
<p>The <samp><span class="file">.md</span></samp> 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.
<p>See the next chapter for information on the C header file.
<ul class="menu">
<li><a accesskey="1" href="Overview.html#Overview">Overview</a>: How the machine description is used.
<li><a accesskey="2" href="Patterns.html#Patterns">Patterns</a>: How to write instruction patterns.
<li><a accesskey="3" href="Example.html#Example">Example</a>: An explained example of a <code>define_insn</code> pattern.
<li><a accesskey="4" href="RTL-Template.html#RTL-Template">RTL Template</a>: The RTL template defines what insns match a pattern.
<li><a accesskey="5" href="Output-Template.html#Output-Template">Output Template</a>: The output template says how to make assembler code
from such an insn.
<li><a accesskey="6" href="Output-Statement.html#Output-Statement">Output Statement</a>: For more generality, write C code to output
the assembler code.
<li><a accesskey="7" href="Predicates.html#Predicates">Predicates</a>: Controlling what kinds of operands can be used
for an insn.
<li><a accesskey="8" href="Constraints.html#Constraints">Constraints</a>: Fine-tuning operand selection.
<li><a accesskey="9" href="Standard-Names.html#Standard-Names">Standard Names</a>: Names mark patterns to use for code generation.
<li><a href="Pattern-Ordering.html#Pattern-Ordering">Pattern Ordering</a>: When the order of patterns makes a difference.
<li><a href="Dependent-Patterns.html#Dependent-Patterns">Dependent Patterns</a>: Having one pattern may make you need another.
<li><a href="Jump-Patterns.html#Jump-Patterns">Jump Patterns</a>: Special considerations for patterns for jump insns.
<li><a href="Looping-Patterns.html#Looping-Patterns">Looping Patterns</a>: How to define patterns for special looping insns.
<li><a href="Insn-Canonicalizations.html#Insn-Canonicalizations">Insn Canonicalizations</a>: Canonicalization of Instructions
<li><a href="Expander-Definitions.html#Expander-Definitions">Expander Definitions</a>: Generating a sequence of several RTL insns
for a standard operation.
<li><a href="Insn-Splitting.html#Insn-Splitting">Insn Splitting</a>: Splitting Instructions into Multiple Instructions.
<li><a href="Including-Patterns.html#Including-Patterns">Including Patterns</a>: Including Patterns in Machine Descriptions.
<li><a href="Peephole-Definitions.html#Peephole-Definitions">Peephole Definitions</a>: Defining machine-specific peephole optimizations.
<li><a href="Insn-Attributes.html#Insn-Attributes">Insn Attributes</a>: Specifying the value of attributes for generated insns.
<li><a href="Conditional-Execution.html#Conditional-Execution">Conditional Execution</a>: Generating <code>define_insn</code> patterns for
predication.
<li><a href="Define-Subst.html#Define-Subst">Define Subst</a>: Generating <code>define_insn</code> and <code>define_expand</code>
patterns from other patterns.
<li><a href="Constant-Definitions.html#Constant-Definitions">Constant Definitions</a>: Defining symbolic constants that can be used in the
md file.
<li><a href="Iterators.html#Iterators">Iterators</a>: Using iterators to generate patterns from a template.
</ul>
</body></html>