• Home
  • Raw
  • Download

Lines Matching refs:insn

292 static void disasm_register_shift(const disasm_interface_t *di, u_int insn);
293 static void disasm_print_reglist(const disasm_interface_t *di, u_int insn);
294 static void disasm_insn_ldrstr(const disasm_interface_t *di, u_int insn,
296 static void disasm_insn_ldrhstrh(const disasm_interface_t *di, u_int insn,
298 static void disasm_insn_ldcstc(const disasm_interface_t *di, u_int insn,
307 u_int insn = di->di_readword(loc); in disasm() local
316 if ((insn & i_ptr->mask) == i_ptr->pattern) { in disasm()
324 di->di_printf("und%s\t%08x\n", insn_condition(insn), insn); in disasm()
332 di->di_printf("%s%s", i_ptr->name, insn_condition(insn)); in disasm()
347 if (insn & 0x02000000) { in disasm()
348 int rotate= ((insn >> 7) & 0x1e); in disasm()
351 (insn & 0xff) << (32 - rotate) | in disasm()
352 (insn & 0xff) >> rotate); in disasm()
354 disasm_register_shift(di, insn); in disasm()
359 di->di_printf("r%d", ((insn >> 12) & 0x0f)); in disasm()
363 if (((insn >> 12) & 0x0f) == 15) in disasm()
368 di->di_printf("r%d", ((insn >> 16) & 0x0f)); in disasm()
372 di->di_printf("r%d", ((insn >> 8) & 0x0f)); in disasm()
376 di->di_printf("[r%d]", ((insn >> 16) & 0x0f)); in disasm()
380 di->di_printf("r%d", ((insn >> 0) & 0x0f)); in disasm()
384 disasm_insn_ldrstr(di, insn, loc); in disasm()
388 disasm_insn_ldrhstrh(di, insn, loc); in disasm()
392 disasm_print_reglist(di, insn); in disasm()
396 di->di_printf("f%d", (insn >> 12) & 7); in disasm()
400 di->di_printf("f%d", (insn >> 16) & 7); in disasm()
404 if (insn & (1 << 3)) in disasm()
405 di->di_printf("#%s", insn_fpaimm(insn)); in disasm()
407 di->di_printf("f%d", insn & 7); in disasm()
411 di->di_printf("ror #%d", ((insn >> 10) & 3) << 3); in disasm()
415 di->di_printf("#%d", (insn >> 7) & 31); in disasm()
419 di->di_printf("#%d", 1 + ((insn >> 16) & 31)); in disasm()
423 branch = ((insn << 2) & 0x03ffffff); in disasm()
430 branch = ((insn << 2) & 0x03ffffff) | in disasm()
431 (insn >> 23 & 0x00000002); in disasm()
438 di->di_printf("%s", insn_blktrans(insn)); in disasm()
442 di->di_printf("%s", insn_stkblktrans(insn)); in disasm()
446 di->di_printf("0x%08x", (insn & 0x00ffffff)); in disasm()
451 (insn & 0x000fff00) >> 4 | (insn & 0x0000000f)); in disasm()
455 if (insn & 0x00400000) in disasm()
463 if (insn & (1 << 16)) in disasm()
465 if (insn & (1 << 17)) in disasm()
467 if (insn & (1 << 18)) in disasm()
469 if (insn & (1 << 19)) in disasm()
474 if (insn & 0x00400000) in disasm()
479 if (insn & (1 << 22)) in disasm()
484 if (insn & 0x00100000) in disasm()
489 di->di_printf("%s", insn_fpaprec(insn)); in disasm()
496 di->di_printf("%s", insn_fparnd(insn)); in disasm()
500 if (insn & (1 << 21)) in disasm()
505 di->di_printf("p%d", (insn >> 8) & 0x0f); in disasm()
509 disasm_insn_ldcstc(di, insn, loc); in disasm()
513 di->di_printf("0x%08x", insn); in disasm()
517 di->di_printf("%d, ", (insn >> 20) & 0x0f); in disasm()
519 di->di_printf("c%d, c%d, c%d", (insn >> 12) & 0x0f, in disasm()
520 (insn >> 16) & 0x0f, insn & 0x0f); in disasm()
522 di->di_printf(", %d", (insn >> 5) & 0x07); in disasm()
526 di->di_printf("%d, ", (insn >> 21) & 0x07); in disasm()
528 (insn >> 12) & 0x0f, (insn >> 16) & 0x0f, in disasm()
529 insn & 0x0f, (insn >> 5) & 0x07); in disasm()
556 disasm_register_shift(const disasm_interface_t *di, u_int insn) in disasm_register_shift() argument
558 di->di_printf("r%d", (insn & 0x0f)); in disasm_register_shift()
559 if ((insn & 0x00000ff0) == 0) in disasm_register_shift()
561 else if ((insn & 0x00000ff0) == 0x00000060) in disasm_register_shift()
564 if (insn & 0x10) in disasm_register_shift()
565 di->di_printf(", %s r%d", op2_shift(insn), in disasm_register_shift()
566 (insn >> 8) & 0x0f); in disasm_register_shift()
568 di->di_printf(", %s #%d", op2_shift(insn), in disasm_register_shift()
569 (insn >> 7) & 0x1f); in disasm_register_shift()
575 disasm_print_reglist(const disasm_interface_t *di, u_int insn) in disasm_print_reglist() argument
587 if (loop == 16 || !(insn & (1 << loop))) { in disasm_print_reglist()
599 if (insn & (1 << loop)) in disasm_print_reglist()
605 if (insn & (1 << 22)) in disasm_print_reglist()
610 disasm_insn_ldrstr(const disasm_interface_t *di, u_int insn, u_int loc) in disasm_insn_ldrstr() argument
614 offset = insn & 0xfff; in disasm_insn_ldrstr()
615 if ((insn & 0x032f0000) == 0x010f0000) { in disasm_insn_ldrstr()
617 if (insn & 0x00800000) in disasm_insn_ldrstr()
623 di->di_printf("[r%d", (insn >> 16) & 0x0f); in disasm_insn_ldrstr()
624 if ((insn & 0x03000fff) != 0x01000000) { in disasm_insn_ldrstr()
625 di->di_printf("%s, ", (insn & (1 << 24)) ? "" : "]"); in disasm_insn_ldrstr()
626 if (!(insn & 0x00800000)) in disasm_insn_ldrstr()
628 if (insn & (1 << 25)) in disasm_insn_ldrstr()
629 disasm_register_shift(di, insn); in disasm_insn_ldrstr()
633 if (insn & (1 << 24)) in disasm_insn_ldrstr()
639 disasm_insn_ldrhstrh(const disasm_interface_t *di, u_int insn, u_int loc) in disasm_insn_ldrhstrh() argument
643 offset = ((insn & 0xf00) >> 4) | (insn & 0xf); in disasm_insn_ldrhstrh()
644 if ((insn & 0x004f0000) == 0x004f0000) { in disasm_insn_ldrhstrh()
646 if (insn & 0x00800000) in disasm_insn_ldrhstrh()
652 di->di_printf("[r%d", (insn >> 16) & 0x0f); in disasm_insn_ldrhstrh()
653 if ((insn & 0x01400f0f) != 0x01400000) { in disasm_insn_ldrhstrh()
654 di->di_printf("%s, ", (insn & (1 << 24)) ? "" : "]"); in disasm_insn_ldrhstrh()
655 if (!(insn & 0x00800000)) in disasm_insn_ldrhstrh()
657 if (insn & (1 << 22)) in disasm_insn_ldrhstrh()
660 di->di_printf("r%d", (insn & 0x0f)); in disasm_insn_ldrhstrh()
662 if (insn & (1 << 24)) in disasm_insn_ldrhstrh()
668 disasm_insn_ldcstc(const disasm_interface_t *di, u_int insn, u_int __unused loc) in disasm_insn_ldcstc() argument
670 if (((insn >> 8) & 0xf) == 1) in disasm_insn_ldcstc()
671 di->di_printf("f%d, ", (insn >> 12) & 0x07); in disasm_insn_ldcstc()
673 di->di_printf("c%d, ", (insn >> 12) & 0x0f); in disasm_insn_ldcstc()
675 di->di_printf("[r%d", (insn >> 16) & 0x0f); in disasm_insn_ldcstc()
677 di->di_printf("%s, ", (insn & (1 << 24)) ? "" : "]"); in disasm_insn_ldcstc()
679 if (!(insn & (1 << 23))) in disasm_insn_ldcstc()
682 di->di_printf("#0x%03x", (insn & 0xff) << 2); in disasm_insn_ldcstc()
684 if (insn & (1 << 24)) in disasm_insn_ldcstc()
687 if (insn & (1 << 21)) in disasm_insn_ldcstc()