TILE_002dGx-Modifiers.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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-2017 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 5.2, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <title>Using as: TILE-Gx Modifiers</title>
  15. <meta name="description" content="Using as: TILE-Gx Modifiers">
  16. <meta name="keywords" content="Using as: TILE-Gx Modifiers">
  17. <meta name="resource-type" content="document">
  18. <meta name="distribution" content="global">
  19. <meta name="Generator" content="makeinfo">
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  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="TILE_002dGx-Syntax.html#TILE_002dGx-Syntax" rel="up" title="TILE-Gx Syntax">
  25. <link href="TILE_002dGx-Directives.html#TILE_002dGx-Directives" rel="next" title="TILE-Gx Directives">
  26. <link href="TILE_002dGx-Registers.html#TILE_002dGx-Registers" rel="prev" title="TILE-Gx Registers">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.smallquotation {font-size: smaller}
  31. div.display {margin-left: 3.2em}
  32. div.example {margin-left: 3.2em}
  33. div.indentedblock {margin-left: 3.2em}
  34. div.lisp {margin-left: 3.2em}
  35. div.smalldisplay {margin-left: 3.2em}
  36. div.smallexample {margin-left: 3.2em}
  37. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  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.nocodebreak {white-space:nowrap}
  49. span.nolinebreak {white-space:nowrap}
  50. span.roman {font-family:serif; font-weight:normal}
  51. span.sansserif {font-family:sans-serif; font-weight:normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  57. <a name="TILE_002dGx-Modifiers"></a>
  58. <div class="header">
  59. <p>
  60. Previous: <a href="TILE_002dGx-Registers.html#TILE_002dGx-Registers" accesskey="p" rel="prev">TILE-Gx Registers</a>, Up: <a href="TILE_002dGx-Syntax.html#TILE_002dGx-Syntax" accesskey="u" rel="up">TILE-Gx 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>
  61. </div>
  62. <hr>
  63. <a name="Symbolic-Operand-Modifiers-4"></a>
  64. <h4 class="subsubsection">9.46.2.3 Symbolic Operand Modifiers</h4>
  65. <a name="index-TILE_002dGx-modifiers"></a>
  66. <a name="index-symbol-modifiers_002c-TILE_002dGx"></a>
  67. <p>The assembler supports several modifiers when using symbol addresses
  68. in TILE-Gx instruction operands. The general syntax is the following:
  69. </p>
  70. <div class="smallexample">
  71. <pre class="smallexample">modifier(symbol)
  72. </pre></div>
  73. <p>The following modifiers are supported:
  74. </p>
  75. <dl compact="compact">
  76. <dt><code>hw0</code></dt>
  77. <dd>
  78. <p>This modifier is used to load bits 0-15 of the symbol&rsquo;s address.
  79. </p>
  80. </dd>
  81. <dt><code>hw1</code></dt>
  82. <dd>
  83. <p>This modifier is used to load bits 16-31 of the symbol&rsquo;s address.
  84. </p>
  85. </dd>
  86. <dt><code>hw2</code></dt>
  87. <dd>
  88. <p>This modifier is used to load bits 32-47 of the symbol&rsquo;s address.
  89. </p>
  90. </dd>
  91. <dt><code>hw3</code></dt>
  92. <dd>
  93. <p>This modifier is used to load bits 48-63 of the symbol&rsquo;s address.
  94. </p>
  95. </dd>
  96. <dt><code>hw0_last</code></dt>
  97. <dd>
  98. <p>This modifier yields the same value as <code>hw0</code>, but it also checks
  99. that the value does not overflow.
  100. </p>
  101. </dd>
  102. <dt><code>hw1_last</code></dt>
  103. <dd>
  104. <p>This modifier yields the same value as <code>hw1</code>, but it also checks
  105. that the value does not overflow.
  106. </p>
  107. </dd>
  108. <dt><code>hw2_last</code></dt>
  109. <dd>
  110. <p>This modifier yields the same value as <code>hw2</code>, but it also checks
  111. that the value does not overflow.
  112. </p>
  113. <p>A 48-bit symbolic value is constructed by using the following idiom:
  114. </p>
  115. <div class="smallexample">
  116. <pre class="smallexample">moveli r0, hw2_last(sym)
  117. shl16insli r0, r0, hw1(sym)
  118. shl16insli r0, r0, hw0(sym)
  119. </pre></div>
  120. </dd>
  121. <dt><code>hw0_got</code></dt>
  122. <dd>
  123. <p>This modifier is used to load bits 0-15 of the symbol&rsquo;s offset in the
  124. GOT entry corresponding to the symbol.
  125. </p>
  126. </dd>
  127. <dt><code>hw0_last_got</code></dt>
  128. <dd>
  129. <p>This modifier yields the same value as <code>hw0_got</code>, but it also
  130. checks that the value does not overflow.
  131. </p>
  132. </dd>
  133. <dt><code>hw1_last_got</code></dt>
  134. <dd>
  135. <p>This modifier is used to load bits 16-31 of the symbol&rsquo;s offset in the
  136. GOT entry corresponding to the symbol, and it also checks that the
  137. value does not overflow.
  138. </p>
  139. </dd>
  140. <dt><code>plt</code></dt>
  141. <dd>
  142. <p>This modifier is used for function symbols. It causes a
  143. <em>procedure linkage table</em>, an array of code stubs, to be created
  144. at the time the shared object is created or linked against, together
  145. with a global offset table entry. The value is a pc-relative offset
  146. to the corresponding stub code in the procedure linkage table. This
  147. arrangement causes the run-time symbol resolver to be called to look
  148. up and set the value of the symbol the first time the function is
  149. called (at latest; depending environment variables). It is only safe
  150. to leave the symbol unresolved this way if all references are function
  151. calls.
  152. </p>
  153. </dd>
  154. <dt><code>hw0_plt</code></dt>
  155. <dd>
  156. <p>This modifier is used to load bits 0-15 of the pc-relative address of
  157. a plt entry.
  158. </p>
  159. </dd>
  160. <dt><code>hw1_plt</code></dt>
  161. <dd>
  162. <p>This modifier is used to load bits 16-31 of the pc-relative address of
  163. a plt entry.
  164. </p>
  165. </dd>
  166. <dt><code>hw1_last_plt</code></dt>
  167. <dd>
  168. <p>This modifier yields the same value as <code>hw1_plt</code>, but it also
  169. checks that the value does not overflow.
  170. </p>
  171. </dd>
  172. <dt><code>hw2_last_plt</code></dt>
  173. <dd>
  174. <p>This modifier is used to load bits 32-47 of the pc-relative address of
  175. a plt entry, and it also checks that the value does not overflow.
  176. </p>
  177. </dd>
  178. <dt><code>hw0_tls_gd</code></dt>
  179. <dd>
  180. <p>This modifier is used to load bits 0-15 of the offset of the GOT entry
  181. of the symbol&rsquo;s TLS descriptor, to be used for general-dynamic TLS
  182. accesses.
  183. </p>
  184. </dd>
  185. <dt><code>hw0_last_tls_gd</code></dt>
  186. <dd>
  187. <p>This modifier yields the same value as <code>hw0_tls_gd</code>, but it also
  188. checks that the value does not overflow.
  189. </p>
  190. </dd>
  191. <dt><code>hw1_last_tls_gd</code></dt>
  192. <dd>
  193. <p>This modifier is used to load bits 16-31 of the offset of the GOT
  194. entry of the symbol&rsquo;s TLS descriptor, to be used for general-dynamic
  195. TLS accesses. It also checks that the value does not overflow.
  196. </p>
  197. </dd>
  198. <dt><code>hw0_tls_ie</code></dt>
  199. <dd>
  200. <p>This modifier is used to load bits 0-15 of the offset of the GOT entry
  201. containing the offset of the symbol&rsquo;s address from the TCB, to be used
  202. for initial-exec TLS accesses.
  203. </p>
  204. </dd>
  205. <dt><code>hw0_last_tls_ie</code></dt>
  206. <dd>
  207. <p>This modifier yields the same value as <code>hw0_tls_ie</code>, but it also
  208. checks that the value does not overflow.
  209. </p>
  210. </dd>
  211. <dt><code>hw1_last_tls_ie</code></dt>
  212. <dd>
  213. <p>This modifier is used to load bits 16-31 of the offset of the GOT
  214. entry containing the offset of the symbol&rsquo;s address from the TCB, to
  215. be used for initial-exec TLS accesses. It also checks that the value
  216. does not overflow.
  217. </p>
  218. </dd>
  219. <dt><code>hw0_tls_le</code></dt>
  220. <dd>
  221. <p>This modifier is used to load bits 0-15 of the offset of the symbol&rsquo;s
  222. address from the TCB, to be used for local-exec TLS accesses.
  223. </p>
  224. </dd>
  225. <dt><code>hw0_last_tls_le</code></dt>
  226. <dd>
  227. <p>This modifier yields the same value as <code>hw0_tls_le</code>, but it also
  228. checks that the value does not overflow.
  229. </p>
  230. </dd>
  231. <dt><code>hw1_last_tls_le</code></dt>
  232. <dd>
  233. <p>This modifier is used to load bits 16-31 of the offset of the symbol&rsquo;s
  234. address from the TCB, to be used for local-exec TLS accesses. It
  235. also checks that the value does not overflow.
  236. </p>
  237. </dd>
  238. <dt><code>tls_gd_call</code></dt>
  239. <dd>
  240. <p>This modifier is used to tag an instrution as the &ldquo;call&rdquo; part of a
  241. calling sequence for a TLS GD reference of its operand.
  242. </p>
  243. </dd>
  244. <dt><code>tls_gd_add</code></dt>
  245. <dd>
  246. <p>This modifier is used to tag an instruction as the &ldquo;add&rdquo; part of a
  247. calling sequence for a TLS GD reference of its operand.
  248. </p>
  249. </dd>
  250. <dt><code>tls_ie_load</code></dt>
  251. <dd>
  252. <p>This modifier is used to tag an instruction as the &ldquo;load&rdquo; part of a
  253. calling sequence for a TLS IE reference of its operand.
  254. </p>
  255. </dd>
  256. </dl>
  257. <hr>
  258. <div class="header">
  259. <p>
  260. Previous: <a href="TILE_002dGx-Registers.html#TILE_002dGx-Registers" accesskey="p" rel="prev">TILE-Gx Registers</a>, Up: <a href="TILE_002dGx-Syntax.html#TILE_002dGx-Syntax" accesskey="u" rel="up">TILE-Gx 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>
  261. </div>
  262. </body>
  263. </html>