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
5Copyright (C) 1991-2021 Free Software Foundation, Inc.
6
7Permission is granted to copy, distribute and/or modify this document
8under the terms of the GNU Free Documentation License, Version 1.3
9or any later version published by the Free Software Foundation;
10with no Invariant Sections, with no Front-Cover Texts, and with no
11Back-Cover Texts.  A copy of the license is included in the
12section entitled "GNU Free Documentation License".
13 -->
14<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
15<head>
16<title>Using as: s390 Operand Modifier</title>
17
18<meta name="description" content="Using as: s390 Operand Modifier">
19<meta name="keywords" content="Using as: s390 Operand Modifier">
20<meta name="resource-type" content="document">
21<meta name="distribution" content="global">
22<meta name="Generator" content="makeinfo">
23<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24<link href="index.html#Top" rel="start" title="Top">
25<link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
26<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
27<link href="s390-Syntax.html#s390-Syntax" rel="up" title="s390 Syntax">
28<link href="s390-Instruction-Marker.html#s390-Instruction-Marker" rel="next" title="s390 Instruction Marker">
29<link href="s390-Aliases.html#s390-Aliases" rel="previous" title="s390 Aliases">
30<style type="text/css">
31<!--
32a.summary-letter {text-decoration: none}
33blockquote.smallquotation {font-size: smaller}
34div.display {margin-left: 3.2em}
35div.example {margin-left: 3.2em}
36div.indentedblock {margin-left: 3.2em}
37div.lisp {margin-left: 3.2em}
38div.smalldisplay {margin-left: 3.2em}
39div.smallexample {margin-left: 3.2em}
40div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
41div.smalllisp {margin-left: 3.2em}
42kbd {font-style:oblique}
43pre.display {font-family: inherit}
44pre.format {font-family: inherit}
45pre.menu-comment {font-family: serif}
46pre.menu-preformatted {font-family: serif}
47pre.smalldisplay {font-family: inherit; font-size: smaller}
48pre.smallexample {font-size: smaller}
49pre.smallformat {font-family: inherit; font-size: smaller}
50pre.smalllisp {font-size: smaller}
51span.nocodebreak {white-space:nowrap}
52span.nolinebreak {white-space:nowrap}
53span.roman {font-family:serif; font-weight:normal}
54span.sansserif {font-family:sans-serif; font-weight:normal}
55ul.no-bullet {list-style: none}
56-->
57</style>
58
59
60</head>
61
62<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
63<a name="s390-Operand-Modifier"></a>
64<div class="header">
65<p>
66Next: <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="previous">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>
67</div>
68<hr>
69<a name="Instruction-Operand-Modifier"></a>
70<h4 class="subsubsection">9.41.3.6 Instruction Operand Modifier</h4>
71<a name="index-instruction-operand-modifier_002c-s390"></a>
72<a name="index-s390-instruction-operand-modifier"></a>
73
74<p>If a symbol modifier is attached to a symbol in an expression for an
75instruction operand field, the symbol term is replaced with a reference
76to an object in the global offset table (GOT) or the procedure linkage
77table (PLT). The following expressions are allowed:
78&lsquo;<samp>symbol@modifier + constant</samp>&rsquo;,
79&lsquo;<samp>symbol@modifier + label + constant</samp>&rsquo;, and
80&lsquo;<samp>symbol@modifier - label + constant</samp>&rsquo;.
81The term &lsquo;<samp>symbol</samp>&rsquo; is the symbol that will be entered into the GOT or
82PLT, &lsquo;<samp>label</samp>&rsquo; is a local label, and &lsquo;<samp>constant</samp>&rsquo; is an arbitrary
83expression that the assembler can evaluate to a constant value.
84</p>
85<p>The term &lsquo;<samp>(symbol + constant1)@modifier +/- label + constant2</samp>&rsquo;
86is also accepted but a warning message is printed and the term is
87converted to &lsquo;<samp>symbol@modifier +/- label + constant1 + constant2</samp>&rsquo;.
88</p>
89<dl compact="compact">
90<dt><code>@got</code></dt>
91<dt><code>@got12</code></dt>
92<dd><p>The @got modifier can be used for displacement fields, 16-bit immediate
93fields and 32-bit pc-relative immediate fields. The @got12 modifier is
94synonym to @got. The symbol is added to the GOT. For displacement
95fields and 16-bit immediate fields the symbol term is replaced with
96the offset from the start of the GOT to the GOT slot for the symbol.
97For a 32-bit pc-relative field the pc-relative offset to the GOT
98slot from the current instruction address is used.
99</p></dd>
100<dt><code>@gotent</code></dt>
101<dd><p>The @gotent modifier can be used for 32-bit pc-relative immediate fields.
102The symbol is added to the GOT and the symbol term is replaced with
103the pc-relative offset from the current instruction to the GOT slot for the
104symbol.
105</p></dd>
106<dt><code>@gotoff</code></dt>
107<dd><p>The @gotoff modifier can be used for 16-bit immediate fields. The symbol
108term is replaced with the offset from the start of the GOT to the
109address of the symbol.
110</p></dd>
111<dt><code>@gotplt</code></dt>
112<dd><p>The @gotplt modifier can be used for displacement fields, 16-bit immediate
113fields, and 32-bit pc-relative immediate fields. A procedure linkage
114table entry is generated for the symbol and a jump slot for the symbol
115is added to the GOT. For displacement fields and 16-bit immediate
116fields the symbol term is replaced with the offset from the start of the
117GOT to the jump slot for the symbol. For a 32-bit pc-relative field
118the pc-relative offset to the jump slot from the current instruction
119address is used.
120</p></dd>
121<dt><code>@plt</code></dt>
122<dd><p>The @plt modifier can be used for 16-bit and 32-bit pc-relative immediate
123fields. A procedure linkage table entry is generated for the symbol.
124The symbol term is replaced with the relative offset from the current
125instruction to the PLT entry for the symbol.
126</p></dd>
127<dt><code>@pltoff</code></dt>
128<dd><p>The @pltoff modifier can be used for 16-bit immediate fields. The symbol
129term is replaced with the offset from the start of the PLT to the address
130of the symbol.
131</p></dd>
132<dt><code>@gotntpoff</code></dt>
133<dd><p>The @gotntpoff modifier can be used for displacement fields. The symbol
134is added to the static TLS block and the negated offset to the symbol
135in the static TLS block is added to the GOT. The symbol term is replaced
136with the offset to the GOT slot from the start of the GOT.
137</p></dd>
138<dt><code>@indntpoff</code></dt>
139<dd><p>The @indntpoff modifier can be used for 32-bit pc-relative immediate
140fields. The symbol is added to the static TLS block and the negated offset
141to the symbol in the static TLS block is added to the GOT. The symbol term
142is replaced with the pc-relative offset to the GOT slot from the current
143instruction address.
144</p></dd>
145</dl>
146
147<p>For more information about the thread local storage modifiers
148&lsquo;<samp>gotntpoff</samp>&rsquo; and &lsquo;<samp>indntpoff</samp>&rsquo; see the ELF extension documentation
149&lsquo;<samp>ELF Handling For Thread-Local Storage</samp>&rsquo;.
150</p>
151<hr>
152<div class="header">
153<p>
154Next: <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="previous">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>
155</div>
156
157
158
159</body>
160</html>
161