130 { 0x10, 0x00,
"addl " },
131 { 0x10, 0x40,
"addl/v " },
132 { 0x10, 0x20,
"addq " },
133 { 0x10, 0x60,
"addq/v " },
134 { 0x10, 0x09,
"subl " },
135 { 0x10, 0x49,
"subl/v " },
136 { 0x10, 0x29,
"subq " },
137 { 0x10, 0x69,
"subq/v " },
138 { 0x10, 0x2D,
"cmpeq " },
139 { 0x10, 0x4D,
"cmplt " },
140 { 0x10, 0x6D,
"cmple " },
141 { 0x10, 0x1D,
"cmpult " },
142 { 0x10, 0x3D,
"cmpule " },
143 { 0x10, 0x0F,
"cmpbge " },
144 { 0x10, 0x02,
"s4addl " },
145 { 0x10, 0x0b,
"s4subl " },
146 { 0x10, 0x22,
"s4addq " },
147 { 0x10, 0x2b,
"s4subq " },
148 { 0x10, 0x12,
"s8addl " },
149 { 0x10, 0x1b,
"s8subl " },
150 { 0x10, 0x32,
"s8addq " },
151 { 0x10, 0x3b,
"s8subq " },
152 { 0x11, 0x00,
"and " },
153 { 0x11, 0x20,
"or " },
154 { 0x11, 0x40,
"xor " },
155 { 0x11, 0x08,
"andnot " },
156 { 0x11, 0x28,
"ornot " },
157 { 0x11, 0x48,
"xornot " },
158 { 0x11, 0x24,
"cmoveq " },
159 { 0x11, 0x44,
"cmovlt " },
160 { 0x11, 0x64,
"cmovle " },
161 { 0x11, 0x26,
"cmovne " },
162 { 0x11, 0x46,
"cmovge " },
163 { 0x11, 0x66,
"cmovgt " },
164 { 0x11, 0x14,
"cmovlbs" },
165 { 0x11, 0x16,
"cmovlbc" },
166 { 0x12, 0x39,
"sll " },
167 { 0x12, 0x3C,
"sra " },
168 { 0x12, 0x34,
"srl " },
169 { 0x12, 0x30,
"zap " },
170 { 0x12, 0x31,
"zapnot " },
171 { 0x12, 0x06,
"extbl " },
172 { 0x12, 0x16,
"extwl " },
173 { 0x12, 0x26,
"extll " },
174 { 0x12, 0x36,
"extql " },
175 { 0x12, 0x5a,
"extwh " },
176 { 0x12, 0x6a,
"extlh " },
177 { 0x12, 0x7a,
"extqh " },
178 { 0x12, 0x0b,
"insbl " },
179 { 0x12, 0x1b,
"inswl " },
180 { 0x12, 0x2b,
"insll " },
181 { 0x12, 0x3b,
"insql " },
182 { 0x12, 0x57,
"inswh " },
183 { 0x12, 0x67,
"inslh " },
184 { 0x12, 0x77,
"insqh " },
185 { 0x12, 0x02,
"mskbl " },
186 { 0x12, 0x12,
"mskwl " },
187 { 0x12, 0x22,
"mskll " },
188 { 0x12, 0x32,
"mskql " },
189 { 0x12, 0x52,
"mskwh " },
190 { 0x12, 0x62,
"msklh " },
191 { 0x12, 0x72,
"mskqh " },
192 { 0x13, 0x00,
"mull " },
193 { 0x13, 0x20,
"mulq " },
194 { 0x13, 0x40,
"mull/v " },
195 { 0x13, 0x60,
"mulq/v " },
196 { 0x13, 0x30,
"umulh " },
197 { 0x16, 0x080,
"fadd " },
198 { 0x16, 0x0a0,
"dadd " },
199 { 0x16, 0x081,
"fsub " },
200 { 0x16, 0x0a1,
"dsub " },
201 { 0x16, 0x082,
"fmul " },
202 { 0x16, 0x0a2,
"dmul " },
203 { 0x16, 0x083,
"fdiv " },
204 { 0x16, 0x0a3,
"ddiv " },
205 { 0x16, 0x580,
"fadds " },
206 { 0x16, 0x5a0,
"dadds " },
207 { 0x16, 0x581,
"fsubs " },
208 { 0x16, 0x5a1,
"dsubs " },
209 { 0x16, 0x582,
"fmuls " },
210 { 0x16, 0x5a2,
"dmuls " },
211 { 0x16, 0x583,
"fdivs " },
212 { 0x16, 0x5a3,
"ddivs " },
213 { 0x16, 0x0ac,
"cvtdf " },
214 { 0x16, 0x0bc,
"cvtlf " },
215 { 0x16, 0x0be,
"cvtld " },
216 { 0x16, 0x0af,
"cvtdl " },
217 { 0x16, 0x02f,
"cvtdlc " },
218 { 0x17, 0x030,
"cvtli " },
219 { 0x16, 0x1af,
"cvtdlv " },
220 { 0x16, 0x12f,
"cvtdlcv" },
221 { 0x17, 0x130,
"cvtliv " },
222 { 0x16, 0x5ac,
"cvtdfs " },
223 { 0x16, 0x5af,
"cvtdls " },
224 { 0x16, 0x52f,
"cvtdlcs" },
225 { 0x16, 0x0a4,
"fcmpun " },
226 { 0x16, 0x0a5,
"fcmpeq " },
227 { 0x16, 0x0a6,
"fcmplt " },
228 { 0x16, 0x0a7,
"fcmple " },
229 { 0x16, 0x5a4,
"fcmpuns" },
230 { 0x16, 0x5a5,
"fcmpeqs" },
231 { 0x16, 0x5a6,
"fcmplts" },
232 { 0x16, 0x5a7,
"fcmples" },
233 { 0x17, 0x020,
"fmov " },
234 { 0x17, 0x021,
"fmovn " },
235 { 0x1c, 0x0,
"bsext " },
236 { 0x1c, 0x1,
"wsext " },
262 op = (c >> 26) & 0x3f;
263 opfun = (c >> 5) & 0x7f;
264 ra = (c >> 21) & 0x1f;
265 rb = (c >> 16) & 0x1f;
266 rc = (c >> 0) & 0x1f;
267 lit = (c >> 13) & 0xff;
269 printf(
"0x%016lx: %08x ", (
u8) code, c);
273 switch ((c >> 14) & 3) {
289 if (ra == 31 && rb == 26) {
308 s4 disp = (c << 16) >> 16;
310 if (op == 0x18 && ra == 0 && ra == 0 && disp == 0)
320 printf(
"%s $f%d,%d(%s)\n",
ops[op].
name, ra, (c << 16) >> 16,
325 if (op == 0x30 && ra == 31)
326 printf(
"br 0x%016lx\n", (
u8) code + 4 + ((c << 11) >> 9));
327 else if (op == 0x34 && ra == 26)
328 printf(
"brs 0x%016lx\n", (
u8) code + 4 + ((c << 11) >> 9));
332 (
u8) code + 4 + ((c << 11) >> 9));
336 s4 fopfun = (c >> 5) & 0x7ff;
338 if (op == 0x17 && fopfun == 0x020 && ra == rb) {
339 if (ra == 31 && rc == 31)
342 printf(
"fmov $f%d,$f%d\n", ra, rc);
345 for (i = 0;
op3s[
i].name; i++)
347 printf(
"%s $f%d,$f%d,$f%d\n",
op3s[i].name, ra, rb, rc);
350 printf(
"%s%x $f%d,$f%d,$f%d\n",
ops[op].name, fopfun, ra, rb, rc);
355 if (op == 0x11 && opfun == 0x20 && ra == rb && ~(c&0x1000)) {
356 if (ra == 31 && rc == 31)
365 for (i = 0;
op3s[
i].name; i++) {
382 printf(
"UNDEF %x(%x) $%d,%d,$%d\n", op, opfun, ra, lit, rc);
384 printf(
"UNDEF %x(%x) $%d,$%d,$%d\n", op, opfun, ra, rb, rc);
405 printf(
" --- disassembler listing ---\n");
406 for (; start < end; )
u1 * disassinstr(u1 *code)
JNIEnv jclass jobject const char * name
const char * abi_registers_integer_name[]
void disassemble(u1 *start, u1 *end)