OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / dalvik / docs / opcodes / opcode-4b-aput.html
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>aput&lt;kind&gt;</title>
7 <link rel=stylesheet href="opcode.css">
8 </head>
9
10 <body>
11
12 <h1>aput&lt;kind&gt;</h1>
13
14 <h2>Purpose</h2>
15
16 <p>
17 Waste cycles.
18 </p>
19
20 <h2>Details</h2>
21
22 <table class="instruc">
23 <thead>
24 <tr>
25   <th>Op &amp; Format</th>
26   <th>Mnemonic / Syntax</th>
27   <th>Arguments</th>
28 </tr>
29 </thead>
30 <tbody>
31 <tr>
32   <td>4b..51 23x</td>
33   <td><i>arrayop</i> vAA, vBB, vCC<br/>
34     4b: aput<br/>
35     4c: aput-wide<br/>
36     4d: aput-object<br/>
37     4e: aput-boolean<br/>
38     4f: aput-byte<br/>
39     50: aput-char<br/>
40     51: aput-short
41   </td>
42   <td><code>A:</code> source value register or pair; (8 bits)<br/>
43     <code>B:</code> array register (8 bits)<br/>
44     <code>C:</code> index register (8 bits)</td>
45 </tr>
46 </tbody>
47 </table>
48
49 <h2>Constraints</h2>
50
51 <ul>
52   <li>
53     A, B and C must be valid register indices in the current stack frame.
54   </li>
55   <li>
56     For the aget-wide variant, also A+1 must be a valid register index in the
57     current stack frame.
58   </li>
59   <li>
60     Register vB must contain an array reference. The component type of the array
61     must match the variant of the instruction.
62   </li>
63   <li>
64     Register vC must contain an integer value.
65   </li>
66 </ul>
67
68 <h2>Behavior</h2>
69
70 <ul>
71   <li>
72     For all but the -wide variant, the value of register vA is move into the
73     array element at the given index, that is, array[index]'=vA.
74   </li>
75   <li>
76     For the -wide variant, the registers vA and v(A+1) are moved into the array
77     element at the given index as follows:
78     <ul>
79       <li>
80         array[index]' = vA &lt;&lt; 0x20 | v(A+1)
81       </li>
82     </ul>
83   </li>
84 </ul>
85
86 <h2>Exceptions</h2>
87
88 <ul>
89   <li>
90     NullPointerException if vB=null.
91   </li>
92   <li>
93     ArrayIndexOutOfBoundsException if vC &lt; 0 or vC &gt;= array.length.
94   </li>
95 </ul>
96
97 </body>
98 </html>