<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>sget<kind></title> <link rel=stylesheet href="opcode.css"> </head> <body> <h1>sget<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>60..6d 21c</td> <td>s<i>staticop</i> vAA, field@BBBB<br/> 60: sget<br/> 61: sget-wide<br/> 62: sget-object<br/> 63: sget-boolean<br/> 64: sget-byte<br/> 65: sget-char<br/> 66: sget-short<br/> </td> <td><code>A:</code> dest 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 denoted by B must be static. The type of the field denoted by B must match the variant of the instruction. </li> </ul> <h2>Behavior</h2> <ul> <li> The value of the given instance field is read from the given object and moved into the given register vA, that is, vA'=<class>.<field>. </li> <li> If v(A-1) is the lower half of a register pair, v(A-1)' becomes undefined. </li> <li> For all but the -wide variant, if v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined. </li> <li> For the -wide variant, if v(A+2) is the upper half of a register pair, v(A+2)' becomes undefined. </li> </ul> <h2>Exceptions</h2> <ul> <li> NullPointerException if object is 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. </li> </ul> </body> </html>