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.

293 lines
12KB

  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>Special Accessors (GNU Compiler Collection (GCC) Internals)</title>
  21. <meta name="description" content="Special Accessors (GNU Compiler Collection (GCC) Internals)">
  22. <meta name="keywords" content="Special Accessors (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="Flags.html#Flags" rel="next" title="Flags">
  31. <link href="Accessors.html#Accessors" rel="prev" title="Accessors">
  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="Special-Accessors"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="Flags.html#Flags" accesskey="n" rel="next">Flags</a>, Previous: <a href="Accessors.html#Accessors" accesskey="p" rel="prev">Accessors</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="Access-to-Special-Operands"></a>
  68. <h3 class="section">14.4 Access to Special Operands</h3>
  69. <a name="index-access-to-special-operands"></a>
  70. <p>Some RTL nodes have special annotations associated with them.
  71. </p>
  72. <dl compact="compact">
  73. <dt><code>MEM</code></dt>
  74. <dd><dl compact="compact">
  75. <dd><a name="index-MEM_005fALIAS_005fSET"></a>
  76. </dd>
  77. <dt><code>MEM_ALIAS_SET (<var>x</var>)</code></dt>
  78. <dd><p>If 0, <var>x</var> is not in any alias set, and may alias anything. Otherwise,
  79. <var>x</var> can only alias <code>MEM</code>s in a conflicting alias set. This value
  80. is set in a language-dependent manner in the front-end, and should not be
  81. altered in the back-end. In some front-ends, these numbers may correspond
  82. in some way to types, or other language-level entities, but they need not,
  83. and the back-end makes no such assumptions.
  84. These set numbers are tested with <code>alias_sets_conflict_p</code>.
  85. </p>
  86. <a name="index-MEM_005fEXPR"></a>
  87. </dd>
  88. <dt><code>MEM_EXPR (<var>x</var>)</code></dt>
  89. <dd><p>If this register is known to hold the value of some user-level
  90. declaration, this is that tree node. It may also be a
  91. <code>COMPONENT_REF</code>, in which case this is some field reference,
  92. and <code>TREE_OPERAND (<var>x</var>, 0)</code> contains the declaration,
  93. or another <code>COMPONENT_REF</code>, or null if there is no compile-time
  94. object associated with the reference.
  95. </p>
  96. <a name="index-MEM_005fOFFSET_005fKNOWN_005fP"></a>
  97. </dd>
  98. <dt><code>MEM_OFFSET_KNOWN_P (<var>x</var>)</code></dt>
  99. <dd><p>True if the offset of the memory reference from <code>MEM_EXPR</code> is known.
  100. &lsquo;<samp>MEM_OFFSET (<var>x</var>)</samp>&rsquo; provides the offset if so.
  101. </p>
  102. <a name="index-MEM_005fOFFSET"></a>
  103. </dd>
  104. <dt><code>MEM_OFFSET (<var>x</var>)</code></dt>
  105. <dd><p>The offset from the start of <code>MEM_EXPR</code>. The value is only valid if
  106. &lsquo;<samp>MEM_OFFSET_KNOWN_P (<var>x</var>)</samp>&rsquo; is true.
  107. </p>
  108. <a name="index-MEM_005fSIZE_005fKNOWN_005fP"></a>
  109. </dd>
  110. <dt><code>MEM_SIZE_KNOWN_P (<var>x</var>)</code></dt>
  111. <dd><p>True if the size of the memory reference is known.
  112. &lsquo;<samp>MEM_SIZE (<var>x</var>)</samp>&rsquo; provides its size if so.
  113. </p>
  114. <a name="index-MEM_005fSIZE"></a>
  115. </dd>
  116. <dt><code>MEM_SIZE (<var>x</var>)</code></dt>
  117. <dd><p>The size in bytes of the memory reference.
  118. This is mostly relevant for <code>BLKmode</code> references as otherwise
  119. the size is implied by the mode. The value is only valid if
  120. &lsquo;<samp>MEM_SIZE_KNOWN_P (<var>x</var>)</samp>&rsquo; is true.
  121. </p>
  122. <a name="index-MEM_005fALIGN"></a>
  123. </dd>
  124. <dt><code>MEM_ALIGN (<var>x</var>)</code></dt>
  125. <dd><p>The known alignment in bits of the memory reference.
  126. </p>
  127. <a name="index-MEM_005fADDR_005fSPACE"></a>
  128. </dd>
  129. <dt><code>MEM_ADDR_SPACE (<var>x</var>)</code></dt>
  130. <dd><p>The address space of the memory reference. This will commonly be zero
  131. for the generic address space.
  132. </p></dd>
  133. </dl>
  134. </dd>
  135. <dt><code>REG</code></dt>
  136. <dd><dl compact="compact">
  137. <dd><a name="index-ORIGINAL_005fREGNO"></a>
  138. </dd>
  139. <dt><code>ORIGINAL_REGNO (<var>x</var>)</code></dt>
  140. <dd><p>This field holds the number the register &ldquo;originally&rdquo; had; for a
  141. pseudo register turned into a hard reg this will hold the old pseudo
  142. register number.
  143. </p>
  144. <a name="index-REG_005fEXPR"></a>
  145. </dd>
  146. <dt><code>REG_EXPR (<var>x</var>)</code></dt>
  147. <dd><p>If this register is known to hold the value of some user-level
  148. declaration, this is that tree node.
  149. </p>
  150. <a name="index-REG_005fOFFSET"></a>
  151. </dd>
  152. <dt><code>REG_OFFSET (<var>x</var>)</code></dt>
  153. <dd><p>If this register is known to hold the value of some user-level
  154. declaration, this is the offset into that logical storage.
  155. </p></dd>
  156. </dl>
  157. </dd>
  158. <dt><code>SYMBOL_REF</code></dt>
  159. <dd><dl compact="compact">
  160. <dd><a name="index-SYMBOL_005fREF_005fDECL"></a>
  161. </dd>
  162. <dt><code>SYMBOL_REF_DECL (<var>x</var>)</code></dt>
  163. <dd><p>If the <code>symbol_ref</code> <var>x</var> was created for a <code>VAR_DECL</code> or
  164. a <code>FUNCTION_DECL</code>, that tree is recorded here. If this value is
  165. null, then <var>x</var> was created by back end code generation routines,
  166. and there is no associated front end symbol table entry.
  167. </p>
  168. <p><code>SYMBOL_REF_DECL</code> may also point to a tree of class <code>'c'</code>,
  169. that is, some sort of constant. In this case, the <code>symbol_ref</code>
  170. is an entry in the per-file constant pool; again, there is no associated
  171. front end symbol table entry.
  172. </p>
  173. <a name="index-SYMBOL_005fREF_005fCONSTANT"></a>
  174. </dd>
  175. <dt><code>SYMBOL_REF_CONSTANT (<var>x</var>)</code></dt>
  176. <dd><p>If &lsquo;<samp>CONSTANT_POOL_ADDRESS_P (<var>x</var>)</samp>&rsquo; is true, this is the constant
  177. pool entry for <var>x</var>. It is null otherwise.
  178. </p>
  179. <a name="index-SYMBOL_005fREF_005fDATA"></a>
  180. </dd>
  181. <dt><code>SYMBOL_REF_DATA (<var>x</var>)</code></dt>
  182. <dd><p>A field of opaque type used to store <code>SYMBOL_REF_DECL</code> or
  183. <code>SYMBOL_REF_CONSTANT</code>.
  184. </p>
  185. <a name="index-SYMBOL_005fREF_005fFLAGS"></a>
  186. </dd>
  187. <dt><code>SYMBOL_REF_FLAGS (<var>x</var>)</code></dt>
  188. <dd><p>In a <code>symbol_ref</code>, this is used to communicate various predicates
  189. about the symbol. Some of these are common enough to be computed by
  190. common code, some are specific to the target. The common bits are:
  191. </p>
  192. <dl compact="compact">
  193. <dd><a name="index-SYMBOL_005fREF_005fFUNCTION_005fP"></a>
  194. <a name="index-SYMBOL_005fFLAG_005fFUNCTION"></a>
  195. </dd>
  196. <dt><code>SYMBOL_FLAG_FUNCTION</code></dt>
  197. <dd><p>Set if the symbol refers to a function.
  198. </p>
  199. <a name="index-SYMBOL_005fREF_005fLOCAL_005fP"></a>
  200. <a name="index-SYMBOL_005fFLAG_005fLOCAL"></a>
  201. </dd>
  202. <dt><code>SYMBOL_FLAG_LOCAL</code></dt>
  203. <dd><p>Set if the symbol is local to this &ldquo;module&rdquo;.
  204. See <code>TARGET_BINDS_LOCAL_P</code>.
  205. </p>
  206. <a name="index-SYMBOL_005fREF_005fEXTERNAL_005fP"></a>
  207. <a name="index-SYMBOL_005fFLAG_005fEXTERNAL"></a>
  208. </dd>
  209. <dt><code>SYMBOL_FLAG_EXTERNAL</code></dt>
  210. <dd><p>Set if this symbol is not defined in this translation unit.
  211. Note that this is not the inverse of <code>SYMBOL_FLAG_LOCAL</code>.
  212. </p>
  213. <a name="index-SYMBOL_005fREF_005fSMALL_005fP"></a>
  214. <a name="index-SYMBOL_005fFLAG_005fSMALL"></a>
  215. </dd>
  216. <dt><code>SYMBOL_FLAG_SMALL</code></dt>
  217. <dd><p>Set if the symbol is located in the small data section.
  218. See <code>TARGET_IN_SMALL_DATA_P</code>.
  219. </p>
  220. <a name="index-SYMBOL_005fFLAG_005fTLS_005fSHIFT"></a>
  221. <a name="index-SYMBOL_005fREF_005fTLS_005fMODEL"></a>
  222. </dd>
  223. <dt><code>SYMBOL_REF_TLS_MODEL (<var>x</var>)</code></dt>
  224. <dd><p>This is a multi-bit field accessor that returns the <code>tls_model</code>
  225. to be used for a thread-local storage symbol. It returns zero for
  226. non-thread-local symbols.
  227. </p>
  228. <a name="index-SYMBOL_005fREF_005fHAS_005fBLOCK_005fINFO_005fP"></a>
  229. <a name="index-SYMBOL_005fFLAG_005fHAS_005fBLOCK_005fINFO"></a>
  230. </dd>
  231. <dt><code>SYMBOL_FLAG_HAS_BLOCK_INFO</code></dt>
  232. <dd><p>Set if the symbol has <code>SYMBOL_REF_BLOCK</code> and
  233. <code>SYMBOL_REF_BLOCK_OFFSET</code> fields.
  234. </p>
  235. <a name="index-SYMBOL_005fREF_005fANCHOR_005fP"></a>
  236. <a name="index-SYMBOL_005fFLAG_005fANCHOR"></a>
  237. <a name="index-_002dfsection_002danchors"></a>
  238. </dd>
  239. <dt><code>SYMBOL_FLAG_ANCHOR</code></dt>
  240. <dd><p>Set if the symbol is used as a section anchor. &ldquo;Section anchors&rdquo;
  241. are symbols that have a known position within an <code>object_block</code>
  242. and that can be used to access nearby members of that block.
  243. They are used to implement <samp>-fsection-anchors</samp>.
  244. </p>
  245. <p>If this flag is set, then <code>SYMBOL_FLAG_HAS_BLOCK_INFO</code> will be too.
  246. </p></dd>
  247. </dl>
  248. <p>Bits beginning with <code>SYMBOL_FLAG_MACH_DEP</code> are available for
  249. the target&rsquo;s use.
  250. </p></dd>
  251. </dl>
  252. <a name="index-SYMBOL_005fREF_005fBLOCK"></a>
  253. </dd>
  254. <dt><code>SYMBOL_REF_BLOCK (<var>x</var>)</code></dt>
  255. <dd><p>If &lsquo;<samp>SYMBOL_REF_HAS_BLOCK_INFO_P (<var>x</var>)</samp>&rsquo;, this is the
  256. &lsquo;<samp>object_block</samp>&rsquo; structure to which the symbol belongs,
  257. or <code>NULL</code> if it has not been assigned a block.
  258. </p>
  259. <a name="index-SYMBOL_005fREF_005fBLOCK_005fOFFSET"></a>
  260. </dd>
  261. <dt><code>SYMBOL_REF_BLOCK_OFFSET (<var>x</var>)</code></dt>
  262. <dd><p>If &lsquo;<samp>SYMBOL_REF_HAS_BLOCK_INFO_P (<var>x</var>)</samp>&rsquo;, this is the offset of <var>x</var>
  263. from the first object in &lsquo;<samp>SYMBOL_REF_BLOCK (<var>x</var>)</samp>&rsquo;. The value is
  264. negative if <var>x</var> has not yet been assigned to a block, or it has not
  265. been given an offset within that block.
  266. </p></dd>
  267. </dl>
  268. <hr>
  269. <div class="header">
  270. <p>
  271. Next: <a href="Flags.html#Flags" accesskey="n" rel="next">Flags</a>, Previous: <a href="Accessors.html#Accessors" accesskey="p" rel="prev">Accessors</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>
  272. </div>
  273. </body>
  274. </html>