Lines Matching refs:Offset
95 uint64_t Offset = 0) { in formatSymbol() argument
102 if (Offset) in formatSymbol()
103 OS << format("+0x%" PRIX64 " (0x%" PRIX64 ")", Offset, Address); in formatSymbol()
253 uint64_t Offset) { in getRelocatedSymbol() argument
256 if (RelocationOffset == Offset) in getRelocatedSymbol()
276 uint32_t Offset = CoffSym.getValue() + SymbolOffset - CS.getValue(); in getPreferredSymbol() local
277 if (Offset <= SymbolOffset) { in getPreferredSymbol()
278 SymbolOffset = Offset; in getPreferredSymbol()
326 bool Decoder::opcode_0xxxxxxx(const uint8_t *OC, unsigned &Offset, in opcode_0xxxxxxx() argument
328 uint8_t Imm = OC[Offset] & 0x7f; in opcode_0xxxxxxx()
330 OC[Offset], in opcode_0xxxxxxx()
333 ++Offset; in opcode_0xxxxxxx()
337 bool Decoder::opcode_10Lxxxxx(const uint8_t *OC, unsigned &Offset, in opcode_10Lxxxxx() argument
339 unsigned Link = (OC[Offset] & 0x20) >> 5; in opcode_10Lxxxxx()
341 | ((OC[Offset + 0] & 0x1f) << 8) in opcode_10Lxxxxx()
342 | ((OC[Offset + 1] & 0xff) << 0); in opcode_10Lxxxxx()
347 OC[Offset + 0], OC[Offset + 1], in opcode_10Lxxxxx()
352 Offset += 2; in opcode_10Lxxxxx()
356 bool Decoder::opcode_1100xxxx(const uint8_t *OC, unsigned &Offset, in opcode_1100xxxx() argument
360 OC[Offset], OC[Offset] & 0xf); in opcode_1100xxxx()
363 OC[Offset], OC[Offset] & 0xf); in opcode_1100xxxx()
364 ++Offset; in opcode_1100xxxx()
368 bool Decoder::opcode_11010Lxx(const uint8_t *OC, unsigned &Offset, in opcode_11010Lxx() argument
370 unsigned Link = (OC[Offset] & 0x4) >> 2; in opcode_11010Lxx()
371 unsigned Count = (OC[Offset] & 0x3); in opcode_11010Lxx()
376 SW.startLine() << format("0x%02x ; %s ", OC[Offset], in opcode_11010Lxx()
381 ++Offset; in opcode_11010Lxx()
385 bool Decoder::opcode_11011Lxx(const uint8_t *OC, unsigned &Offset, in opcode_11011Lxx() argument
387 unsigned Link = (OC[Offset] & 0x4) >> 2; in opcode_11011Lxx()
388 unsigned Count = (OC[Offset] & 0x3) + 4; in opcode_11011Lxx()
393 SW.startLine() << format("0x%02x ; %s.w ", OC[Offset], in opcode_11011Lxx()
398 ++Offset; in opcode_11011Lxx()
402 bool Decoder::opcode_11100xxx(const uint8_t *OC, unsigned &Offset, in opcode_11100xxx() argument
404 unsigned High = (OC[Offset] & 0x7); in opcode_11100xxx()
407 SW.startLine() << format("0x%02x ; %s ", OC[Offset], in opcode_11100xxx()
412 ++Offset; in opcode_11100xxx()
416 bool Decoder::opcode_111010xx(const uint8_t *OC, unsigned &Offset, in opcode_111010xx() argument
418 uint16_t Imm = ((OC[Offset + 0] & 0x03) << 8) | ((OC[Offset + 1] & 0xff) << 0); in opcode_111010xx()
421 OC[Offset + 0], OC[Offset + 1], in opcode_111010xx()
425 Offset += 2; in opcode_111010xx()
429 bool Decoder::opcode_1110110L(const uint8_t *OC, unsigned &Offset, in opcode_1110110L() argument
431 uint16_t GPRMask = ((OC[Offset + 0] & 0x01) << (Prologue ? 14 : 15)) in opcode_1110110L()
432 | ((OC[Offset + 1] & 0xff) << 0); in opcode_1110110L()
434 SW.startLine() << format("0x%02x 0x%02x ; %s ", OC[Offset + 0], in opcode_1110110L()
435 OC[Offset + 1], Prologue ? "push" : "pop"); in opcode_1110110L()
439 Offset += 2; in opcode_1110110L()
443 bool Decoder::opcode_11101110(const uint8_t *OC, unsigned &Offset, in opcode_11101110() argument
447 if (OC[Offset + 1] & 0xf0) in opcode_11101110()
449 OC[Offset + 0], OC[Offset + 1]); in opcode_11101110()
453 OC[Offset + 0], OC[Offset + 1], OC[Offset + 1] & 0x0f); in opcode_11101110()
455 Offset += 2; in opcode_11101110()
459 bool Decoder::opcode_11101111(const uint8_t *OC, unsigned &Offset, in opcode_11101111() argument
461 if (OC[Offset + 1] & 0xf0) in opcode_11101111()
463 OC[Offset + 0], OC[Offset + 1]); in opcode_11101111()
467 OC[Offset + 0], OC[Offset + 1], OC[Offset + 1] << 2); in opcode_11101111()
471 OC[Offset + 0], OC[Offset + 1], OC[Offset + 1] << 2); in opcode_11101111()
473 Offset += 2; in opcode_11101111()
477 bool Decoder::opcode_11110101(const uint8_t *OC, unsigned &Offset, in opcode_11110101() argument
479 unsigned Start = (OC[Offset + 1] & 0xf0) >> 4; in opcode_11110101()
480 unsigned End = (OC[Offset + 1] & 0x0f) >> 0; in opcode_11110101()
483 SW.startLine() << format("0x%02x 0x%02x ; %s ", OC[Offset + 0], in opcode_11110101()
484 OC[Offset + 1], Prologue ? "vpush" : "vpop"); in opcode_11110101()
488 Offset += 2; in opcode_11110101()
492 bool Decoder::opcode_11110110(const uint8_t *OC, unsigned &Offset, in opcode_11110110() argument
494 unsigned Start = (OC[Offset + 1] & 0xf0) >> 4; in opcode_11110110()
495 unsigned End = (OC[Offset + 1] & 0x0f) >> 0; in opcode_11110110()
498 SW.startLine() << format("0x%02x 0x%02x ; %s ", OC[Offset + 0], in opcode_11110110()
499 OC[Offset + 1], Prologue ? "vpush" : "vpop"); in opcode_11110110()
503 Offset += 2; in opcode_11110110()
507 bool Decoder::opcode_11110111(const uint8_t *OC, unsigned &Offset, in opcode_11110111() argument
509 uint32_t Imm = (OC[Offset + 1] << 8) | (OC[Offset + 2] << 0); in opcode_11110111()
512 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], in opcode_11110111()
516 Offset += 3; in opcode_11110111()
520 bool Decoder::opcode_11111000(const uint8_t *OC, unsigned &Offset, in opcode_11111000() argument
522 uint32_t Imm = (OC[Offset + 1] << 16) in opcode_11111000()
523 | (OC[Offset + 2] << 8) in opcode_11111000()
524 | (OC[Offset + 3] << 0); in opcode_11111000()
528 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], OC[Offset + 3], in opcode_11111000()
531 Offset += 4; in opcode_11111000()
535 bool Decoder::opcode_11111001(const uint8_t *OC, unsigned &Offset, in opcode_11111001() argument
537 uint32_t Imm = (OC[Offset + 1] << 8) | (OC[Offset + 2] << 0); in opcode_11111001()
541 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], in opcode_11111001()
544 Offset += 3; in opcode_11111001()
548 bool Decoder::opcode_11111010(const uint8_t *OC, unsigned &Offset, in opcode_11111010() argument
550 uint32_t Imm = (OC[Offset + 1] << 16) in opcode_11111010()
551 | (OC[Offset + 2] << 8) in opcode_11111010()
552 | (OC[Offset + 3] << 0); in opcode_11111010()
556 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], OC[Offset + 3], in opcode_11111010()
559 Offset += 4; in opcode_11111010()
563 bool Decoder::opcode_11111011(const uint8_t *OC, unsigned &Offset, in opcode_11111011() argument
565 SW.startLine() << format("0x%02x ; nop\n", OC[Offset]); in opcode_11111011()
566 ++Offset; in opcode_11111011()
570 bool Decoder::opcode_11111100(const uint8_t *OC, unsigned &Offset, in opcode_11111100() argument
572 SW.startLine() << format("0x%02x ; nop.w\n", OC[Offset]); in opcode_11111100()
573 ++Offset; in opcode_11111100()
577 bool Decoder::opcode_11111101(const uint8_t *OC, unsigned &Offset, in opcode_11111101() argument
579 SW.startLine() << format("0x%02x ; bx <reg>\n", OC[Offset]); in opcode_11111101()
580 ++Offset; in opcode_11111101()
584 bool Decoder::opcode_11111110(const uint8_t *OC, unsigned &Offset, in opcode_11111110() argument
586 SW.startLine() << format("0x%02x ; b.w <target>\n", OC[Offset]); in opcode_11111110()
587 ++Offset; in opcode_11111110()
591 bool Decoder::opcode_11111111(const uint8_t *OC, unsigned &Offset, in opcode_11111111() argument
593 ++Offset; in opcode_11111111()
598 bool Decoder::opcode_alloc_s(const uint8_t *OC, unsigned &Offset, in opcode_alloc_s() argument
600 uint32_t NumBytes = (OC[Offset] & 0x1F) << 4; in opcode_alloc_s()
601 SW.startLine() << format("0x%02x ; %s sp, #%u\n", OC[Offset], in opcode_alloc_s()
604 ++Offset; in opcode_alloc_s()
608 bool Decoder::opcode_save_r19r20_x(const uint8_t *OC, unsigned &Offset, in opcode_save_r19r20_x() argument
610 uint32_t Off = (OC[Offset] & 0x1F) << 3; in opcode_save_r19r20_x()
613 "0x%02x ; stp x19, x20, [sp, #-%u]!\n", OC[Offset], Off); in opcode_save_r19r20_x()
616 "0x%02x ; ldp x19, x20, [sp], #%u\n", OC[Offset], Off); in opcode_save_r19r20_x()
617 ++Offset; in opcode_save_r19r20_x()
621 bool Decoder::opcode_save_fplr(const uint8_t *OC, unsigned &Offset, in opcode_save_fplr() argument
623 uint32_t Off = (OC[Offset] & 0x3F) << 3; in opcode_save_fplr()
625 "0x%02x ; %s x29, x30, [sp, #%u]\n", OC[Offset], in opcode_save_fplr()
627 ++Offset; in opcode_save_fplr()
631 bool Decoder::opcode_save_fplr_x(const uint8_t *OC, unsigned &Offset, in opcode_save_fplr_x() argument
633 uint32_t Off = ((OC[Offset] & 0x3F) + 1) << 3; in opcode_save_fplr_x()
636 "0x%02x ; stp x29, x30, [sp, #-%u]!\n", OC[Offset], Off); in opcode_save_fplr_x()
639 "0x%02x ; ldp x29, x30, [sp], #%u\n", OC[Offset], Off); in opcode_save_fplr_x()
640 ++Offset; in opcode_save_fplr_x()
644 bool Decoder::opcode_alloc_m(const uint8_t *OC, unsigned &Offset, in opcode_alloc_m() argument
646 uint32_t NumBytes = ((OC[Offset] & 0x07) << 8); in opcode_alloc_m()
647 NumBytes |= (OC[Offset + 1] & 0xFF); in opcode_alloc_m()
650 OC[Offset], OC[Offset + 1], in opcode_alloc_m()
653 Offset += 2; in opcode_alloc_m()
657 bool Decoder::opcode_save_regp(const uint8_t *OC, unsigned &Offset, in opcode_save_regp() argument
659 uint32_t Reg = ((OC[Offset] & 0x03) << 8); in opcode_save_regp()
660 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_regp()
663 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_regp()
666 OC[Offset], OC[Offset + 1], in opcode_save_regp()
668 Offset += 2; in opcode_save_regp()
672 bool Decoder::opcode_save_regp_x(const uint8_t *OC, unsigned &Offset, in opcode_save_regp_x() argument
674 uint32_t Reg = ((OC[Offset] & 0x03) << 8); in opcode_save_regp_x()
675 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_regp_x()
678 uint32_t Off = ((OC[Offset + 1] & 0x3F) + 1) << 3; in opcode_save_regp_x()
682 OC[Offset], OC[Offset + 1], Reg, in opcode_save_regp_x()
687 OC[Offset], OC[Offset + 1], Reg, in opcode_save_regp_x()
689 Offset += 2; in opcode_save_regp_x()
693 bool Decoder::opcode_save_reg(const uint8_t *OC, unsigned &Offset, in opcode_save_reg() argument
695 uint32_t Reg = (OC[Offset] & 0x03) << 8; in opcode_save_reg()
696 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_reg()
699 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_reg()
701 OC[Offset], OC[Offset + 1], in opcode_save_reg()
704 Offset += 2; in opcode_save_reg()
708 bool Decoder::opcode_save_reg_x(const uint8_t *OC, unsigned &Offset, in opcode_save_reg_x() argument
710 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_reg_x()
711 Reg |= (OC[Offset + 1] & 0xE0); in opcode_save_reg_x()
714 uint32_t Off = ((OC[Offset + 1] & 0x1F) + 1) << 3; in opcode_save_reg_x()
717 OC[Offset], OC[Offset + 1], Reg, Off); in opcode_save_reg_x()
720 OC[Offset], OC[Offset + 1], Reg, Off); in opcode_save_reg_x()
721 Offset += 2; in opcode_save_reg_x()
725 bool Decoder::opcode_save_lrpair(const uint8_t *OC, unsigned &Offset, in opcode_save_lrpair() argument
727 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_lrpair()
728 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_lrpair()
732 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_lrpair()
734 OC[Offset], OC[Offset + 1], in opcode_save_lrpair()
737 Offset += 2; in opcode_save_lrpair()
741 bool Decoder::opcode_save_fregp(const uint8_t *OC, unsigned &Offset, in opcode_save_fregp() argument
743 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_fregp()
744 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_fregp()
747 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_fregp()
749 OC[Offset], OC[Offset + 1], in opcode_save_fregp()
752 Offset += 2; in opcode_save_fregp()
756 bool Decoder::opcode_save_fregp_x(const uint8_t *OC, unsigned &Offset, in opcode_save_fregp_x() argument
758 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_fregp_x()
759 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_fregp_x()
762 uint32_t Off = ((OC[Offset + 1] & 0x3F) + 1) << 3; in opcode_save_fregp_x()
765 "0x%02x%02x ; stp d%u, d%u, [sp, #-%u]!\n", OC[Offset], in opcode_save_fregp_x()
766 OC[Offset + 1], Reg, Reg + 1, Off); in opcode_save_fregp_x()
769 "0x%02x%02x ; ldp d%u, d%u, [sp], #%u\n", OC[Offset], in opcode_save_fregp_x()
770 OC[Offset + 1], Reg, Reg + 1, Off); in opcode_save_fregp_x()
771 Offset += 2; in opcode_save_fregp_x()
775 bool Decoder::opcode_save_freg(const uint8_t *OC, unsigned &Offset, in opcode_save_freg() argument
777 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_freg()
778 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_freg()
781 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_freg()
783 OC[Offset], OC[Offset + 1], in opcode_save_freg()
786 Offset += 2; in opcode_save_freg()
790 bool Decoder::opcode_save_freg_x(const uint8_t *OC, unsigned &Offset, in opcode_save_freg_x() argument
792 uint32_t Reg = ((OC[Offset + 1] & 0xE0) >> 5) + 8; in opcode_save_freg_x()
793 uint32_t Off = ((OC[Offset + 1] & 0x1F) + 1) << 3; in opcode_save_freg_x()
796 "0x%02x%02x ; str d%u, [sp, #-%u]!\n", OC[Offset], in opcode_save_freg_x()
797 OC[Offset + 1], Reg, Off); in opcode_save_freg_x()
800 "0x%02x%02x ; ldr d%u, [sp], #%u\n", OC[Offset], in opcode_save_freg_x()
801 OC[Offset + 1], Reg, Off); in opcode_save_freg_x()
802 Offset += 2; in opcode_save_freg_x()
806 bool Decoder::opcode_alloc_l(const uint8_t *OC, unsigned &Offset, in opcode_alloc_l() argument
809 (OC[Offset + 1] << 16) | (OC[Offset + 2] << 8) | (OC[Offset + 3] << 0); in opcode_alloc_l()
812 "0x%02x%02x%02x%02x ; %s sp, #%u\n", OC[Offset], OC[Offset + 1], in opcode_alloc_l()
813 OC[Offset + 2], OC[Offset + 3], in opcode_alloc_l()
815 Offset += 4; in opcode_alloc_l()
819 bool Decoder::opcode_setfp(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_setfp() argument
821 SW.startLine() << format("0x%02x ; mov %s, %s\n", OC[Offset], in opcode_setfp()
824 ++Offset; in opcode_setfp()
828 bool Decoder::opcode_addfp(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_addfp() argument
830 unsigned NumBytes = OC[Offset + 1] << 3; in opcode_addfp()
832 "0x%02x%02x ; %s %s, %s, #%u\n", OC[Offset], OC[Offset + 1], in opcode_addfp()
836 Offset += 2; in opcode_addfp()
840 bool Decoder::opcode_nop(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_nop() argument
842 SW.startLine() << format("0x%02x ; nop\n", OC[Offset]); in opcode_nop()
843 ++Offset; in opcode_nop()
847 bool Decoder::opcode_end(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_end() argument
849 SW.startLine() << format("0x%02x ; end\n", OC[Offset]); in opcode_end()
850 ++Offset; in opcode_end()
854 bool Decoder::opcode_end_c(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_end_c() argument
856 SW.startLine() << format("0x%02x ; end_c\n", OC[Offset]); in opcode_end_c()
857 ++Offset; in opcode_end_c()
861 bool Decoder::opcode_save_next(const uint8_t *OC, unsigned &Offset, in opcode_save_next() argument
864 SW.startLine() << format("0x%02x ; save next\n", OC[Offset]); in opcode_save_next()
867 OC[Offset]); in opcode_save_next()
868 ++Offset; in opcode_save_next()
872 bool Decoder::opcode_trap_frame(const uint8_t *OC, unsigned &Offset, in opcode_trap_frame() argument
874 SW.startLine() << format("0x%02x ; trap frame\n", OC[Offset]); in opcode_trap_frame()
875 ++Offset; in opcode_trap_frame()
879 bool Decoder::opcode_machine_frame(const uint8_t *OC, unsigned &Offset, in opcode_machine_frame() argument
882 OC[Offset]); in opcode_machine_frame()
883 ++Offset; in opcode_machine_frame()
887 bool Decoder::opcode_context(const uint8_t *OC, unsigned &Offset, in opcode_context() argument
889 SW.startLine() << format("0x%02x ; context\n", OC[Offset]); in opcode_context()
890 ++Offset; in opcode_context()
894 bool Decoder::opcode_clear_unwound_to_call(const uint8_t *OC, unsigned &Offset, in opcode_clear_unwound_to_call() argument
897 OC[Offset]); in opcode_clear_unwound_to_call()
898 ++Offset; in opcode_clear_unwound_to_call()
902 void Decoder::decodeOpcodes(ArrayRef<uint8_t> Opcodes, unsigned Offset, in decodeOpcodes() argument
904 assert((!Prologue || Offset == 0) && "prologue should always use offset 0"); in decodeOpcodes()
907 for (unsigned OI = Offset, OE = Opcodes.size(); !Terminated && OI < OE; ) { in decodeOpcodes()
940 uint64_t Offset = VA - SectionVA; in dumpXDataRecord() local
942 reinterpret_cast<const ulittle32_t *>(Contents.data() + Offset); in dumpXDataRecord()
947 if (Contents.size() - Offset < 8) in dumpXDataRecord()
965 if ((int64_t)(Contents.size() - Offset - 4 * HeaderWords(XData) - in dumpXDataRecord()
1017 COFF, Section, Offset + HandlerOffset * sizeof(uint32_t), in dumpXDataRecord()
1044 const SectionRef Section, uint64_t Offset, in dumpUnpackedEntry() argument
1051 COFF, Section, Offset, RF.BeginAddress, FunctionAddress, FunctionOffset, in dumpUnpackedEntry()
1056 COFF, Section, Offset + 4, RF.ExceptionInformationRVA(), XDataAddress, in dumpUnpackedEntry()
1112 const SectionRef Section, uint64_t Offset, in dumpPackedEntry() argument
1120 COFF, Section, Offset, RF.BeginAddress, FunctionAddress, FunctionOffset, in dumpPackedEntry()
1210 const SectionRef Section, uint64_t Offset, in dumpPackedARM64Entry() argument
1219 COFF, Section, Offset, RF.BeginAddress, FunctionAddress, FunctionOffset, in dumpPackedARM64Entry()
1340 uint64_t Offset = PDataEntrySize * Index; in dumpProcedureDataEntry() local
1342 reinterpret_cast<const ulittle32_t *>(Contents.data() + Offset); in dumpProcedureDataEntry()
1347 return dumpUnpackedEntry(COFF, Section, Offset, Index, Entry); in dumpProcedureDataEntry()
1350 return dumpPackedARM64Entry(COFF, Section, Offset, Index, EntryARM64); in dumpProcedureDataEntry()
1352 return dumpPackedEntry(COFF, Section, Offset, Index, Entry); in dumpProcedureDataEntry()