|
15 | 15 | # - vA: It is always a destination register on this document and a single <A> represents a 4-bit register, i.e, first 16 registers (0-15).
|
16 | 16 | # As such vAA represents an 8-bit register, i.e, first 256 registers (0-255), and vAAAA represents a 16-bit register, i.e, first 64k registers (0-65535).
|
17 | 17 | # - vB: It is always a source register on this document and denotion of <B> is same as <A>.
|
| 18 | +# Arguments which indicate a literal value have the form "#+X". |
| 19 | +# Arguments which indicate a relative instruction address offset have the form "+X". |
| 20 | +# Arguments which indicate a literal constant pool index have the form "kind@X", where "kind" indicates which constant pool is being referred to. |
| 21 | + |
18 | 22 | - opcode: "00"
|
19 | 23 | name: "nop"
|
20 | 24 | format: "ØØ|op"
|
|
23 | 27 | args_info: ""
|
24 | 28 | short_desc: "No operation"
|
25 | 29 | long_desc: "Does nothing, Waste cycles."
|
26 |
| - note: "Data-bearing pseudo-instructions are tagged with this opcode, in which case the high-order byte of the opcode unit indicates the nature of the data. See \"packed-switch-payload Format\", \"sparse-switch-payload Format\", and \"fill-array-data-payload Format\"." |
| 30 | + note: 'Data-bearing pseudo-instructions are tagged with this opcode, in which case the high-order byte of the opcode unit indicates the nature of the data. See "packed-switch-payload Format", "sparse-switch-payload Format", and "fill-array-data-payload Format".' |
27 | 31 | example: "0000 - nop"
|
28 | 32 | example_desc: "Does nothing, Waste cycles"
|
29 | 33 |
|
|
34 | 38 | syntax: "move vA, vB"
|
35 | 39 | args_info: "A: destination register (4 bits), B: source register (4 bits)"
|
36 | 40 | short_desc: "Move the contents of one non-object register to another."
|
37 |
| - long_desc: "Moves the content of vB into vA. Both registers must be in the first 16 register range (0-15)." |
| 41 | + long_desc: "Moves the content of vB into vA. Both registers is in the first 16 register range (0-15)." |
38 | 42 | note: ""
|
39 | 43 | example: "0110 - move v0, v1"
|
40 | 44 | example_desc: "Moves the content of v1 into v0."
|
|
46 | 50 | syntax: "move/from16 vAA, vBBBB"
|
47 | 51 | args_info: "A: destination register (8 bits), B: source register (16 bits)"
|
48 | 52 | short_desc: "Move the contents of one non-object register to another."
|
49 |
| - long_desc: "Moves the content of vB into vA. vB must be in the 64k register range (0-65535) while vA is one of the first 256 registers (0-255)." |
| 53 | + long_desc: "Moves the content of vB into vA. vB is in the 64k register range (0-65535) while vA is one of the first 256 registers (0-255)." |
50 | 54 | note: ""
|
51 | 55 | example: "0200 1900 - move/from16 v0, v25"
|
52 | 56 | example_desc: "Moves the content of v25 into v0."
|
|
58 | 62 | syntax: "move/16 vAAAA, vBBBB"
|
59 | 63 | args_info: "A: destination register (16 bits), B: source register (16 bits)"
|
60 | 64 | short_desc: "Move the contents of one non-object register to another."
|
61 |
| - long_desc: "Moves the content of vB into vA. Both registers must be in the first 64k register range (0-65535) & 16 bits." |
| 65 | + long_desc: "Moves the content of vB into vA. Both registers is in the first 64k register range (0-65535) & 16 bits." |
62 | 66 | note: ""
|
63 | 67 | example: "030000090181 - move/16 v2304, v33025"
|
64 | 68 | example_desc: "Moves the content of v33025 into v2304."
|
|
70 | 74 | syntax: "move-wide vA, vB"
|
71 | 75 | args_info: "A: destination register-pair (4 bits), B: source register-pair (4 bits)"
|
72 | 76 | short_desc: "Move the contents of one register-pair to another."
|
73 |
| - long_desc: "Move the value of the (vB, vB+1) register-pair to the (vA, vA+1) register-pair. Both register-pairs must be in the first 16 register range (0-15)." |
| 77 | + long_desc: "Move the value of the (vB, vB+1) register-pair to the (vA, vA+1) register-pair. Both register-pairs is in the first 16 register range (0-15)." |
74 | 78 | note: "It is legal to move from vN to either vN-1 or vN+1, so implementations must arrange for both halves of a register-pair to be read before anything is written."
|
75 | 79 | example: ""
|
76 | 80 | example_desc: ""
|
|
82 | 86 | syntax: "move-wide/from16 vAA, vBBBB"
|
83 | 87 | args_info: "A: destination register-pair (8 bits), B: source register-pair (16 bits)"
|
84 | 88 | short_desc: "Move the contents of one register-pair to another."
|
85 |
| - long_desc: "Move the value (long/double) of the (vBBBB, vBBBB+1) register-pair to the (vAA, vAA+1) register-pair. vB must be in the 64k register range (0-65535) while vA is one of the first 256 registers (0-255)." |
| 89 | + long_desc: "Move the value (long/double) of the (vBBBB, vBBBB+1) register-pair to the (vAA, vAA+1) register-pair. vB is in the 64k register range (0-65535) while vA is one of the first 256 registers (0-255)." |
86 | 90 | note: "It is legal to move from vN to either vN-1 or vN+1, so implementations must arrange for both halves of a register-pair to be read before anything is written."
|
87 | 91 | example: "0516 0000 - move-wide/from16 v22, v0"
|
88 | 92 | example_desc: "Moves the content of register-pair (v0, v0+1) into (v22, v22+1)."
|
|
94 | 98 | syntax: "move-wide/from16 vAAAA, vBBBB"
|
95 | 99 | args_info: "A: destination register-pair (16 bits), B: source register-pair (16 bits)"
|
96 | 100 | short_desc: "Move the contents of one register-pair to another."
|
97 |
| - long_desc: "Move the value of the (vBBBB, vBBBB+1) register-pair to the (vAAAA, vAAAA+1) register-pair. Both register-pairs must be in the first 64k register range (0-65535) & 16 bits." |
| 101 | + long_desc: "Move the value of the (vBBBB, vBBBB+1) register-pair to the (vAAAA, vAAAA+1) register-pair. Both register-pairs is in the first 64k register range (0-65535) & 16 bits." |
98 | 102 | note: "It is legal to move from vN to either vN-1 or vN+1, so implementations must arrange for both halves of a register-pair to be read before anything is written."
|
99 | 103 | example: ""
|
100 | 104 | example_desc: ""
|
|
106 | 110 | syntax: "move-object vA, vB"
|
107 | 111 | args_info: "A: destination register (4 bits), B: source register (4 bits)"
|
108 | 112 | short_desc: "Move the contents of one object-bearing register to another."
|
109 |
| - long_desc: "Move the value of register vB to register vA. Both registers must be in the first 16 register range (0-15)." |
| 113 | + long_desc: "Move the value of register vB to register vA. Both registers is in the first 16 register range (0-15)." |
110 | 114 | note: ""
|
111 | 115 | example: "0781 - move-object v1, v8"
|
112 | 116 | example_desc: "Moves the content of v8 to v1."
|
|
118 | 122 | syntax: "move-object/from16 vAA, vBBBB"
|
119 | 123 | args_info: "A: destination register (8 bits), B: source register (16 bits)"
|
120 | 124 | short_desc: "Move the contents of one object-bearing register to another."
|
121 |
| - long_desc: "Move the value of register vBBBB to register vAA. vB must be in the 64k register range (0-65535) while vA is one of the first 256 registers (0-255)." |
| 125 | + long_desc: "Move the value of register vBBBB to register vAA. vB is in the 64k register range (0-65535) while vA is one of the first 256 registers (0-255)." |
122 | 126 | note: ""
|
123 | 127 | example: "0801 1500 - move-object/from16 v1, v21"
|
124 | 128 | example_desc: "Move the content of v21 to v1."
|
|
130 | 134 | syntax: "move-object/16 vAAAA, vBBBB"
|
131 | 135 | args_info: "A: destination register (16 bits), B: source register (16 bits)"
|
132 | 136 | short_desc: "Move the contents of one object-bearing register to another."
|
133 |
| - long_desc: "Move the value of register vBBBB to register vAAAA. Both registers must be in the first 64k register range (0-65535) & 16 bits." |
| 137 | + long_desc: "Move the value of register vBBBB to register vAAAA. Both registers is in the first 64k register range (0-65535) & 16 bits." |
134 | 138 | note: ""
|
135 | 139 | example: ""
|
136 | 140 | example_desc: ""
|
|
142 | 146 | syntax: "move-result vAA"
|
143 | 147 | args_info: "A: destination register (8 bits)"
|
144 | 148 | short_desc: "Moves the single-word, non-object result of the preceding invoke-kind to the specified register. Must immediately follow the invoke-kind."
|
145 |
| - long_desc: "Moves the single-word result of the immediately preceding method invocation into the destination register (vA). vA must be in the first 256-register range (0-255)." |
| 149 | + long_desc: "Moves the single-word result of the immediately preceding method invocation into the destination register (vA). vA is in the first 256-register range (0-255)." |
146 | 150 | note: "Must immediately follow an invoke-kind with a valid single-word, non-object result. Anywhere else is invalid."
|
147 | 151 | example: "0A00 - move-result v0"
|
148 | 152 | example_desc: "Move the return value of a previous method invocation into v0."
|
|
154 | 158 | syntax: "move-result-wide vAA"
|
155 | 159 | args_info: "A: destination register (8 bits)"
|
156 | 160 | short_desc: "Moves the wide (double-word) non-object result of the preceding invoke-kind to the specified register-pair."
|
157 |
| - long_desc: "Moves the wide (double-word) result of the previous method invocation into register-pair (vAA, vAA+1). vA must be in the first 256-register range (0-255)." |
| 161 | + long_desc: "Moves the wide (double-word) result of the previous method invocation into register-pair (vAA, vAA+1). vA is in the first 256-register range (0-255)." |
158 | 162 | note: "Must immediately follow an invoke-kind with a valid double-word result. Anywhere else is invalid."
|
159 | 163 | example: "0B02 - move-result-wide v2"
|
160 | 164 | example_desc: "Move the long/double result value of the previous method invocation into v2,v3."
|
|
166 | 170 | syntax: "move-result-object vAA"
|
167 | 171 | args_info: "A: destination register (8 bits)"
|
168 | 172 | short_desc: "Moves the object result of the preceding invoke-kind to the specified register."
|
169 |
| - long_desc: "Moves the object result of the previous method invocation into vAA. vA must be in the first 256-register range (0-255)." |
| 173 | + long_desc: "Moves the object result of the previous method invocation into vAA. vA is in the first 256-register range (0-255)." |
170 | 174 | note: "Must immediately follow an invoke-kind or filled-new-array with a valid object result. Anywhere else is invalid."
|
171 | 175 | example: "0C00 - move-result-object v0"
|
172 | 176 | example_desc: "Move the object result of the previous method invocation into v0."
|
|
178 | 182 | syntax: "move-exception vAA"
|
179 | 183 | args_info: "A: destination register (8 bits)"
|
180 | 184 | short_desc: "Moves the exception object of the most recent exception to the specified register."
|
181 |
| - long_desc: "Moves the caught exception into vAA. vA must be in the first 256-register range (0-255)." |
| 185 | + long_desc: "Moves the caught exception into vAA. vA is in the first 256-register range (0-255)." |
182 | 186 | note: "This must be the first instruction of any exception handler whose caught exception is not to be ignored, and must only *ever* occur as the first instruction of an exception handler; anywhere else is invalid."
|
183 | 187 | example: "0D19 - move-exception v25"
|
184 | 188 | example_desc: "Moves the caught exception into register v25."
|
|
202 | 206 | syntax: "return vAA"
|
203 | 207 | args_info: "A: return value register (8 bits)"
|
204 | 208 | short_desc: "Return from a single-width (32-bit) non-object value-returning method."
|
205 |
| - long_desc: "Returns the 32-bit value in vAA to the caller. vA must be in the first 256-register range (0-255)." |
| 209 | + long_desc: "Returns the 32-bit value in vAA to the caller. vA is in the first 256-register range (0-255)." |
206 | 210 | note: ""
|
207 | 211 | example: "0F00 - return v0"
|
208 | 212 | example_desc: "Returns with return value in v0."
|
|
214 | 218 | syntax: "return-wide vAA"
|
215 | 219 | args_info: "A: return value register (8 bits)"
|
216 | 220 | short_desc: "Return from a double-width (64-bit) value-returning method."
|
217 |
| - long_desc: "Returns a double/long result from register-pair (vAA, vAA+1) to the caller. vA must be in the first 256-register range (0-255)." |
| 221 | + long_desc: "Returns a double/long result from register-pair (vAA, vAA+1) to the caller. vA is in the first 256-register range (0-255)." |
218 | 222 | note: ""
|
219 | 223 | example: "1000 - return-wide v0"
|
220 | 224 | example_desc: "Returns with a double/long value in v0,v1."
|
|
226 | 230 | syntax: "return-object vAA"
|
227 | 231 | args_info: "A: return value register (8 bits)"
|
228 | 232 | short_desc: "Return from an object-returning method."
|
229 |
| - long_desc: "Returns the object reference value from vAA to the caller. vA must be in the first 256-register range (0-255)." |
| 233 | + long_desc: "Returns the object reference value from vAA to the caller. vA is in the first 256-register range (0-255)." |
230 | 234 | note: ""
|
231 | 235 | example: "1100 - return-object v0"
|
232 | 236 | example_desc: "Returns with object reference value in v0."
|
233 | 237 |
|
| 238 | +- opcode: "12" |
| 239 | + name: "const/4" |
| 240 | + format: "B|A|op" |
| 241 | + format_id: "11n" |
| 242 | + syntax: "const/4 vA, #+B" |
| 243 | + args_info: "A: destination register (4 bits), B: signed int (4 bits)" |
| 244 | + short_disc: "Move the given literal value (sign-extended to 32 bits) into the specified register." |
| 245 | + long_desc: "Moves the literal value B into vA. B is sign-extended to 32 bits. The value of B is in the range -8 to 7 (-0x8 to 0x7)." |
| 246 | + note: "" |
| 247 | + example: "1200 0001 - const/4 v0, 0x1" |
| 248 | + example_desc: "Moves the literal value 0x1(1) into v0." |
| 249 | + |
| 250 | +- opcode: "13" |
| 251 | + name: "const/16" |
| 252 | + format: "AA|op BBBB" |
| 253 | + format_id: "21s" |
| 254 | + syntax: "const/16 vAA, #+BBBB" |
| 255 | + args_info: "A: destination register (8 bits), B: signed int (16 bits)" |
| 256 | + short_desc: "Move the given literal value (sign-extended to 32 bits) into the specified register." |
| 257 | + long_desc: "Moves the literal value BBBB into vAA. BBBB is sign-extended to 32 bits. The value of BBBB is in the range -32768 to 32767 (-0x8000 to 0x7FFF)." |
| 258 | + note: "" |
| 259 | + example: "1300 0A00 - const/16 v0, 0xa" |
| 260 | + example_desc: "Moves the literal value 0xa(10) into v0." |
| 261 | + |
| 262 | +- opcode: "14" |
| 263 | + name: "const" |
| 264 | + format: "AA|op BBBBlo" |
| 265 | + format_id: "31i" |
| 266 | + syntax: "const vAA, #+BBBBBBBB" |
| 267 | + args_info: "A: destination register (8 bits), B: arbitrary constant (32 bits)" |
| 268 | + short_desc: "Move the given literal value into the specified register." |
| 269 | + long_desc: "Moves the literal value BBBB into vAA. BBBB is a 32-bit constant. The value of BBBB is in the range -2147483648 to 2147483647 (-0x80000000 to 0x7FFFFFFF)." |
| 270 | + note: "" |
| 271 | + example: "1400 4E61BC00 - const v0, 0xBC614E" |
| 272 | + example_desc: "Moves the literal value 0xBC614E(12345678) into v0." |
| 273 | + |
| 274 | +- opcode: "15" |
| 275 | + name: "const/high16" |
| 276 | + format: "AA|op BBBB" |
| 277 | + format_id: "21h" |
| 278 | + syntax: "const/high16 vAA, #+BBBB0000" |
| 279 | + args_info: "A: destination register (8 bits), B: signed int (16 bits)" |
| 280 | + short_desc: "Move the given literal value (right-zero-extended to 32 bits) into the specified register." |
| 281 | + long_desc: "Moves the literal value BBBB0000 into vAA. BBBB is right-zero-extended to 32 bits. The value of BBBB is in the range -32768 to 32767 (-0x80000000 to 0x7FFF0000)." |
| 282 | + note: "Generaly used to initialise float values." |
| 283 | + example: "1500 2041 - const/high16 v0, 0x41200000 (#float 10.0)" |
| 284 | + example_disc: "Moves the floating literal value 0x41200000(10.0) into v0. The 16 bit literal in the instruction carries the top 16 bits of the floating point number." |
| 285 | + |
234 | 286 | - opcode: "28"
|
235 | 287 | name: "goto"
|
236 | 288 | format: "AA|op"
|
|
0 commit comments