diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:03:55 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:03:55 -0800 |
| commit | 89c1feb0a69a7707b271086e749975b3f7acacf7 (patch) | |
| tree | 003624a03635e05020a47fc72a2c42934e3f0703 /docs/opcodes/opcode-12-const.html | |
| parent | 2ad60cfc28e14ee8f0bb038720836a4696c478ad (diff) | |
| download | android_dalvik-89c1feb0a69a7707b271086e749975b3f7acacf7.tar.gz android_dalvik-89c1feb0a69a7707b271086e749975b3f7acacf7.tar.bz2 android_dalvik-89c1feb0a69a7707b271086e749975b3f7acacf7.zip | |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'docs/opcodes/opcode-12-const.html')
| -rw-r--r-- | docs/opcodes/opcode-12-const.html | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/docs/opcodes/opcode-12-const.html b/docs/opcodes/opcode-12-const.html new file mode 100644 index 000000000..b2d894fe3 --- /dev/null +++ b/docs/opcodes/opcode-12-const.html @@ -0,0 +1,102 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html> + +<head> +<title>const</title> +<link rel=stylesheet href="opcode.css"> +</head> + +<body> + +<h1>const</h1> + +<h2>Purpose</h2> + +<p> +Move the given literal value (sign-extended to 32 bits, if necessary) into the +specified 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>12 11n</td> + <td>const/4 vA, #+B</td> + <td><code>A:</code> destination register (4 bits)<br/> + <code>B:</code> signed int (4 bits)</td> +</tr> +<tr> + <td>13 21s</td> + <td>const/16 vAA, #+BBBB</td> + <td><code>A:</code> destination register (8 bits)<br/> + <code>B:</code> signed int (16 bits)</td> +</tr> +<tr> + <td>14 31i</td> + <td>const vAA, #+BBBBBBBB</td> + <td><code>A:</code> destination register (8 bits)<br/> + <code>B:</code> arbitrary 32-bit constant</td> +</tr> +<tr> + <td>15 21h</td> + <td>const/high16 vAA, #+BBBB0000</td> + <td><code>A:</code> destination register (8 bits)<br/> + <code>B:</code> signed int (16 bits)</td> +</tr> +</tbody> +</table> + +<h2>Constraints</h2> + +<ul> + <li> + A must be a valid register index in the current stackframe. + </li> +</ul> + +<h2>Behavior</h2> + +<ul> + <li> + First, an adjusted value B' is determined as follows: + <ul> + <li> + If we are executing the /high16 variant, then B is left-shifted by 16 + bits, that is, B'=B << 0x10 + <li> + Otherwise, if B is a 4 bit or 16 bit constant, it is sign-extended to 32 + bits, that is, B'=sign-extended(B). + </li> + <li> + Otherwise, B'=B. + </li> + </ul> + <li> + Then, the adjusted value B' is moved into the register A, that is, vA'=B' + </li> + <li> + If v(A-1) is the lower half of a register pair, v(A-1)' becomes undefined. + </li> + <li> + If v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined. + </li> +</ul> + +<h2>Exceptions</h2> + +<p> +None. +</p> + +</body> +</html> |
