選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

157 行
10.0KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>Machine Desc (GNU Compiler Collection (GCC) Internals)</title>
  21. <meta name="description" content="Machine Desc (GNU Compiler Collection (GCC) Internals)">
  22. <meta name="keywords" content="Machine Desc (GNU Compiler Collection (GCC) Internals)">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="index.html#Top" rel="up" title="Top">
  30. <link href="Overview.html#Overview" rel="next" title="Overview">
  31. <link href="Dependency-analysis.html#Dependency-analysis" rel="prev" title="Dependency analysis">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="Machine-Desc"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Target-Macros.html#Target-Macros" accesskey="n" rel="next">Target Macros</a>, Previous: <a href="Loop-Analysis-and-Representation.html#Loop-Analysis-and-Representation" accesskey="p" rel="prev">Loop Analysis and Representation</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  65. </div>
  66. <hr>
  67. <a name="Machine-Descriptions"></a>
  68. <h2 class="chapter">17 Machine Descriptions</h2>
  69. <a name="index-machine-descriptions"></a>
  70. <p>A machine description has two parts: a file of instruction patterns
  71. (<samp>.md</samp> file) and a C header file of macro definitions.
  72. </p>
  73. <p>The <samp>.md</samp> file for a target machine contains a pattern for each
  74. instruction that the target machine supports (or at least each instruction
  75. that is worth telling the compiler about). It may also contain comments.
  76. A semicolon causes the rest of the line to be a comment, unless the semicolon
  77. is inside a quoted string.
  78. </p>
  79. <p>See the next chapter for information on the C header file.
  80. </p>
  81. <table class="menu" border="0" cellspacing="0">
  82. <tr><td align="left" valign="top">&bull; <a href="Overview.html#Overview" accesskey="1">Overview</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How the machine description is used.
  83. </td></tr>
  84. <tr><td align="left" valign="top">&bull; <a href="Patterns.html#Patterns" accesskey="2">Patterns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to write instruction patterns.
  85. </td></tr>
  86. <tr><td align="left" valign="top">&bull; <a href="Example.html#Example" accesskey="3">Example</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">An explained example of a <code>define_insn</code> pattern.
  87. </td></tr>
  88. <tr><td align="left" valign="top">&bull; <a href="RTL-Template.html#RTL-Template" accesskey="4">RTL Template</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The RTL template defines what insns match a pattern.
  89. </td></tr>
  90. <tr><td align="left" valign="top">&bull; <a href="Output-Template.html#Output-Template" accesskey="5">Output Template</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The output template says how to make assembler code
  91. from such an insn.
  92. </td></tr>
  93. <tr><td align="left" valign="top">&bull; <a href="Output-Statement.html#Output-Statement" accesskey="6">Output Statement</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">For more generality, write C code to output
  94. the assembler code.
  95. </td></tr>
  96. <tr><td align="left" valign="top">&bull; <a href="Predicates.html#Predicates" accesskey="7">Predicates</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Controlling what kinds of operands can be used
  97. for an insn.
  98. </td></tr>
  99. <tr><td align="left" valign="top">&bull; <a href="Constraints.html#Constraints" accesskey="8">Constraints</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Fine-tuning operand selection.
  100. </td></tr>
  101. <tr><td align="left" valign="top">&bull; <a href="Standard-Names.html#Standard-Names" accesskey="9">Standard Names</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Names mark patterns to use for code generation.
  102. </td></tr>
  103. <tr><td align="left" valign="top">&bull; <a href="Pattern-Ordering.html#Pattern-Ordering">Pattern Ordering</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">When the order of patterns makes a difference.
  104. </td></tr>
  105. <tr><td align="left" valign="top">&bull; <a href="Dependent-Patterns.html#Dependent-Patterns">Dependent Patterns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Having one pattern may make you need another.
  106. </td></tr>
  107. <tr><td align="left" valign="top">&bull; <a href="Jump-Patterns.html#Jump-Patterns">Jump Patterns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Special considerations for patterns for jump insns.
  108. </td></tr>
  109. <tr><td align="left" valign="top">&bull; <a href="Looping-Patterns.html#Looping-Patterns">Looping Patterns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">How to define patterns for special looping insns.
  110. </td></tr>
  111. <tr><td align="left" valign="top">&bull; <a href="Insn-Canonicalizations.html#Insn-Canonicalizations">Insn Canonicalizations</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Canonicalization of Instructions
  112. </td></tr>
  113. <tr><td align="left" valign="top">&bull; <a href="Expander-Definitions.html#Expander-Definitions">Expander Definitions</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Generating a sequence of several RTL insns
  114. for a standard operation.
  115. </td></tr>
  116. <tr><td align="left" valign="top">&bull; <a href="Insn-Splitting.html#Insn-Splitting">Insn Splitting</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Splitting Instructions into Multiple Instructions.
  117. </td></tr>
  118. <tr><td align="left" valign="top">&bull; <a href="Including-Patterns.html#Including-Patterns">Including Patterns</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Including Patterns in Machine Descriptions.
  119. </td></tr>
  120. <tr><td align="left" valign="top">&bull; <a href="Peephole-Definitions.html#Peephole-Definitions">Peephole Definitions</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Defining machine-specific peephole optimizations.
  121. </td></tr>
  122. <tr><td align="left" valign="top">&bull; <a href="Insn-Attributes.html#Insn-Attributes">Insn Attributes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Specifying the value of attributes for generated insns.
  123. </td></tr>
  124. <tr><td align="left" valign="top">&bull; <a href="Conditional-Execution.html#Conditional-Execution">Conditional Execution</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Generating <code>define_insn</code> patterns for
  125. predication.
  126. </td></tr>
  127. <tr><td align="left" valign="top">&bull; <a href="Define-Subst.html#Define-Subst">Define Subst</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Generating <code>define_insn</code> and <code>define_expand</code>
  128. patterns from other patterns.
  129. </td></tr>
  130. <tr><td align="left" valign="top">&bull; <a href="Constant-Definitions.html#Constant-Definitions">Constant Definitions</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Defining symbolic constants that can be used in the
  131. md file.
  132. </td></tr>
  133. <tr><td align="left" valign="top">&bull; <a href="Iterators.html#Iterators">Iterators</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Using iterators to generate patterns from a template.
  134. </td></tr>
  135. </table>
  136. <hr>
  137. <div class="header">
  138. <p>
  139. Next: <a href="Target-Macros.html#Target-Macros" accesskey="n" rel="next">Target Macros</a>, Previous: <a href="Loop-Analysis-and-Representation.html#Loop-Analysis-and-Representation" accesskey="p" rel="prev">Loop Analysis and Representation</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  140. </div>
  141. </body>
  142. </html>