• 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>sget&lt;kind&gt;</title>
7<link rel=stylesheet href="opcode.css">
8</head>
9
10<body>
11
12<h1>sget&lt;kind&gt;</h1>
13
14<h2>Purpose</h2>
15
16<p>
17Perform the identified object static field operation with the identified static
18field, loading or storing into the value register.
19</p>
20<p>
21Note: These opcodes are reasonable candidates for static linking, altering the
22field argument to be a more direct offset.
23</p>
24
25<h2>Details</h2>
26
27<table class="instruc">
28<thead>
29<tr>
30  <th>Op &amp; Format</th>
31  <th>Mnemonic / Syntax</th>
32  <th>Arguments</th>
33</tr>
34</thead>
35<tbody>
36<tr>
37  <td>60..6d 21c</td>
38  <td>s<i>staticop</i> vAA, field@BBBB<br/>
39    60: sget<br/>
40    61: sget-wide<br/>
41    62: sget-object<br/>
42    63: sget-boolean<br/>
43    64: sget-byte<br/>
44    65: sget-char<br/>
45    66: sget-short<br/>
46  </td>
47  <td><code>A:</code> dest value register or pair; (8 bits)<br/>
48    <code>B:</code> static field reference index (16 bits)</td>
49</tr>
50</tbody>
51</table>
52
53<h2>Constraints</h2>
54
55<ul>
56  <li>
57    A must be a valid register index in the current stackframe.
58  </li>
59  <li>
60    For the -wide variant, also A+1 must be a valid register index in the
61    current stackframe.
62  </li>
63  <li>
64    B must be a valid index into the field reference pool.
65  </li>
66  <li>
67    The field denoted by B must be static. The type of the field denoted by B
68    must match the variant of the instruction.
69  </li>
70</ul>
71
72<h2>Behavior</h2>
73
74<ul>
75  <li>
76    The value of the given instance field is read from the given object and
77    moved into the given register vA, that is, vA'=&lt;class&gt;.&lt;field&gt;.
78  </li>
79  <li>
80    If v(A-1) is the lower half of a register pair, v(A-1)' becomes undefined.
81  </li>
82  <li>
83    For all but the -wide variant, if v(A+1) is the upper half of a register
84    pair, v(A+1)' becomes undefined.
85  </li>
86  <li>
87    For the -wide variant, if v(A+2) is the upper half of a register pair,
88    v(A+2)' becomes undefined.
89  </li>
90</ul>
91
92<h2>Exceptions</h2>
93
94<ul>
95  <li>
96    NullPointerException if object is null.
97  </li>
98  <li>
99    IllegalAccessException if &lt;object&gt;.&lt;field&gt; is not visible from
100    the current context according to the usual visibility and access rules of
101    the Java programming language.
102  </li>
103</ul>
104
105</body>
106</html>
107