• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
3<html>
4
5<head>
6<title>return-wide</title>
7<link rel=stylesheet href="opcode.css">
8</head>
9
10<body>
11
12<h1>return-wide</h1>
13
14<h2>Purpose</h2>
15
16<p>
17Return from a double-width (64-bit) value-returning method.
18</p>
19
20<h2>Details</h2>
21
22<table class="instruc">
23<thead>
24<tr>
25  <th>Op &amp; Format</th>
26  <th>Mnemonic / Syntax</th>
27  <th>Arguments</th>
28</tr>
29</thead>
30<tbody>
31<tr>
32  <td>10 11x</td>
33  <td>return-wide vAA</td>
34  <td><code>A:</code> return value register-pair (8 bits)</td>
35</tr>
36</tbody>
37</table>
38
39<h2>Constraints</h2>
40
41<ul>
42  <li>
43    The return type of the current method must be double or long.
44  </li>
45  <li>
46    A+1 must be a valid register index in the current stack frame (which
47    includes A being valid).
48  </li>
49  <li>
50    Register vA must be the lower half of a register pair.
51  </li>
52  <li>
53    The type of vA must match the return type of the method.
54  </li>
55</ul>
56
57<h2>Behavior</h2>
58
59<ul>
60  <li>
61    If the method is synchronized, the object's monitor is released in a way
62    similar to the monitor-exit instruction.
63  </li>
64  <li>
65    The stack frame of the current method invocation is removed from the stack.
66    This includes all its registers becoming invalid.
67  </li>
68  <li>
69    If the stack is now empty, the current thread terminates.
70  </li>
71  <li>
72    Otherwise, the following happens:
73    <ul>
74      <li>
75        The stack frame that caused this method invocation becomes valid. This
76        includes all its registers and their old values.
77      </li>
78      <li>
79        Execution continues at the bytecode instruction immediately following
80        the invoke instruction that caused this method invocation.
81      </li>
82      <li>
83        The return value can be consumed by (exactly) the first instruction
84        following the invoke-kind or invoke-kind/range instruction that caused
85        this method invocation, and this instructions needs to be a
86        move-result-wide instruction.
87      </li>
88    </ul>
89  </li>
90</ul>
91
92<h2>Exceptions</h2>
93
94<p>
95None.
96</p>
97
98</body>
99</html>
100