Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

120 Zeilen
5.3KB

  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>Assembler (GNU Compiler Collection (GCC) Internals)</title>
  21. <meta name="description" content="Assembler (GNU Compiler Collection (GCC) Internals)">
  22. <meta name="keywords" content="Assembler (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="RTL.html#RTL" rel="up" title="RTL">
  30. <link href="Debug-Information.html#Debug-Information" rel="next" title="Debug Information">
  31. <link href="Incdec.html#Incdec" rel="prev" title="Incdec">
  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="Assembler"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Debug-Information.html#Debug-Information" accesskey="n" rel="next">Debug Information</a>, Previous: <a href="Incdec.html#Incdec" accesskey="p" rel="prev">Incdec</a>, Up: <a href="RTL.html#RTL" accesskey="u" rel="up">RTL</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="Assembler-Instructions-as-Expressions"></a>
  68. <h3 class="section">14.17 Assembler Instructions as Expressions</h3>
  69. <a name="index-assembler-instructions-in-RTL"></a>
  70. <a name="index-asm_005foperands_002c-usage"></a>
  71. <p>The RTX code <code>asm_operands</code> represents a value produced by a
  72. user-specified assembler instruction. It is used to represent
  73. an <code>asm</code> statement with arguments. An <code>asm</code> statement with
  74. a single output operand, like this:
  75. </p>
  76. <div class="smallexample">
  77. <pre class="smallexample">asm (&quot;foo %1,%2,%0&quot; : &quot;=a&quot; (outputvar) : &quot;g&quot; (x + y), &quot;di&quot; (*z));
  78. </pre></div>
  79. <p>is represented using a single <code>asm_operands</code> RTX which represents
  80. the value that is stored in <code>outputvar</code>:
  81. </p>
  82. <div class="smallexample">
  83. <pre class="smallexample">(set <var>rtx-for-outputvar</var>
  84. (asm_operands &quot;foo %1,%2,%0&quot; &quot;a&quot; 0
  85. [<var>rtx-for-addition-result</var> <var>rtx-for-*z</var>]
  86. [(asm_input:<var>m1</var> &quot;g&quot;)
  87. (asm_input:<var>m2</var> &quot;di&quot;)]))
  88. </pre></div>
  89. <p>Here the operands of the <code>asm_operands</code> RTX are the assembler
  90. template string, the output-operand&rsquo;s constraint, the index-number of the
  91. output operand among the output operands specified, a vector of input
  92. operand RTX&rsquo;s, and a vector of input-operand modes and constraints. The
  93. mode <var>m1</var> is the mode of the sum <code>x+y</code>; <var>m2</var> is that of
  94. <code>*z</code>.
  95. </p>
  96. <p>When an <code>asm</code> statement has multiple output values, its insn has
  97. several such <code>set</code> RTX&rsquo;s inside of a <code>parallel</code>. Each <code>set</code>
  98. contains an <code>asm_operands</code>; all of these share the same assembler
  99. template and vectors, but each contains the constraint for the respective
  100. output operand. They are also distinguished by the output-operand index
  101. number, which is 0, 1, &hellip; for successive output operands.
  102. </p>
  103. </body>
  104. </html>