diff options
Diffstat (limited to 'docs/opcodes/opcode-44-aget.html')
-rw-r--r-- | docs/opcodes/opcode-44-aget.html | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/docs/opcodes/opcode-44-aget.html b/docs/opcodes/opcode-44-aget.html new file mode 100644 index 000000000..b9d6f23c2 --- /dev/null +++ b/docs/opcodes/opcode-44-aget.html @@ -0,0 +1,113 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html> + +<head> +<title>aget<kind></title> +<link rel=stylesheet href="opcode.css"> +</head> + +<body> + +<h1>aget<kind></h1> + +<h2>Purpose</h2> + +<p> +Perform the identified array operation at the identified index of the given +array, storing into the value register. +</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>44..51 23x</td> + <td><i>arrayop</i> vAA, vBB, vCC<br/> + 44: aget<br/> + 45: aget-wide<br/> + 46: aget-object<br/> + 47: aget-boolean<br/> + 48: aget-byte<br/> + 49: aget-char<br/> + 4a: aget-short<br/> + </td> + <td><code>A:</code> dest value register or pair; (8 bits)<br/> + <code>B:</code> array register (8 bits)<br/> + <code>C:</code> index register (8 bits)</td> +</tr> +</tbody> +</table> + +<h2>Constraints</h2> + +<ul> + <li> + A, B and C must be valid register indices in the current stackframe. + </li> + <li> + For the aget-wide variant, also A+1 must be a valid register index in the + current stackframe. + </li> + <li> + Register vB must contain an array reference. The component type of the + array must match the variant of the instruction. + </li> + <li> + Register vC must contain an integer value. + </li> +</ul> + +<h2>Behavior</h2> + +<ul> + <li> + For all but the -wide variant, the array element at the given index is moved + into register vA, that is, vA'=array[index]. + </li> + <li> + For the -wide variant, the array element at the given index is moved into + registers vA and v(A+1) as follows: + <ul> + <li> + vA'=array[index] >> 0x20 + </li> + <li> + v(A+1)'=array[index] & 0xffffffff; + </li> + </ul> + </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 vB=null. + </li> + <li> + ArrayIndexOutOfBoundsException if vC < 0 or vC >= array.length. + </li> +</ul> + +</body> +</html> |