OSDN Git Service

Fix build.
[android-x86/dalvik.git] / docs / opcodes / opcode-d8-binop-lit8.html
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>binop/lit8</title>
7 <link rel=stylesheet href="opcode.css">
8 </head>
9
10 <body>
11
12 <h1>binop/lit8</h1>
13
14 <h2>Purpose</h2>
15
16 <p>
17 Perform the indicated binary op on the indicated register (first argument) and
18 literal value (second argument), storing the result in the destination register.
19 </p>
20
21 <h2>Details</h2>
22
23 <table class="instruc">
24 <thead>
25 <tr>
26   <th>Op &amp; Format</th>
27   <th>Mnemonic / Syntax</th>
28   <th>Arguments</th>
29 </tr>
30 </thead>
31 <tbody>
32 <tr>
33   <td>d8..e2 22b</td>
34   <td><i>binop</i>/lit8 vAA, vBB, #+CC<br/>
35     d8: add-int/lit8<br/>
36     d9: rsub-int/lit8<br/>
37     da: mul-int/lit8<br/>
38     db: div-int/lit8<br/>
39     dc: rem-int/lit8<br/>
40     dd: and-int/lit8<br/>
41     de: or-int/lit8<br/>
42     df: xor-int/lit8<br/>
43     e0: shl-int/lit8<br/>
44     e1: shr-int/lit8<br/>
45     e2: ushr-int/lit8
46   </td>
47   <td><code>A:</code> destination register (8 bits)<br/>
48     <code>B:</code> source register (8 bits)<br/>
49     <code>C:</code> signed int constant (8 bits)</td>
50 </tr>
51 </tbody>
52 </table>
53
54 <h2>Constraints</h2>
55
56 <ul>
57   <li>
58     Both A and B must be valid register indices in the current stackframe.
59   </li>
60   <li>
61     Registers vA and vB must be defined. They must both contain integer values.
62   </li>
63   <li>
64     C is an immediate, signed integer constant taken from the instruction stream
65     (actually this means there are no special requirements for C at all).
66   </li>
67 </ul>
68
69 <h2>Behavior</h2>
70
71 <ul>
72   <li>
73     The given operation &lt;binop&gt; is performed according to the semantics
74     specified in table XXX.
75   </li>
76   <li>
77     Argument C is sign-extended to 32 bits before.
78   </li>
79   <li>
80     The result is stored in register vA, that is, vA'=vB &lt;binop&gt; vC.
81   </li>
82   <li>
83     As usual, neighboring registers might get undefined, if vA was part of a
84     register pair originally.
85   </li>
86 </ul>
87
88 <h2>Exceptions</h2>
89
90 <ul>
91   <li>
92     ArithmeticException if an error occurs during the instruction.
93   </li>
94 </ul>
95
96 </body>
97 </html>