s390-Operand-Modifier.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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: s390 Operand Modifier</title>
  15. <meta name="description" content="Using as: s390 Operand Modifier">
  16. <meta name="keywords" content="Using as: s390 Operand Modifier">
  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="s390-Syntax.html#s390-Syntax" rel="up" title="s390 Syntax">
  25. <link href="s390-Instruction-Marker.html#s390-Instruction-Marker" rel="next" title="s390 Instruction Marker">
  26. <link href="s390-Aliases.html#s390-Aliases" rel="prev" title="s390 Aliases">
  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="s390-Operand-Modifier"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="s390-Instruction-Marker.html#s390-Instruction-Marker" accesskey="n" rel="next">s390 Instruction Marker</a>, Previous: <a href="s390-Aliases.html#s390-Aliases" accesskey="p" rel="prev">s390 Aliases</a>, Up: <a href="s390-Syntax.html#s390-Syntax" accesskey="u" rel="up">s390 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="Instruction-Operand-Modifier"></a>
  64. <h4 class="subsubsection">9.39.3.6 Instruction Operand Modifier</h4>
  65. <a name="index-instruction-operand-modifier_002c-s390"></a>
  66. <a name="index-s390-instruction-operand-modifier"></a>
  67. <p>If a symbol modifier is attached to a symbol in an expression for an
  68. instruction operand field, the symbol term is replaced with a reference
  69. to an object in the global offset table (GOT) or the procedure linkage
  70. table (PLT). The following expressions are allowed:
  71. &lsquo;<samp>symbol@modifier + constant</samp>&rsquo;,
  72. &lsquo;<samp>symbol@modifier + label + constant</samp>&rsquo;, and
  73. &lsquo;<samp>symbol@modifier - label + constant</samp>&rsquo;.
  74. The term &lsquo;<samp>symbol</samp>&rsquo; is the symbol that will be entered into the GOT or
  75. PLT, &lsquo;<samp>label</samp>&rsquo; is a local label, and &lsquo;<samp>constant</samp>&rsquo; is an arbitrary
  76. expression that the assembler can evaluate to a constant value.
  77. </p>
  78. <p>The term &lsquo;<samp>(symbol + constant1)@modifier +/- label + constant2</samp>&rsquo;
  79. is also accepted but a warning message is printed and the term is
  80. converted to &lsquo;<samp>symbol@modifier +/- label + constant1 + constant2</samp>&rsquo;.
  81. </p>
  82. <dl compact="compact">
  83. <dt><code>@got</code></dt>
  84. <dt><code>@got12</code></dt>
  85. <dd><p>The @got modifier can be used for displacement fields, 16-bit immediate
  86. fields and 32-bit pc-relative immediate fields. The @got12 modifier is
  87. synonym to @got. The symbol is added to the GOT. For displacement
  88. fields and 16-bit immediate fields the symbol term is replaced with
  89. the offset from the start of the GOT to the GOT slot for the symbol.
  90. For a 32-bit pc-relative field the pc-relative offset to the GOT
  91. slot from the current instruction address is used.
  92. </p></dd>
  93. <dt><code>@gotent</code></dt>
  94. <dd><p>The @gotent modifier can be used for 32-bit pc-relative immediate fields.
  95. The symbol is added to the GOT and the symbol term is replaced with
  96. the pc-relative offset from the current instruction to the GOT slot for the
  97. symbol.
  98. </p></dd>
  99. <dt><code>@gotoff</code></dt>
  100. <dd><p>The @gotoff modifier can be used for 16-bit immediate fields. The symbol
  101. term is replaced with the offset from the start of the GOT to the
  102. address of the symbol.
  103. </p></dd>
  104. <dt><code>@gotplt</code></dt>
  105. <dd><p>The @gotplt modifier can be used for displacement fields, 16-bit immediate
  106. fields, and 32-bit pc-relative immediate fields. A procedure linkage
  107. table entry is generated for the symbol and a jump slot for the symbol
  108. is added to the GOT. For displacement fields and 16-bit immediate
  109. fields the symbol term is replaced with the offset from the start of the
  110. GOT to the jump slot for the symbol. For a 32-bit pc-relative field
  111. the pc-relative offset to the jump slot from the current instruction
  112. address is used.
  113. </p></dd>
  114. <dt><code>@plt</code></dt>
  115. <dd><p>The @plt modifier can be used for 16-bit and 32-bit pc-relative immediate
  116. fields. A procedure linkage table entry is generated for the symbol.
  117. The symbol term is replaced with the relative offset from the current
  118. instruction to the PLT entry for the symbol.
  119. </p></dd>
  120. <dt><code>@pltoff</code></dt>
  121. <dd><p>The @pltoff modifier can be used for 16-bit immediate fields. The symbol
  122. term is replaced with the offset from the start of the PLT to the address
  123. of the symbol.
  124. </p></dd>
  125. <dt><code>@gotntpoff</code></dt>
  126. <dd><p>The @gotntpoff modifier can be used for displacement fields. The symbol
  127. is added to the static TLS block and the negated offset to the symbol
  128. in the static TLS block is added to the GOT. The symbol term is replaced
  129. with the offset to the GOT slot from the start of the GOT.
  130. </p></dd>
  131. <dt><code>@indntpoff</code></dt>
  132. <dd><p>The @indntpoff modifier can be used for 32-bit pc-relative immediate
  133. fields. The symbol is added to the static TLS block and the negated offset
  134. to the symbol in the static TLS block is added to the GOT. The symbol term
  135. is replaced with the pc-relative offset to the GOT slot from the current
  136. instruction address.
  137. </p></dd>
  138. </dl>
  139. <p>For more information about the thread local storage modifiers
  140. &lsquo;<samp>gotntpoff</samp>&rsquo; and &lsquo;<samp>indntpoff</samp>&rsquo; see the ELF extension documentation
  141. &lsquo;<samp>ELF Handling For Thread-Local Storage</samp>&rsquo;.
  142. </p>
  143. <hr>
  144. <div class="header">
  145. <p>
  146. Next: <a href="s390-Instruction-Marker.html#s390-Instruction-Marker" accesskey="n" rel="next">s390 Instruction Marker</a>, Previous: <a href="s390-Aliases.html#s390-Aliases" accesskey="p" rel="prev">s390 Aliases</a>, Up: <a href="s390-Syntax.html#s390-Syntax" accesskey="u" rel="up">s390 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>
  147. </div>
  148. </body>
  149. </html>