| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <!-- This file documents the GNU Assembler "as". |
| |
| Copyright (C) 1991-2013 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". |
| --> |
| <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ --> |
| <head> |
| <title>Using as: s390 Directives</title> |
| |
| <meta name="description" content="Using as: s390 Directives"> |
| <meta name="keywords" content="Using as: s390 Directives"> |
| <meta name="resource-type" content="document"> |
| <meta name="distribution" content="global"> |
| <meta name="Generator" content="makeinfo"> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link href="index.html#Top" rel="start" title="Top"> |
| <link href="AS-Index.html#AS-Index" rel="index" title="AS Index"> |
| <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> |
| <link href="S_002f390_002dDependent.html#S_002f390_002dDependent" rel="up" title="S/390-Dependent"> |
| <link href="s390-Floating-Point.html#s390-Floating-Point" rel="next" title="s390 Floating Point"> |
| <link href="s390-Literal-Pool-Entries.html#s390-Literal-Pool-Entries" rel="prev" title="s390 Literal Pool Entries"> |
| <style type="text/css"> |
| <!-- |
| a.summary-letter {text-decoration: none} |
| blockquote.smallquotation {font-size: smaller} |
| div.display {margin-left: 3.2em} |
| div.example {margin-left: 3.2em} |
| div.indentedblock {margin-left: 3.2em} |
| div.lisp {margin-left: 3.2em} |
| div.smalldisplay {margin-left: 3.2em} |
| div.smallexample {margin-left: 3.2em} |
| div.smallindentedblock {margin-left: 3.2em; font-size: smaller} |
| div.smalllisp {margin-left: 3.2em} |
| kbd {font-style:oblique} |
| pre.display {font-family: inherit} |
| pre.format {font-family: inherit} |
| pre.menu-comment {font-family: serif} |
| pre.menu-preformatted {font-family: serif} |
| pre.smalldisplay {font-family: inherit; font-size: smaller} |
| pre.smallexample {font-size: smaller} |
| pre.smallformat {font-family: inherit; font-size: smaller} |
| pre.smalllisp {font-size: smaller} |
| span.nocodebreak {white-space:nowrap} |
| span.nolinebreak {white-space:nowrap} |
| span.roman {font-family:serif; font-weight:normal} |
| span.sansserif {font-family:sans-serif; font-weight:normal} |
| ul.no-bullet {list-style: none} |
| --> |
| </style> |
| |
| |
| </head> |
| |
| <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> |
| <a name="s390-Directives"></a> |
| <div class="header"> |
| <p> |
| Next: <a href="s390-Floating-Point.html#s390-Floating-Point" accesskey="n" rel="next">s390 Floating Point</a>, Previous: <a href="s390-Syntax.html#s390-Syntax" accesskey="p" rel="prev">s390 Syntax</a>, Up: <a href="S_002f390_002dDependent.html#S_002f390_002dDependent" accesskey="u" rel="up">S/390-Dependent</a> [<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> |
| </div> |
| <hr> |
| <a name="Assembler-Directives-7"></a> |
| <h4 class="subsection">9.37.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>. |
| </p> |
| <dl compact="compact"> |
| <dd><a name="index-_002einsn-directive_002c-s390"></a> |
| </dd> |
| <dt><code>.insn</code></dt> |
| <dd><p>This directive permits the numeric representation of an instructions |
| and makes the assembler insert the operands according to one of the |
| instructions formats for ‘<samp>.insn</samp>’ (<a href="s390-Formats.html#s390-Formats">s390 Formats</a>). |
| For example, the instruction ‘<samp>l %r1,24(%r15)</samp>’ could be written as |
| ‘<samp>.insn rx,0x58000000,%r1,24(%r15)</samp>’. |
| <a name="index-_002eshort-directive_002c-s390"></a> |
| <a name="index-_002elong-directive_002c-s390"></a> |
| <a name="index-_002equad-directive_002c-s390"></a> |
| </p></dd> |
| <dt><code>.short</code></dt> |
| <dt><code>.long</code></dt> |
| <dt><code>.quad</code></dt> |
| <dd><p>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: |
| ‘<samp>symbol@modifier + constant</samp>’, |
| ‘<samp>symbol@modifier + label + constant</samp>’, and |
| ‘<samp>symbol@modifier - label + constant</samp>’. |
| The following modifiers are available: |
| </p><dl compact="compact"> |
| <dt><code>@got</code></dt> |
| <dt><code>@got12</code></dt> |
| <dd><p>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. |
| </p></dd> |
| <dt><code>@gotoff</code></dt> |
| <dd><p>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. |
| </p></dd> |
| <dt><code>@gotplt</code></dt> |
| <dd><p>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. |
| </p></dd> |
| <dt><code>@plt</code></dt> |
| <dd><p>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. |
| </p></dd> |
| <dt><code>@pltoff</code></dt> |
| <dd><p>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. |
| </p></dd> |
| <dt><code>@tlsgd</code></dt> |
| <dt><code>@tlsldm</code></dt> |
| <dd><p>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. |
| </p></dd> |
| <dt><code>@gotntpoff</code></dt> |
| <dt><code>@indntpoff</code></dt> |
| <dd><p>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. |
| </p></dd> |
| <dt><code>@dtpoff</code></dt> |
| <dd><p>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. |
| </p></dd> |
| <dt><code>@ntpoff</code></dt> |
| <dd><p>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. |
| </p></dd> |
| </dl> |
| |
| <p>For more information about the thread local storage modifiers see the |
| ELF extension documentation ‘<samp>ELF Handling For Thread-Local Storage</samp>’. |
| </p> |
| <a name="index-_002eltorg-directive_002c-s390"></a> |
| </dd> |
| <dt><code>.ltorg</code></dt> |
| <dd><p>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>). |
| </p> |
| <a name="index-_002emachine-directive_002c-s390"></a> |
| </dd> |
| <dt><code>.machine string</code></dt> |
| <dd><p>This directive allows you to change the machine for which code is |
| generated. <code>string</code> may be any of the <code>-march=</code> selection |
| options (without the -march=), <code>push</code>, or <code>pop</code>. |
| <code>.machine push</code> saves the currently selected cpu, which may be |
| restored with <code>.machine pop</code>. Be aware that the cpu string has |
| to be put into double quotes in case it contains characters not |
| appropriate for identifiers. So you have to write <code>"z9-109"</code> |
| instead of just <code>z9-109</code>. |
| </p> |
| <a name="index-_002emachinemode-directive_002c-s390"></a> |
| </dd> |
| <dt><code>.machinemode string</code></dt> |
| <dd><p>This directive allows to change the architecture mode for which code |
| is being generated. <code>string</code> may be <code>esa</code>, <code>zarch</code>, |
| <code>zarch_nohighgprs</code>, <code>push</code>, or <code>pop</code>. |
| <code>.machinemode zarch_nohighgprs</code> can be used to prevent the |
| <code>highgprs</code> flag from being set in the ELF header of the output |
| file. This is useful in situations where the code is gated with a |
| runtime check which makes sure that the code is only executed on |
| kernels providing the <code>highgprs</code> feature. |
| <code>.machinemode push</code> saves the currently selected mode, which may |
| be restored with <code>.machinemode pop</code>. |
| </p></dd> |
| </dl> |
| |
| <hr> |
| <div class="header"> |
| <p> |
| Next: <a href="s390-Floating-Point.html#s390-Floating-Point" accesskey="n" rel="next">s390 Floating Point</a>, Previous: <a href="s390-Syntax.html#s390-Syntax" accesskey="p" rel="prev">s390 Syntax</a>, Up: <a href="S_002f390_002dDependent.html#S_002f390_002dDependent" accesskey="u" rel="up">S/390-Dependent</a> [<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> |
| </div> |
| |
| |
| |
| </body> |
| </html> |