blob: 089c1cad92003800650d263e06a258f7fd55da77 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>aput&lt;kind&gt;</title>
<link rel=stylesheet href="opcode.css">
</head>
<body>
<h1>aput&lt;kind&gt;</h1>
<h2>Purpose</h2>
<p>
Waste cycles.
</p>
<h2>Details</h2>
<table class="instruc">
<thead>
<tr>
<th>Op &amp; Format</th>
<th>Mnemonic / Syntax</th>
<th>Arguments</th>
</tr>
</thead>
<tbody>
<tr>
<td>4b..51 23x</td>
<td><i>arrayop</i> vAA, vBB, vCC<br/>
4b: aput<br/>
4c: aput-wide<br/>
4d: aput-object<br/>
4e: aput-boolean<br/>
4f: aput-byte<br/>
50: aput-char<br/>
51: aput-short
</td>
<td><code>A:</code> source value register or pair; (8 bits)<br/>
<code>B:</code> array register (8 bits)<br/>
<code>C:</code> index register (8 bits)</td>
</tr>
</tbody>
</table>
<h2>Constraints</h2>
<ul>
<li>
A, B and C must be valid register indices in the current stack frame.
</li>
<li>
For the aget-wide variant, also A+1 must be a valid register index in the
current stack frame.
</li>
<li>
Register vB must contain an array reference. The component type of the array
must match the variant of the instruction.
</li>
<li>
Register vC must contain an integer value.
</li>
</ul>
<h2>Behavior</h2>
<ul>
<li>
For all but the -wide variant, the value of register vA is move into the
array element at the given index, that is, array[index]'=vA.
</li>
<li>
For the -wide variant, the registers vA and v(A+1) are moved into the array
element at the given index as follows:
<ul>
<li>
array[index]' = vA &lt;&lt; 0x20 | v(A+1)
</li>
</ul>
</li>
</ul>
<h2>Exceptions</h2>
<ul>
<li>
NullPointerException if vB=null.
</li>
<li>
ArrayIndexOutOfBoundsException if vC &lt; 0 or vC &gt;= array.length.
</li>
</ul>
</body>
</html>