blob: b4d88bba3a70f058dc36d51e9348d2b95cb1b313 (
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
97
98
99
100
101
102
103
104
105
106
107
108
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>sput<kind></title>
<link rel=stylesheet href="opcode.css">
</head>
<body>
<h1>sput<kind></h1>
<h2>Purpose</h2>
<p>
Perform the identified object static field operation with the identified static
field, loading or storing into the value register.
</p>
<p>
Note: These opcodes are reasonable candidates for static linking, altering the
field argument to be a more direct offset.
</p>
<h2>Details</h2>
<table class="instruc">
<thead>
<tr>
<th>Op & Format</th>
<th>Mnemonic / Syntax</th>
<th>Arguments</th>
</tr>
</thead>
<tbody>
<tr>
<td>67..6d 21c</td>
<td>s<i>staticop</i> vAA, field@BBBB<br/>
67: sput<br/>
68: sput-wide<br/>
69: sput-object<br/>
6a: sput-boolean<br/>
6b: sput-byte<br/>
6c: sput-char<br/>
6d: sput-short
</td>
<td><code>A:</code> source value register or pair; (8 bits)<br/>
<code>B:</code> static field reference index (16 bits)</td>
</tr>
</tbody>
</table>
<h2>Constraints</h2>
<ul>
<li>
A must be a valid register index in the current stackframe.
</li>
<li>
For the -wide variant, also A+1 must be a valid register index in the
current stackframe.
</li>
<li>
B must be a valid index into the field reference pool.
</li>
<li>
The field must be static. The type of the field denoted by C must match the
variant of the instruction.
</li>
<li>
For the -object variant, the instance referenced by register vA must be
assignment-compatible to the type of the field.
</li>
</ul>
<h2>Behavior</h2>
<ul>
<li>
For all but the -wide variant, the value of register vA is move into the
field, that is, <class>.<field>'=vA.
</li>
<li>
For the -wide variant, the registers vA and v(A+1) are moved into the field
as follows:
<ul>
<li>
<class>.<field>' = vA << 0x20 | v(A+1)
</li>
</ul>
</li>
</ul>
<h2>Exceptions</h2>
<ul>
<li>
NullPointerException if vB=null.
</li>
<li>
IllegalAccessException if <object>.<field> is not visible from
the current context according to the usual visibility and access rules of
the Java programming language, or final.
</li>
</ul>
</body>
</html>
|