You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TILE_002dGx-Modifiers.html 9.3KB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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>TILE-Gx Modifiers (Using as)</title>
  16. <meta name="description" content="TILE-Gx Modifiers (Using as)">
  17. <meta name="keywords" content="TILE-Gx 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="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.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="TILE_002dGx-Modifiers"></a>
  57. <div class="header">
  58. <p>
  59. 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>
  60. </div>
  61. <hr>
  62. <a name="Symbolic-Operand-Modifiers-4"></a>
  63. <h4 class="subsubsection">9.47.2.3 Symbolic Operand Modifiers</h4>
  64. <a name="index-TILE_002dGx-modifiers"></a>
  65. <a name="index-symbol-modifiers_002c-TILE_002dGx"></a>
  66. <p>The assembler supports several modifiers when using symbol addresses
  67. in TILE-Gx 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>hw0</code></dt>
  76. <dd>
  77. <p>This modifier is used to load bits 0-15 of the symbol&rsquo;s address.
  78. </p>
  79. </dd>
  80. <dt><code>hw1</code></dt>
  81. <dd>
  82. <p>This modifier is used to load bits 16-31 of the symbol&rsquo;s address.
  83. </p>
  84. </dd>
  85. <dt><code>hw2</code></dt>
  86. <dd>
  87. <p>This modifier is used to load bits 32-47 of the symbol&rsquo;s address.
  88. </p>
  89. </dd>
  90. <dt><code>hw3</code></dt>
  91. <dd>
  92. <p>This modifier is used to load bits 48-63 of the symbol&rsquo;s address.
  93. </p>
  94. </dd>
  95. <dt><code>hw0_last</code></dt>
  96. <dd>
  97. <p>This modifier yields the same value as <code>hw0</code>, but it also checks
  98. that the value does not overflow.
  99. </p>
  100. </dd>
  101. <dt><code>hw1_last</code></dt>
  102. <dd>
  103. <p>This modifier yields the same value as <code>hw1</code>, but it also checks
  104. that the value does not overflow.
  105. </p>
  106. </dd>
  107. <dt><code>hw2_last</code></dt>
  108. <dd>
  109. <p>This modifier yields the same value as <code>hw2</code>, but it also checks
  110. that the value does not overflow.
  111. </p>
  112. <p>A 48-bit symbolic value is constructed by using the following idiom:
  113. </p>
  114. <div class="smallexample">
  115. <pre class="smallexample">moveli r0, hw2_last(sym)
  116. shl16insli r0, r0, hw1(sym)
  117. shl16insli r0, r0, hw0(sym)
  118. </pre></div>
  119. </dd>
  120. <dt><code>hw0_got</code></dt>
  121. <dd>
  122. <p>This modifier is used to load bits 0-15 of the symbol&rsquo;s offset in the
  123. GOT entry corresponding to the symbol.
  124. </p>
  125. </dd>
  126. <dt><code>hw0_last_got</code></dt>
  127. <dd>
  128. <p>This modifier yields the same value as <code>hw0_got</code>, but it also
  129. checks that the value does not overflow.
  130. </p>
  131. </dd>
  132. <dt><code>hw1_last_got</code></dt>
  133. <dd>
  134. <p>This modifier is used to load bits 16-31 of the symbol&rsquo;s offset in the
  135. GOT entry corresponding to the symbol, and it also checks that the
  136. value does not overflow.
  137. </p>
  138. </dd>
  139. <dt><code>plt</code></dt>
  140. <dd>
  141. <p>This modifier is used for function symbols. It causes a
  142. <em>procedure linkage table</em>, an array of code stubs, to be created
  143. at the time the shared object is created or linked against, together
  144. with a global offset table entry. The value is a pc-relative offset
  145. to the corresponding stub code in the procedure linkage table. This
  146. arrangement causes the run-time symbol resolver to be called to look
  147. up and set the value of the symbol the first time the function is
  148. called (at latest; depending environment variables). It is only safe
  149. to leave the symbol unresolved this way if all references are function
  150. calls.
  151. </p>
  152. </dd>
  153. <dt><code>hw0_plt</code></dt>
  154. <dd>
  155. <p>This modifier is used to load bits 0-15 of the pc-relative address of
  156. a plt entry.
  157. </p>
  158. </dd>
  159. <dt><code>hw1_plt</code></dt>
  160. <dd>
  161. <p>This modifier is used to load bits 16-31 of the pc-relative address of
  162. a plt entry.
  163. </p>
  164. </dd>
  165. <dt><code>hw1_last_plt</code></dt>
  166. <dd>
  167. <p>This modifier yields the same value as <code>hw1_plt</code>, but it also
  168. checks that the value does not overflow.
  169. </p>
  170. </dd>
  171. <dt><code>hw2_last_plt</code></dt>
  172. <dd>
  173. <p>This modifier is used to load bits 32-47 of the pc-relative address of
  174. a plt entry, and it also checks that the value does not overflow.
  175. </p>
  176. </dd>
  177. <dt><code>hw0_tls_gd</code></dt>
  178. <dd>
  179. <p>This modifier is used to load bits 0-15 of the offset of the GOT entry
  180. of the symbol&rsquo;s TLS descriptor, to be used for general-dynamic TLS
  181. accesses.
  182. </p>
  183. </dd>
  184. <dt><code>hw0_last_tls_gd</code></dt>
  185. <dd>
  186. <p>This modifier yields the same value as <code>hw0_tls_gd</code>, but it also
  187. checks that the value does not overflow.
  188. </p>
  189. </dd>
  190. <dt><code>hw1_last_tls_gd</code></dt>
  191. <dd>
  192. <p>This modifier is used to load bits 16-31 of the offset of the GOT
  193. entry of the symbol&rsquo;s TLS descriptor, to be used for general-dynamic
  194. TLS accesses. It also checks that the value does not overflow.
  195. </p>
  196. </dd>
  197. <dt><code>hw0_tls_ie</code></dt>
  198. <dd>
  199. <p>This modifier is used to load bits 0-15 of the offset of the GOT entry
  200. containing the offset of the symbol&rsquo;s address from the TCB, to be used
  201. for initial-exec TLS accesses.
  202. </p>
  203. </dd>
  204. <dt><code>hw0_last_tls_ie</code></dt>
  205. <dd>
  206. <p>This modifier yields the same value as <code>hw0_tls_ie</code>, but it also
  207. checks that the value does not overflow.
  208. </p>
  209. </dd>
  210. <dt><code>hw1_last_tls_ie</code></dt>
  211. <dd>
  212. <p>This modifier is used to load bits 16-31 of the offset of the GOT
  213. entry containing the offset of the symbol&rsquo;s address from the TCB, to
  214. be used for initial-exec TLS accesses. It also checks that the value
  215. does not overflow.
  216. </p>
  217. </dd>
  218. <dt><code>hw0_tls_le</code></dt>
  219. <dd>
  220. <p>This modifier is used to load bits 0-15 of the offset of the symbol&rsquo;s
  221. address from the TCB, to be used for local-exec TLS accesses.
  222. </p>
  223. </dd>
  224. <dt><code>hw0_last_tls_le</code></dt>
  225. <dd>
  226. <p>This modifier yields the same value as <code>hw0_tls_le</code>, but it also
  227. checks that the value does not overflow.
  228. </p>
  229. </dd>
  230. <dt><code>hw1_last_tls_le</code></dt>
  231. <dd>
  232. <p>This modifier is used to load bits 16-31 of the offset of the symbol&rsquo;s
  233. address from the TCB, to be used for local-exec TLS accesses. It
  234. also checks that the value does not overflow.
  235. </p>
  236. </dd>
  237. <dt><code>tls_gd_call</code></dt>
  238. <dd>
  239. <p>This modifier is used to tag an instruction as the &ldquo;call&rdquo; part of a
  240. calling sequence for a TLS GD reference of its operand.
  241. </p>
  242. </dd>
  243. <dt><code>tls_gd_add</code></dt>
  244. <dd>
  245. <p>This modifier is used to tag an instruction as the &ldquo;add&rdquo; part of a
  246. calling sequence for a TLS GD reference of its operand.
  247. </p>
  248. </dd>
  249. <dt><code>tls_ie_load</code></dt>
  250. <dd>
  251. <p>This modifier is used to tag an instruction as the &ldquo;load&rdquo; part of a
  252. calling sequence for a TLS IE reference of its operand.
  253. </p>
  254. </dd>
  255. </dl>
  256. <hr>
  257. <div class="header">
  258. <p>
  259. 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>
  260. </div>
  261. </body>
  262. </html>