Source

APKinspector / androguard / specs / dalvik / opcodes / opcode-10-return-wide.html

The default branch has multiple heads

Full commit
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

<head>
<title>return-wide</title>
<link rel=stylesheet href="opcode.css">
</head>

<body>

<h1>return-wide</h1>

<h2>Purpose</h2>

<p>
Return from a double-width (64-bit) value-returning method.
</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>10 11x</td>
  <td>return-wide vAA</td>
  <td><code>A:</code> return value register-pair (8 bits)</td>
</tr>
</tbody>
</table>

<h2>Constraints</h2>

<ul>
  <li>
    The return type of the current method must be double or long.
  </li>
  <li>
    A+1 must be a valid register index in the current stack frame (which
    includes A being valid).
  </li>
  <li>
    Register vA must be the lower half of a register pair.
  </li>
  <li>
    The type of vA must match the return type of the method.
  </li>
</ul>
 
<h2>Behavior</h2>

<ul>
  <li>
    If the method is synchronized, the object's monitor is released in a way
    similar to the monitor-exit instruction.
  </li>
  <li>
    The stack frame of the current method invocation is removed from the stack.
    This includes all its registers becoming invalid.
  </li>
  <li>
    If the stack is now empty, the current thread terminates.
  </li>
  <li>
    Otherwise, the following happens:
    <ul>
      <li>
        The stack frame that caused this method invocation becomes valid. This
        includes all its registers and their old values.
      </li>
      <li>
        Execution continues at the bytecode instruction immediately following
        the invoke instruction that caused this method invocation.
      </li>
      <li>
        The return value can be consumed by (exactly) the first instruction
        following the invoke-kind or invoke-kind/range instruction that caused
        this method invocation, and this instructions needs to be a
        move-result-wide instruction.
      </li>
    </ul>
  </li>
</ul>

<h2>Exceptions</h2>

<p>
None.
</p>

</body>
</html>