No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

256 líneas
9.0KB

  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>TILEPro Modifiers (Using as)</title>
  16. <meta name="description" content="TILEPro Modifiers (Using as)">
  17. <meta name="keywords" content="TILEPro Modifiers (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="TILEPro-Syntax.html#TILEPro-Syntax" rel="up" title="TILEPro Syntax">
  25. <link href="TILEPro-Directives.html#TILEPro-Directives" rel="next" title="TILEPro Directives">
  26. <link href="TILEPro-Registers.html#TILEPro-Registers" rel="prev" title="TILEPro Registers">
  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="TILEPro-Modifiers"></a>
  57. <div class="header">
  58. <p>
  59. Previous: <a href="TILEPro-Registers.html#TILEPro-Registers" accesskey="p" rel="prev">TILEPro Registers</a>, Up: <a href="TILEPro-Syntax.html#TILEPro-Syntax" accesskey="u" rel="up">TILEPro Syntax</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="Symbolic-Operand-Modifiers-5"></a>
  63. <h4 class="subsubsection">9.48.2.3 Symbolic Operand Modifiers</h4>
  64. <a name="index-TILEPro-modifiers"></a>
  65. <a name="index-symbol-modifiers_002c-TILEPro"></a>
  66. <p>The assembler supports several modifiers when using symbol addresses
  67. in TILEPro instruction operands. The general syntax is the following:
  68. </p>
  69. <div class="smallexample">
  70. <pre class="smallexample">modifier(symbol)
  71. </pre></div>
  72. <p>The following modifiers are supported:
  73. </p>
  74. <dl compact="compact">
  75. <dt><code>lo16</code></dt>
  76. <dd>
  77. <p>This modifier is used to load the low 16 bits of the symbol&rsquo;s address,
  78. sign-extended to a 32-bit value (sign-extension allows it to be
  79. range-checked against signed 16 bit immediate operands without
  80. complaint).
  81. </p>
  82. </dd>
  83. <dt><code>hi16</code></dt>
  84. <dd>
  85. <p>This modifier is used to load the high 16 bits of the symbol&rsquo;s
  86. address, also sign-extended to a 32-bit value.
  87. </p>
  88. </dd>
  89. <dt><code>ha16</code></dt>
  90. <dd>
  91. <p><code>ha16(N)</code> is identical to <code>hi16(N)</code>, except if
  92. <code>lo16(N)</code> is negative it adds one to the <code>hi16(N)</code>
  93. value. This way <code>lo16</code> and <code>ha16</code> can be added to create any
  94. 32-bit value using <code>auli</code>. For example, here is how you move an
  95. arbitrary 32-bit address into r3:
  96. </p>
  97. <div class="smallexample">
  98. <pre class="smallexample">moveli r3, lo16(sym)
  99. auli r3, r3, ha16(sym)
  100. </pre></div>
  101. </dd>
  102. <dt><code>got</code></dt>
  103. <dd>
  104. <p>This modifier is used to load the offset of the GOT entry
  105. corresponding to the symbol.
  106. </p>
  107. </dd>
  108. <dt><code>got_lo16</code></dt>
  109. <dd>
  110. <p>This modifier is used to load the sign-extended low 16 bits of the
  111. offset of the GOT entry corresponding to the symbol.
  112. </p>
  113. </dd>
  114. <dt><code>got_hi16</code></dt>
  115. <dd>
  116. <p>This modifier is used to load the sign-extended high 16 bits of the
  117. offset of the GOT entry corresponding to the symbol.
  118. </p>
  119. </dd>
  120. <dt><code>got_ha16</code></dt>
  121. <dd>
  122. <p>This modifier is like <code>got_hi16</code>, but it adds one if
  123. <code>got_lo16</code> of the input value is negative.
  124. </p>
  125. </dd>
  126. <dt><code>plt</code></dt>
  127. <dd>
  128. <p>This modifier is used for function symbols. It causes a
  129. <em>procedure linkage table</em>, an array of code stubs, to be created
  130. at the time the shared object is created or linked against, together
  131. with a global offset table entry. The value is a pc-relative offset
  132. to the corresponding stub code in the procedure linkage table. This
  133. arrangement causes the run-time symbol resolver to be called to look
  134. up and set the value of the symbol the first time the function is
  135. called (at latest; depending environment variables). It is only safe
  136. to leave the symbol unresolved this way if all references are function
  137. calls.
  138. </p>
  139. </dd>
  140. <dt><code>tls_gd</code></dt>
  141. <dd>
  142. <p>This modifier is used to load the offset of the GOT entry of the
  143. symbol&rsquo;s TLS descriptor, to be used for general-dynamic TLS accesses.
  144. </p>
  145. </dd>
  146. <dt><code>tls_gd_lo16</code></dt>
  147. <dd>
  148. <p>This modifier is used to load the sign-extended low 16 bits of the
  149. offset of the GOT entry of the symbol&rsquo;s TLS descriptor, to be used for
  150. general dynamic TLS accesses.
  151. </p>
  152. </dd>
  153. <dt><code>tls_gd_hi16</code></dt>
  154. <dd>
  155. <p>This modifier is used to load the sign-extended high 16 bits of the
  156. offset of the GOT entry of the symbol&rsquo;s TLS descriptor, to be used for
  157. general dynamic TLS accesses.
  158. </p>
  159. </dd>
  160. <dt><code>tls_gd_ha16</code></dt>
  161. <dd>
  162. <p>This modifier is like <code>tls_gd_hi16</code>, but it adds one to the value
  163. if <code>tls_gd_lo16</code> of the input value is negative.
  164. </p>
  165. </dd>
  166. <dt><code>tls_ie</code></dt>
  167. <dd>
  168. <p>This modifier is used to load the offset of the GOT entry containing
  169. the offset of the symbol&rsquo;s address from the TCB, to be used for
  170. initial-exec TLS accesses.
  171. </p>
  172. </dd>
  173. <dt><code>tls_ie_lo16</code></dt>
  174. <dd>
  175. <p>This modifier is used to load the low 16 bits of the offset of the GOT
  176. entry containing the offset of the symbol&rsquo;s address from the TCB, to
  177. be used for initial-exec TLS accesses.
  178. </p>
  179. </dd>
  180. <dt><code>tls_ie_hi16</code></dt>
  181. <dd>
  182. <p>This modifier is used to load the high 16 bits of the offset of the
  183. GOT entry containing the offset of the symbol&rsquo;s address from the TCB,
  184. to be used for initial-exec TLS accesses.
  185. </p>
  186. </dd>
  187. <dt><code>tls_ie_ha16</code></dt>
  188. <dd>
  189. <p>This modifier is like <code>tls_ie_hi16</code>, but it adds one to the value
  190. if <code>tls_ie_lo16</code> of the input value is negative.
  191. </p>
  192. </dd>
  193. <dt><code>tls_le</code></dt>
  194. <dd>
  195. <p>This modifier is used to load the offset of the symbol&rsquo;s address from
  196. the TCB, to be used for local-exec TLS accesses.
  197. </p>
  198. </dd>
  199. <dt><code>tls_le_lo16</code></dt>
  200. <dd>
  201. <p>This modifier is used to load the low 16 bits of the offset of the
  202. symbol&rsquo;s address from the TCB, to be used for local-exec TLS accesses.
  203. </p>
  204. </dd>
  205. <dt><code>tls_le_hi16</code></dt>
  206. <dd>
  207. <p>This modifier is used to load the high 16 bits of the offset of the
  208. symbol&rsquo;s address from the TCB, to be used for local-exec TLS accesses.
  209. </p>
  210. </dd>
  211. <dt><code>tls_le_ha16</code></dt>
  212. <dd>
  213. <p>This modifier is like <code>tls_le_hi16</code>, but it adds one to the value
  214. if <code>tls_le_lo16</code> of the input value is negative.
  215. </p>
  216. </dd>
  217. <dt><code>tls_gd_call</code></dt>
  218. <dd>
  219. <p>This modifier is used to tag an instruction as the &ldquo;call&rdquo; part of a
  220. calling sequence for a TLS GD reference of its operand.
  221. </p>
  222. </dd>
  223. <dt><code>tls_gd_add</code></dt>
  224. <dd>
  225. <p>This modifier is used to tag an instruction as the &ldquo;add&rdquo; part of a
  226. calling sequence for a TLS GD reference of its operand.
  227. </p>
  228. </dd>
  229. <dt><code>tls_ie_load</code></dt>
  230. <dd>
  231. <p>This modifier is used to tag an instruction as the &ldquo;load&rdquo; part of a
  232. calling sequence for a TLS IE reference of its operand.
  233. </p>
  234. </dd>
  235. </dl>
  236. <hr>
  237. <div class="header">
  238. <p>
  239. Previous: <a href="TILEPro-Registers.html#TILEPro-Registers" accesskey="p" rel="prev">TILEPro Registers</a>, Up: <a href="TILEPro-Syntax.html#TILEPro-Syntax" accesskey="u" rel="up">TILEPro Syntax</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>
  240. </div>
  241. </body>
  242. </html>