blob: 1ad947142ebc7c545316980ba3e8cc46207b7922 [file] [log] [blame]
<html lang="en">
<head>
<title>s390 Directives - 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="S_002f390_002dDependent.html#S_002f390_002dDependent" title="S/390-Dependent">
<link rel="prev" href="s390-Syntax.html#s390-Syntax" title="s390 Syntax">
<link rel="next" href="s390-Floating-Point.html#s390-Floating-Point" title="s390 Floating Point">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2006, 2007, 2008, 2009, 2010 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>
<link rel="stylesheet" type="text/css" href="../cs.css">
</head>
<body>
<div class="node">
<a name="s390-Directives"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="s390-Floating-Point.html#s390-Floating-Point">s390 Floating Point</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="s390-Syntax.html#s390-Syntax">s390 Syntax</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="S_002f390_002dDependent.html#S_002f390_002dDependent">S/390-Dependent</a>
<hr>
</div>
<h4 class="subsection">9.31.4 Assembler Directives</h4>
<p><code>as</code> for s390 supports all of the standard ELF
assembler directives as outlined in the main part of this document.
Some directives have been extended and there are some additional
directives, which are only available for the s390 <code>as</code>.
<a name="index-g_t_0040code_007b_002einsn_007d-directive_002c-s390-1550"></a>
<dl><dt><code>.insn</code><dd>This directive permits the numeric representation of an instructions
and makes the assembler insert the operands according to one of the
instructions formats for &lsquo;<samp><span class="samp">.insn</span></samp>&rsquo; (<a href="s390-Formats.html#s390-Formats">s390 Formats</a>).
For example, the instruction &lsquo;<samp><span class="samp">l %r1,24(%r15)</span></samp>&rsquo; could be written as
&lsquo;<samp><span class="samp">.insn rx,0x58000000,%r1,24(%r15)</span></samp>&rsquo;.
<a name="index-g_t_0040code_007b_002eshort_007d-directive_002c-s390-1551"></a><a name="index-g_t_0040code_007b_002elong_007d-directive_002c-s390-1552"></a><a name="index-g_t_0040code_007b_002equad_007d-directive_002c-s390-1553"></a><br><dt><code>.short</code><dt><code>.long</code><dt><code>.quad</code><dd>This directive places one or more 16-bit (.short), 32-bit (.long), or
64-bit (.quad) values into the current section. If an ELF or TLS modifier
is used only the following expressions are allowed:
&lsquo;<samp><span class="samp">symbol@modifier + constant</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">symbol@modifier + label + constant</span></samp>&rsquo;, and
&lsquo;<samp><span class="samp">symbol@modifier - label + constant</span></samp>&rsquo;.
The following modifiers are available:
<dl>
<dt><code>@got</code><dt><code>@got12</code><dd>The @got modifier can be used for .short, .long and .quad. The @got12
modifier is synonym to @got. The symbol is added to the GOT. The symbol
term is replaced with offset from the start of the GOT to the GOT slot for
the symbol.
<br><dt><code>@gotoff</code><dd>The @gotoff modifier can be used for .short, .long and .quad. 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 .long and .quad. A procedure linkage
table entry is generated for the symbol and a jump slot for the symbol
is added to the GOT. The symbol term is replaced with the offset from the
start of the GOT to the jump slot for the symbol.
<br><dt><code>@plt</code><dd>The @plt modifier can be used for .long and .quad. A procedure linkage
table entry us generated for the symbol. The symbol term is replaced with
the address of the PLT entry for the symbol.
<br><dt><code>@pltoff</code><dd>The @pltoff modifier can be used for .short, .long and .quad. The symbol
term is replaced with the offset from the start of the PLT to the address
of the symbol.
<br><dt><code>@tlsgd</code><dt><code>@tlsldm</code><dd>The @tlsgd and @tlsldm modifier can be used for .long and .quad. A
tls_index structure for the symbol is added to the GOT. The symbol term is
replaced with the offset from the start of the GOT to the tls_index structure.
<br><dt><code>@gotntpoff</code><dt><code>@indntpoff</code><dd>The @gotntpoff and @indntpoff modifier can be used for .long and .quad.
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. For @gotntpoff the
symbol term is replaced with the offset from the start of the GOT to the
GOT slot, for @indntpoff the symbol term is replaced with the address
of the GOT slot.
<br><dt><code>@dtpoff</code><dd>The @dtpoff modifier can be used for .long and .quad. The symbol term
is replaced with the offset of the symbol relative to the start of the
TLS block it is contained in.
<br><dt><code>@ntpoff</code><dd>The @ntpoff modifier can be used for .long and .quad. The symbol term
is replaced with the offset of the symbol relative to the TCB pointer.
</dl>
<p>For more information about the thread local storage modifiers see the
ELF extension documentation &lsquo;<samp><span class="samp">ELF Handling For Thread-Local Storage</span></samp>&rsquo;.
<p><a name="index-g_t_0040code_007b_002eltorg_007d-directive_002c-s390-1554"></a><br><dt><code>.ltorg</code><dd>This directive causes the current contents of the literal pool to be
dumped to the current location (<a href="s390-Literal-Pool-Entries.html#s390-Literal-Pool-Entries">s390 Literal Pool Entries</a>).
</dl>
</body></html>