blob: 5ca92b6f5abf85c99300b624cf13ef8c9b5214ce [file] [log] [blame]
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08001<!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>goto</title>
7<link rel=stylesheet href="opcode.css">
8</head>
9
10<body>
11
12<h1>goto</h1>
13
14<h2>Purpose</h2>
15
16<p>
17Unconditionally jump to the indicated instruction.
18</p>
19<p>
20Note: The branch offset may not be 0. (A spin loop may be legally constructed
21either with goto/32 or by including a nop as a target before the branch.)
22</p>
23
24<h2>Details</h2>
25
26<table class="instruc">
27<thead>
28<tr>
29 <th>Op &amp; Format</th>
30 <th>Mnemonic / Syntax</th>
31 <th>Arguments</th>
32</tr>
33</thead>
34<tbody>
35<tr>
36 <td>28 10t</td>
37 <td>goto +AA</td>
38 <td><code>A:</code> signed branch offset (8 bits)</td>
39</tr>
40</tbody>
41</table>
42
43<h2>Constraints</h2>
44
45<ul>
46 <li>
47 A must point to a valid bytecode instruction inside the current method.
48 </li>
49 <li>
50 A must not be 0.
51 </li>
52</ul>
53
54<h2>Behavior</h2>
55
56<ul>
57 <li>
58 The (otherwise invisible) program counter PC is set to the address of the
59 instruction plus the given offset, that is, PC' = PC(goto) + A.
60 </li>
61 <li>
62 Executions resumes at PC'.
63 </li>
64</ul>
65
66<h2>Exceptions</h2>
67
68<p>
69None.
70</p>
71
72</body>
73</html>