| The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 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>move-result</title> |
| 7 | <link rel=stylesheet href="opcode.css"> |
| 8 | </head> |
| 9 | |
| 10 | <body> |
| 11 | |
| 12 | <h1>move-result</h1> |
| 13 | |
| 14 | <h2>Purpose</h2> |
| 15 | |
| 16 | <p> |
| 17 | Move the single-word non-object result of the most recent invoke-kind into the |
| 18 | indicated register. This must be done as the instruction immediately after an |
| 19 | invoke-kind whose (single-word, non-object) result is not to be ignored; |
| Carl Shapiro | de75089 | 2010-06-08 16:37:12 -0700 | [diff] [blame] | 20 | anywhere else is invalid. |
| The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 21 | </p> |
| 22 | |
| 23 | <h2>Details</h2> |
| 24 | |
| 25 | <table class="instruc"> |
| 26 | <thead> |
| 27 | <tr> |
| 28 | <th>Op & Format</th> |
| 29 | <th>Mnemonic / Syntax</th> |
| 30 | <th>Arguments</th> |
| 31 | </tr> |
| 32 | </thead> |
| 33 | <tbody> |
| 34 | <tr> |
| 35 | <td>0a 11x</td> |
| 36 | <td>move-result vAA</td> |
| 37 | <td><code>A:</code> destination register (8 bits)</td> |
| 38 | </tr> |
| 39 | </tbody> |
| 40 | </table> |
| 41 | |
| 42 | <h2>Constraints</h2> |
| 43 | |
| 44 | <ul> |
| 45 | <li> |
| 46 | A must be a valid register index in the current stack frame. |
| 47 | </li> |
| 48 | <li> |
| 49 | The instruction must be immediately preceded (in the code array) by an |
| 50 | invoke-kind instruction. |
| 51 | </li> |
| 52 | <li> |
| 53 | The instruction must be immediately reached (in the actual control flow) |
| 54 | through returning from this invoke-kind instruction (it must not be jumped |
| 55 | to). |
| 56 | </li> |
| 57 | <li> |
| 58 | The result delivered by the invoke-kind instruction must not be a reference |
| 59 | value or require a register pair. |
| Carl Shapiro | de75089 | 2010-06-08 16:37:12 -0700 | [diff] [blame] | 60 | </li> |
| The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 61 | </ul> |
| 62 | |
| 63 | <h2>Behavior</h2> |
| 64 | |
| 65 | <ul> |
| 66 | <li> |
| 67 | The result delivered by the invoke-kind instruction is moved to register |
| 68 | vA, that is, vA' = result. |
| 69 | </li> |
| 70 | <li> |
| 71 | If register v(A-1) is the lower half of a register pair, register v(A-1)' |
| 72 | becomes undefined. |
| 73 | </li> |
| 74 | <li> |
| 75 | If register v(A+1) is the upper half of a register pair, register v(A+1)' |
| 76 | becomes undefined. |
| 77 | </li> |
| 78 | </ul> |
| Carl Shapiro | de75089 | 2010-06-08 16:37:12 -0700 | [diff] [blame] | 79 | |
| The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 80 | <h2>Exceptions</h2> |
| 81 | |
| 82 | <p> |
| 83 | None. |
| 84 | </p> |
| 85 | |
| 86 | <h2>Notes</h2> |
| 87 | |
| 88 | <p> |
| 89 | This instruction can also be thought of as reading the contents of a special |
| 90 | "result" register that is made valid and defined by executing a non-void return |
| 91 | instruction or a filled-new-array instruction. The execution of any other |
| Carl Shapiro | de75089 | 2010-06-08 16:37:12 -0700 | [diff] [blame] | 92 | instruction (including this one) renders this special register invalid. |
| The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 93 | </p> |
| 94 | |
| 95 | </body> |
| 96 | </html> |