Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

231 lines
10KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- This file documents the GNU Assembler "as".
  4. Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3
  7. or any later version published by the Free Software Foundation;
  8. with no Invariant Sections, with no Front-Cover Texts, and with no
  9. Back-Cover Texts. A copy of the license is included in the
  10. section entitled "GNU Free Documentation License".
  11. -->
  12. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>Alpha Directives (Using as)</title>
  16. <meta name="description" content="Alpha Directives (Using as)">
  17. <meta name="keywords" content="Alpha Directives (Using as)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="Alpha_002dDependent.html#Alpha_002dDependent" rel="up" title="Alpha-Dependent">
  25. <link href="Alpha-Opcodes.html#Alpha-Opcodes" rel="next" title="Alpha Opcodes">
  26. <link href="Alpha-Floating-Point.html#Alpha-Floating-Point" rel="prev" title="Alpha Floating Point">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="Alpha-Directives"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="Alpha-Opcodes.html#Alpha-Opcodes" accesskey="n" rel="next">Alpha Opcodes</a>, Previous: <a href="Alpha-Floating-Point.html#Alpha-Floating-Point" accesskey="p" rel="prev">Alpha Floating Point</a>, Up: <a href="Alpha_002dDependent.html#Alpha_002dDependent" accesskey="u" rel="up">Alpha-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  60. </div>
  61. <hr>
  62. <a name="Alpha-Assembler-Directives"></a>
  63. <h4 class="subsection">9.2.5 Alpha Assembler Directives</h4>
  64. <p><code>as</code> for the Alpha supports many additional directives for
  65. compatibility with the native assembler. This section describes them only
  66. briefly.
  67. </p>
  68. <a name="index-Alpha_002donly-directives"></a>
  69. <p>These are the additional directives in <code>as</code> for the Alpha:
  70. </p>
  71. <dl compact="compact">
  72. <dt><code>.arch <var>cpu</var></code></dt>
  73. <dd><p>Specifies the target processor. This is equivalent to the
  74. <samp>-m<var>cpu</var></samp> command-line option. See <a href="Alpha-Options.html#Alpha-Options">Options</a>,
  75. for a list of values for <var>cpu</var>.
  76. </p>
  77. </dd>
  78. <dt><code>.ent <var>function</var>[, <var>n</var>]</code></dt>
  79. <dd><p>Mark the beginning of <var>function</var>. An optional number may follow for
  80. compatibility with the OSF/1 assembler, but is ignored. When generating
  81. <code>.mdebug</code> information, this will create a procedure descriptor for
  82. the function. In ELF, it will mark the symbol as a function a-la the
  83. generic <code>.type</code> directive.
  84. </p>
  85. </dd>
  86. <dt><code>.end <var>function</var></code></dt>
  87. <dd><p>Mark the end of <var>function</var>. In ELF, it will set the size of the symbol
  88. a-la the generic <code>.size</code> directive.
  89. </p>
  90. </dd>
  91. <dt><code>.mask <var>mask</var>, <var>offset</var></code></dt>
  92. <dd><p>Indicate which of the integer registers are saved in the current
  93. function&rsquo;s stack frame. <var>mask</var> is interpreted a bit mask in which
  94. bit <var>n</var> set indicates that register <var>n</var> is saved. The registers
  95. are saved in a block located <var>offset</var> bytes from the <em>canonical
  96. frame address</em> (CFA) which is the value of the stack pointer on entry to
  97. the function. The registers are saved sequentially, except that the
  98. return address register (normally <code>$26</code>) is saved first.
  99. </p>
  100. <p>This and the other directives that describe the stack frame are
  101. currently only used when generating <code>.mdebug</code> information. They
  102. may in the future be used to generate DWARF2 <code>.debug_frame</code> unwind
  103. information for hand written assembly.
  104. </p>
  105. </dd>
  106. <dt><code>.fmask <var>mask</var>, <var>offset</var></code></dt>
  107. <dd><p>Indicate which of the floating-point registers are saved in the current
  108. stack frame. The <var>mask</var> and <var>offset</var> parameters are interpreted
  109. as with <code>.mask</code>.
  110. </p>
  111. </dd>
  112. <dt><code>.frame <var>framereg</var>, <var>frameoffset</var>, <var>retreg</var>[, <var>argoffset</var>]</code></dt>
  113. <dd><p>Describes the shape of the stack frame. The frame pointer in use is
  114. <var>framereg</var>; normally this is either <code>$fp</code> or <code>$sp</code>. The
  115. frame pointer is <var>frameoffset</var> bytes below the CFA. The return
  116. address is initially located in <var>retreg</var> until it is saved as
  117. indicated in <code>.mask</code>. For compatibility with OSF/1 an optional
  118. <var>argoffset</var> parameter is accepted and ignored. It is believed to
  119. indicate the offset from the CFA to the saved argument registers.
  120. </p>
  121. </dd>
  122. <dt><code>.prologue <var>n</var></code></dt>
  123. <dd><p>Indicate that the stack frame is set up and all registers have been
  124. spilled. The argument <var>n</var> indicates whether and how the function
  125. uses the incoming <em>procedure vector</em> (the address of the called
  126. function) in <code>$27</code>. 0 indicates that <code>$27</code> is not used; 1
  127. indicates that the first two instructions of the function use <code>$27</code>
  128. to perform a load of the GP register; 2 indicates that <code>$27</code> is
  129. used in some non-standard way and so the linker cannot elide the load of
  130. the procedure vector during relaxation.
  131. </p>
  132. </dd>
  133. <dt><code>.usepv <var>function</var>, <var>which</var></code></dt>
  134. <dd><p>Used to indicate the use of the <code>$27</code> register, similar to
  135. <code>.prologue</code>, but without the other semantics of needing to
  136. be inside an open <code>.ent</code>/<code>.end</code> block.
  137. </p>
  138. <p>The <var>which</var> argument should be either <code>no</code>, indicating that
  139. <code>$27</code> is not used, or <code>std</code>, indicating that the first two
  140. instructions of the function perform a GP load.
  141. </p>
  142. <p>One might use this directive instead of <code>.prologue</code> if you are
  143. also using dwarf2 CFI directives.
  144. </p>
  145. </dd>
  146. <dt><code>.gprel32 <var>expression</var></code></dt>
  147. <dd><p>Computes the difference between the address in <var>expression</var> and the
  148. GP for the current object file, and stores it in 4 bytes. In addition
  149. to being smaller than a full 8 byte address, this also does not require
  150. a dynamic relocation when used in a shared library.
  151. </p>
  152. </dd>
  153. <dt><code>.t_floating <var>expression</var></code></dt>
  154. <dd><p>Stores <var>expression</var> as an <small>IEEE</small> double precision value.
  155. </p>
  156. </dd>
  157. <dt><code>.s_floating <var>expression</var></code></dt>
  158. <dd><p>Stores <var>expression</var> as an <small>IEEE</small> single precision value.
  159. </p>
  160. </dd>
  161. <dt><code>.f_floating <var>expression</var></code></dt>
  162. <dd><p>Stores <var>expression</var> as a VAX F format value.
  163. </p>
  164. </dd>
  165. <dt><code>.g_floating <var>expression</var></code></dt>
  166. <dd><p>Stores <var>expression</var> as a VAX G format value.
  167. </p>
  168. </dd>
  169. <dt><code>.d_floating <var>expression</var></code></dt>
  170. <dd><p>Stores <var>expression</var> as a VAX D format value.
  171. </p>
  172. </dd>
  173. <dt><code>.set <var>feature</var></code></dt>
  174. <dd><p>Enables or disables various assembler features. Using the positive
  175. name of the feature enables while using &lsquo;<samp>no<var>feature</var></samp>&rsquo; disables.
  176. </p>
  177. <dl compact="compact">
  178. <dt><code>at</code></dt>
  179. <dd><p>Indicates that macro expansions may clobber the <em>assembler
  180. temporary</em> (<code>$at</code> or <code>$28</code>) register. Some macros may not be
  181. expanded without this and will generate an error message if <code>noat</code>
  182. is in effect. When <code>at</code> is in effect, a warning will be generated
  183. if <code>$at</code> is used by the programmer.
  184. </p>
  185. </dd>
  186. <dt><code>macro</code></dt>
  187. <dd><p>Enables the expansion of macro instructions. Note that variants of real
  188. instructions, such as <code>br label</code> vs <code>br $31,label</code> are
  189. considered alternate forms and not macros.
  190. </p>
  191. </dd>
  192. <dt><code>move</code></dt>
  193. <dt><code>reorder</code></dt>
  194. <dt><code>volatile</code></dt>
  195. <dd><p>These control whether and how the assembler may re-order instructions.
  196. Accepted for compatibility with the OSF/1 assembler, but <code>as</code>
  197. does not do instruction scheduling, so these features are ignored.
  198. </p></dd>
  199. </dl>
  200. </dd>
  201. </dl>
  202. <p>The following directives are recognized for compatibility with the OSF/1
  203. assembler but are ignored.
  204. </p>
  205. <div class="example">
  206. <pre class="example">.proc .aproc
  207. .reguse .livereg
  208. .option .aent
  209. .ugen .eflag
  210. .alias .noalias
  211. </pre></div>
  212. <hr>
  213. <div class="header">
  214. <p>
  215. Next: <a href="Alpha-Opcodes.html#Alpha-Opcodes" accesskey="n" rel="next">Alpha Opcodes</a>, Previous: <a href="Alpha-Floating-Point.html#Alpha-Floating-Point" accesskey="p" rel="prev">Alpha Floating Point</a>, Up: <a href="Alpha_002dDependent.html#Alpha_002dDependent" accesskey="u" rel="up">Alpha-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  216. </div>
  217. </body>
  218. </html>