summaryrefslogtreecommitdiffstats
path: root/docs/opcodes/opcode-0a-move-result.html
blob: 616087f73646423f7dc1da1b421d7922e02ab6d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

<head>
<title>move-result</title>
<link rel=stylesheet href="opcode.css">
</head>

<body>

<h1>move-result</h1>

<h2>Purpose</h2>

<p>
Move the single-word non-object result of the most recent invoke-kind into the
indicated register. This must be done as the instruction immediately after an
invoke-kind whose (single-word, non-object) result is not to be ignored;
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>0a 11x</td>
  <td>move-result 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 immediately preceded (in the code array) by an
    invoke-kind instruction.
  </li>
  <li>
    The instruction must be immediately reached (in the actual control flow)
    through returning from this invoke-kind instruction (it must not be jumped
    to).
  </li>
  <li>
    The result delivered by the invoke-kind instruction must not be a reference
    value or require a register pair.
  </li>
</ul>

<h2>Behavior</h2>

<ul>
  <li>
    The result delivered by the invoke-kind instruction is moved to register
    vA, that is, vA' = result.
  </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>

<h2>Notes</h2>

<p>
This instruction can also be thought of as reading the contents of a special
"result" register that is made valid and defined by executing a non-void return
instruction or a filled-new-array instruction. The execution of any other
instruction (including this one) renders this special register invalid.
</p>

</body>
</html>