diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:14 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:14 -0800 |
| commit | f72d5de56a522ac3be03873bdde26f23a5eeeb3c (patch) | |
| tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /docs/opcodes/opcode-2c-sparse-switch.html | |
| parent | 31e30105703263782efd450d356cd67ea01af3b7 (diff) | |
| download | android_dalvik-f72d5de56a522ac3be03873bdde26f23a5eeeb3c.tar.gz android_dalvik-f72d5de56a522ac3be03873bdde26f23a5eeeb3c.tar.bz2 android_dalvik-f72d5de56a522ac3be03873bdde26f23a5eeeb3c.zip | |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'docs/opcodes/opcode-2c-sparse-switch.html')
| -rw-r--r-- | docs/opcodes/opcode-2c-sparse-switch.html | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/docs/opcodes/opcode-2c-sparse-switch.html b/docs/opcodes/opcode-2c-sparse-switch.html deleted file mode 100644 index cec581e59..000000000 --- a/docs/opcodes/opcode-2c-sparse-switch.html +++ /dev/null @@ -1,110 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<html> - -<head> -<title>sparse-switch</title> -<link rel=stylesheet href="opcode.css"> -</head> - -<body> - -<h1>sparse-switch</h1> - -<h2>Purpose</h2> - -<p> -Jump to a new instruction based on the value in the given register, using an -ordered table of value-offset pairs, or fall through to the next instruction if -there is no match. -</p> -<p> -Note: The address of the table is guaranteed to be even (that is, 4-byte -aligned). If the code size of the method is otherwise odd, then an extra code -unit is inserted between the main code and the table whose value is the same as -a nop. -</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>2c 31t</td> - <td>sparse-switch vAA, +BBBBBBBB <i>(with supplemental data as - specified below in "<code>sparse-switch</code> Format")</i></td> - <td><code>A:</code> register to test<br/> - <code>B:</code> signed "branch" offset to table data (32 bits)</td> -</tr> -</tbody> -</table> - -<h2>Constraints</h2> - -<ul> - <li> - A must be a valid register index in the current stack frame. - </li> - <li> - Let PC be the address of the packed-switch instruction in the code array of - the current method. Then T = PC + B with the following properties: - <ul> - <li> - T must be 4-byte-aligned. - </li> - <li> - T must be in the same method. - </li> - <li> - T must point to a sparse-switch data table. - </li> - </ul> - </li> -</ul> - -<h2>Behavior</h2> - -<ul> - <li> - The value of vA is used as a lookup key inside the sparse table data. - </li> - <li> - If there exists an I with 0 <= I < table.size such that table.keys[I] = vA, - then the jump target is determined as follows: - <ul> - <li> - PC' = PC + table.targets[I]. - </li> - <li> - Execution will resume at this address. - </li> - </ul> - </li> - <li> - Otherwise execution continues at the instruction following the sparse-switch - statement. - </li> -</ul> - -<h2>Exceptions</h2> - -<p> -None. -</p> - -<h2>Notes</h2> - -<p> -The low-to-high ordering of the keys allows the VM to employ binary search for -the lookup, resulting in O(log table.size) comparisons. -</p> - -</body> -</html> |
