blob: 3c3bc83d1e07b82ed8c182ff3256bea632f8161d [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>move-exception</title>
<link rel=stylesheet href="opcode.css">
</head>
<body>
<h1>move-exception</h1>
<h2>Purpose</h2>
<p>
Save a just-caught exception into the given register. This should be the first
instruction of any exception handler whose caught exception is not to be
ignored, and this instruction may only ever occur as the first instruction of an
exception handler; anywhere else is invalid.
</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>0d 11x</td>
<td>move-exception vAA</td>
<td><code>A:</code> destination register (8 bits)</td>
</tr>
</tbody>
</table>
<h2>Constraints</h2>
<ul>
<li>
A must be a valid register index in the current stack frame.
</li>
<li>
The instruction must be the first instruction (in the code array) of an
instruction handler, that is, its offset in the code array must match one of
the handlers defined for the method in the Dex file.
</li>
</ul>
<h2>Behavior</h2>
<ul>
<li>
The active exception of the current thread is moved to register vA, that is,
vA' = exception.
</li>
<li>
If register v(A-1) is the lower half of a register pair, register v(A-1)'
becomes undefined.
</li>
<li>
If register v(A+1) is the upper half of a register pair, register v(A+1)'
becomes undefined.
</li>
</ul>
<h2>Exceptions</h2>
<p>
None.
</p>
</body>
</html>