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>sput<kind></title> 7<link rel=stylesheet href="opcode.css"> 8</head> 9 10<body> 11 12<h1>sput<kind></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 & Format</th> 31 <th>Mnemonic / Syntax</th> 32 <th>Arguments</th> 33</tr> 34</thead> 35<tbody> 36<tr> 37 <td>67..6d 21c</td> 38 <td>s<i>staticop</i> vAA, field@BBBB<br/> 39 67: sput<br/> 40 68: sput-wide<br/> 41 69: sput-object<br/> 42 6a: sput-boolean<br/> 43 6b: sput-byte<br/> 44 6c: sput-char<br/> 45 6d: sput-short 46 </td> 47 <td><code>A:</code> source 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 must be static. The type of the field denoted by C must match the 68 variant of the instruction. 69 </li> 70 <li> 71 For the -object variant, the instance referenced by register vA must be 72 assignment-compatible to the type of the field. 73 </li> 74</ul> 75 76<h2>Behavior</h2> 77 78<ul> 79 <li> 80 For all but the -wide variant, the value of register vA is move into the 81 field, that is, <class>.<field>'=vA. 82 </li> 83 <li> 84 For the -wide variant, the registers vA and v(A+1) are moved into the field 85 as follows: 86 <ul> 87 <li> 88 <class>.<field>' = vA << 0x20 | v(A+1) 89 </li> 90 </ul> 91 </li> 92</ul> 93 94<h2>Exceptions</h2> 95 96<ul> 97 <li> 98 NullPointerException if vB=null. 99 </li> 100 <li> 101 IllegalAccessException if <object>.<field> is not visible from 102 the current context according to the usual visibility and access rules of 103 the Java programming language, or final. 104 </li> 105</ul> 106 107</body> 108</html> 109