You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
5.0 KiB
HTML

<html lang="en">
<head>
<title>s390 Operands - 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-Mnemonics.html#s390-Mnemonics" title="s390 Mnemonics">
<link rel="next" href="s390-Formats.html#s390-Formats" title="s390 Formats">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991-2015 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-Operands"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="s390-Formats.html#s390-Formats">s390 Formats</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="s390-Mnemonics.html#s390-Mnemonics">s390 Mnemonics</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="s390-Syntax.html#s390-Syntax">s390 Syntax</a>
<hr>
</div>
<h5 class="subsubsection">9.38.3.3 Instruction Operands</h5>
<p><a name="index-instruction-operands_002c-s390-1895"></a><a name="index-s390-instruction-operands-1896"></a>
Instruction operands can be grouped into three classes, operands located
in registers, immediate operands, and operands in storage.
<p>A register operand can be located in general, floating-point, access,
or control register. The register is identified by a four-bit field.
The field containing the register operand is called the R field.
<p>Immediate operands are contained within the instruction and can have
8, 16 or 32 bits. The field containing the immediate operand is called
the I field. Dependent on the instruction the I field is either signed
or unsigned.
<p>A storage operand consists of an address and a length. The address of a
storage operands can be specified in any of these ways:
<ul>
<li>The content of a single general R
<li>The sum of the content of a general register called the base
register B plus the content of a displacement field D
<li>The sum of the contents of two general registers called the
index register X and the base register B plus the content of a
displacement field
<li>The sum of the current instruction address and a 32-bit signed
immediate field multiplied by two.
</ul>
<p>The length of a storage operand can be:
<ul>
<li>Implied by the instruction
<li>Specified by a bitmask
<li>Specified by a four-bit or eight-bit length field L
<li>Specified by the content of a general register
</ul>
<p>The notation for storage operand addresses formed from multiple fields is
as follows:
<dl>
<dt><code>Dn(Bn)</code><dd>the address for operand number n is formed from the content of general
register Bn called the base register and the displacement field Dn.
<br><dt><code>Dn(Xn,Bn)</code><dd>the address for operand number n is formed from the content of general
register Xn called the index register, general register Bn called the
base register and the displacement field Dn.
<br><dt><code>Dn(Ln,Bn)</code><dd>the address for operand number n is formed from the content of general
regiser Bn called the base register and the displacement field Dn.
The length of the operand n is specified by the field Ln.
</dl>
<p>The base registers Bn and the index registers Xn of a storage operand can
be skipped. If Bn and Xn are skipped, a zero will be stored to the operand
field. The notation changes as follows:
<pre class="display">
<p><table summary=""><tr align="left"><th valign="top" width="30%">full notation </th><th valign="top" width="30%">short notation
<br></th></tr><tr align="left"><td valign="top" width="30%">Dn(0,Bn) </td><td valign="top" width="30%">Dn(Bn)
<br></td></tr><tr align="left"><td valign="top" width="30%">Dn(0,0) </td><td valign="top" width="30%">Dn
<br></td></tr><tr align="left"><td valign="top" width="30%">Dn(0) </td><td valign="top" width="30%">Dn
<br></td></tr><tr align="left"><td valign="top" width="30%">Dn(Ln,0) </td><td valign="top" width="30%">Dn(Ln)
<br></td></tr></table>
</pre>
</body></html>