113 lines
6.3 KiB
HTML
113 lines
6.3 KiB
HTML
<html lang="en">
|
|
<head>
|
|
<title>s390 Operand Modifier - Using as</title>
|
|
<meta http-equiv="Content-Type" content="text/html">
|
|
<meta name="description" content="Using as">
|
|
<meta name="generator" content="makeinfo 4.13">
|
|
<link title="Top" rel="start" href="index.html#Top">
|
|
<link rel="up" href="s390-Syntax.html#s390-Syntax" title="s390 Syntax">
|
|
<link rel="prev" href="s390-Aliases.html#s390-Aliases" title="s390 Aliases">
|
|
<link rel="next" href="s390-Instruction-Marker.html#s390-Instruction-Marker" title="s390 Instruction Marker">
|
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
|
<!--
|
|
This file documents the GNU Assembler "as".
|
|
|
|
Copyright (C) 1991-2019 Free Software Foundation, Inc.
|
|
|
|
Permission is granted to copy, distribute and/or modify this document
|
|
under the terms of the GNU Free Documentation License, Version 1.3
|
|
or any later version published by the Free Software Foundation;
|
|
with no Invariant Sections, with no Front-Cover Texts, and with no
|
|
Back-Cover Texts. A copy of the license is included in the
|
|
section entitled ``GNU Free Documentation License''.
|
|
|
|
-->
|
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
|
<style type="text/css"><!--
|
|
pre.display { font-family:inherit }
|
|
pre.format { font-family:inherit }
|
|
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
|
pre.smallformat { font-family:inherit; font-size:smaller }
|
|
pre.smallexample { font-size:smaller }
|
|
pre.smalllisp { font-size:smaller }
|
|
span.sc { font-variant:small-caps }
|
|
span.roman { font-family:serif; font-weight:normal; }
|
|
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
|
--></style>
|
|
</head>
|
|
<body>
|
|
<div class="node">
|
|
<a name="s390-Operand-Modifier"></a>
|
|
<p>
|
|
Next: <a rel="next" accesskey="n" href="s390-Instruction-Marker.html#s390-Instruction-Marker">s390 Instruction Marker</a>,
|
|
Previous: <a rel="previous" accesskey="p" href="s390-Aliases.html#s390-Aliases">s390 Aliases</a>,
|
|
Up: <a rel="up" accesskey="u" href="s390-Syntax.html#s390-Syntax">s390 Syntax</a>
|
|
<hr>
|
|
</div>
|
|
|
|
<h5 class="subsubsection">9.41.3.6 Instruction Operand Modifier</h5>
|
|
|
|
<p><a name="index-instruction-operand-modifier_002c-s390-2078"></a><a name="index-s390-instruction-operand-modifier-2079"></a>
|
|
If a symbol modifier is attached to a symbol in an expression for an
|
|
instruction operand field, the symbol term is replaced with a reference
|
|
to an object in the global offset table (GOT) or the procedure linkage
|
|
table (PLT). The following expressions are allowed:
|
|
‘<samp><span class="samp">symbol@modifier + constant</span></samp>’,
|
|
‘<samp><span class="samp">symbol@modifier + label + constant</span></samp>’, and
|
|
‘<samp><span class="samp">symbol@modifier - label + constant</span></samp>’.
|
|
The term ‘<samp><span class="samp">symbol</span></samp>’ is the symbol that will be entered into the GOT or
|
|
PLT, ‘<samp><span class="samp">label</span></samp>’ is a local label, and ‘<samp><span class="samp">constant</span></samp>’ is an arbitrary
|
|
expression that the assembler can evaluate to a constant value.
|
|
|
|
<p>The term ‘<samp><span class="samp">(symbol + constant1)@modifier +/- label + constant2</span></samp>’
|
|
is also accepted but a warning message is printed and the term is
|
|
converted to ‘<samp><span class="samp">symbol@modifier +/- label + constant1 + constant2</span></samp>’.
|
|
|
|
<dl>
|
|
<dt><code>@got</code><dt><code>@got12</code><dd>The @got modifier can be used for displacement fields, 16-bit immediate
|
|
fields and 32-bit pc-relative immediate fields. The @got12 modifier is
|
|
synonym to @got. The symbol is added to the GOT. For displacement
|
|
fields and 16-bit immediate fields the symbol term is replaced with
|
|
the offset from the start of the GOT to the GOT slot for the symbol.
|
|
For a 32-bit pc-relative field the pc-relative offset to the GOT
|
|
slot from the current instruction address is used.
|
|
<br><dt><code>@gotent</code><dd>The @gotent modifier can be used for 32-bit pc-relative immediate fields.
|
|
The symbol is added to the GOT and the symbol term is replaced with
|
|
the pc-relative offset from the current instruction to the GOT slot for the
|
|
symbol.
|
|
<br><dt><code>@gotoff</code><dd>The @gotoff modifier can be used for 16-bit immediate fields. The symbol
|
|
term is replaced with the offset from the start of the GOT to the
|
|
address of the symbol.
|
|
<br><dt><code>@gotplt</code><dd>The @gotplt modifier can be used for displacement fields, 16-bit immediate
|
|
fields, and 32-bit pc-relative immediate fields. A procedure linkage
|
|
table entry is generated for the symbol and a jump slot for the symbol
|
|
is added to the GOT. For displacement fields and 16-bit immediate
|
|
fields the symbol term is replaced with the offset from the start of the
|
|
GOT to the jump slot for the symbol. For a 32-bit pc-relative field
|
|
the pc-relative offset to the jump slot from the current instruction
|
|
address is used.
|
|
<br><dt><code>@plt</code><dd>The @plt modifier can be used for 16-bit and 32-bit pc-relative immediate
|
|
fields. A procedure linkage table entry is generated for the symbol.
|
|
The symbol term is replaced with the relative offset from the current
|
|
instruction to the PLT entry for the symbol.
|
|
<br><dt><code>@pltoff</code><dd>The @pltoff modifier can be used for 16-bit immediate fields. The symbol
|
|
term is replaced with the offset from the start of the PLT to the address
|
|
of the symbol.
|
|
<br><dt><code>@gotntpoff</code><dd>The @gotntpoff modifier can be used for displacement fields. The symbol
|
|
is added to the static TLS block and the negated offset to the symbol
|
|
in the static TLS block is added to the GOT. The symbol term is replaced
|
|
with the offset to the GOT slot from the start of the GOT.
|
|
<br><dt><code>@indntpoff</code><dd>The @indntpoff modifier can be used for 32-bit pc-relative immediate
|
|
fields. The symbol is added to the static TLS block and the negated offset
|
|
to the symbol in the static TLS block is added to the GOT. The symbol term
|
|
is replaced with the pc-relative offset to the GOT slot from the current
|
|
instruction address.
|
|
</dl>
|
|
|
|
<p>For more information about the thread local storage modifiers
|
|
‘<samp><span class="samp">gotntpoff</span></samp>’ and ‘<samp><span class="samp">indntpoff</span></samp>’ see the ELF extension documentation
|
|
‘<samp><span class="samp">ELF Handling For Thread-Local Storage</span></samp>’.
|
|
|
|
</body></html>
|
|
|