Lines Matching refs:Offset

97                                 uint64_t Offset = 0) {  in formatSymbol()  argument
104 if (Offset) in formatSymbol()
105 OS << format("+0x%X (0x%" PRIX64 ")", Offset, Address); in formatSymbol()
244 uint64_t Offset) { in getRelocatedSymbol() argument
247 if (RelocationOffset == Offset) in getRelocatedSymbol()
253 bool Decoder::opcode_0xxxxxxx(const uint8_t *OC, unsigned &Offset, in opcode_0xxxxxxx() argument
255 uint8_t Imm = OC[Offset] & 0x7f; in opcode_0xxxxxxx()
257 OC[Offset], in opcode_0xxxxxxx()
260 ++Offset; in opcode_0xxxxxxx()
264 bool Decoder::opcode_10Lxxxxx(const uint8_t *OC, unsigned &Offset, in opcode_10Lxxxxx() argument
266 unsigned Link = (OC[Offset] & 0x20) >> 5; in opcode_10Lxxxxx()
268 | ((OC[Offset + 0] & 0x1f) << 8) in opcode_10Lxxxxx()
269 | ((OC[Offset + 1] & 0xff) << 0); in opcode_10Lxxxxx()
274 OC[Offset + 0], OC[Offset + 1], in opcode_10Lxxxxx()
279 Offset += 2; in opcode_10Lxxxxx()
283 bool Decoder::opcode_1100xxxx(const uint8_t *OC, unsigned &Offset, in opcode_1100xxxx() argument
287 OC[Offset], OC[Offset] & 0xf); in opcode_1100xxxx()
290 OC[Offset], OC[Offset] & 0xf); in opcode_1100xxxx()
291 ++Offset; in opcode_1100xxxx()
295 bool Decoder::opcode_11010Lxx(const uint8_t *OC, unsigned &Offset, in opcode_11010Lxx() argument
297 unsigned Link = (OC[Offset] & 0x4) >> 3; in opcode_11010Lxx()
298 unsigned Count = (OC[Offset] & 0x3); in opcode_11010Lxx()
303 SW.startLine() << format("0x%02x ; %s ", OC[Offset], in opcode_11010Lxx()
308 ++Offset; in opcode_11010Lxx()
312 bool Decoder::opcode_11011Lxx(const uint8_t *OC, unsigned &Offset, in opcode_11011Lxx() argument
314 unsigned Link = (OC[Offset] & 0x4) >> 2; in opcode_11011Lxx()
315 unsigned Count = (OC[Offset] & 0x3) + 4; in opcode_11011Lxx()
320 SW.startLine() << format("0x%02x ; %s.w ", OC[Offset], in opcode_11011Lxx()
325 ++Offset; in opcode_11011Lxx()
329 bool Decoder::opcode_11100xxx(const uint8_t *OC, unsigned &Offset, in opcode_11100xxx() argument
331 unsigned High = (OC[Offset] & 0x7); in opcode_11100xxx()
334 SW.startLine() << format("0x%02x ; %s ", OC[Offset], in opcode_11100xxx()
339 ++Offset; in opcode_11100xxx()
343 bool Decoder::opcode_111010xx(const uint8_t *OC, unsigned &Offset, in opcode_111010xx() argument
345 uint16_t Imm = ((OC[Offset + 0] & 0x03) << 8) | ((OC[Offset + 1] & 0xff) << 0); in opcode_111010xx()
348 OC[Offset + 0], OC[Offset + 1], in opcode_111010xx()
352 Offset += 2; in opcode_111010xx()
356 bool Decoder::opcode_1110110L(const uint8_t *OC, unsigned &Offset, in opcode_1110110L() argument
358 uint8_t GPRMask = ((OC[Offset + 0] & 0x01) << (Prologue ? 14 : 15)) in opcode_1110110L()
359 | ((OC[Offset + 1] & 0xff) << 0); in opcode_1110110L()
361 SW.startLine() << format("0x%02x 0x%02x ; %s ", OC[Offset + 0], in opcode_1110110L()
362 OC[Offset + 1], Prologue ? "push" : "pop"); in opcode_1110110L()
366 Offset += 2; in opcode_1110110L()
370 bool Decoder::opcode_11101110(const uint8_t *OC, unsigned &Offset, in opcode_11101110() argument
374 if (OC[Offset + 1] & 0xf0) in opcode_11101110()
376 OC[Offset + 0], OC[Offset + 1]); in opcode_11101110()
380 OC[Offset + 0], OC[Offset + 1], OC[Offset + 1] & 0x0f); in opcode_11101110()
382 Offset += 2; in opcode_11101110()
386 bool Decoder::opcode_11101111(const uint8_t *OC, unsigned &Offset, in opcode_11101111() argument
390 if (OC[Offset + 1] & 0xf0) in opcode_11101111()
392 OC[Offset + 0], OC[Offset + 1]); in opcode_11101111()
396 OC[Offset + 0], OC[Offset + 1], OC[Offset + 1] << 2); in opcode_11101111()
398 Offset += 2; in opcode_11101111()
402 bool Decoder::opcode_11110101(const uint8_t *OC, unsigned &Offset, in opcode_11110101() argument
404 unsigned Start = (OC[Offset + 1] & 0xf0) >> 4; in opcode_11110101()
405 unsigned End = (OC[Offset + 1] & 0x0f) >> 0; in opcode_11110101()
408 SW.startLine() << format("0x%02x 0x%02x ; %s ", OC[Offset + 0], in opcode_11110101()
409 OC[Offset + 1], Prologue ? "vpush" : "vpop"); in opcode_11110101()
413 Offset += 2; in opcode_11110101()
417 bool Decoder::opcode_11110110(const uint8_t *OC, unsigned &Offset, in opcode_11110110() argument
419 unsigned Start = (OC[Offset + 1] & 0xf0) >> 4; in opcode_11110110()
420 unsigned End = (OC[Offset + 1] & 0x0f) >> 0; in opcode_11110110()
423 SW.startLine() << format("0x%02x 0x%02x ; %s ", OC[Offset + 0], in opcode_11110110()
424 OC[Offset + 1], Prologue ? "vpush" : "vpop"); in opcode_11110110()
428 Offset += 2; in opcode_11110110()
432 bool Decoder::opcode_11110111(const uint8_t *OC, unsigned &Offset, in opcode_11110111() argument
434 uint32_t Imm = (OC[Offset + 1] << 8) | (OC[Offset + 2] << 0); in opcode_11110111()
437 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], in opcode_11110111()
441 Offset += 3; in opcode_11110111()
445 bool Decoder::opcode_11111000(const uint8_t *OC, unsigned &Offset, in opcode_11111000() argument
447 uint32_t Imm = (OC[Offset + 1] << 16) in opcode_11111000()
448 | (OC[Offset + 2] << 8) in opcode_11111000()
449 | (OC[Offset + 3] << 0); in opcode_11111000()
453 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], OC[Offset + 3], in opcode_11111000()
456 Offset += 4; in opcode_11111000()
460 bool Decoder::opcode_11111001(const uint8_t *OC, unsigned &Offset, in opcode_11111001() argument
462 uint32_t Imm = (OC[Offset + 1] << 8) | (OC[Offset + 2] << 0); in opcode_11111001()
466 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], in opcode_11111001()
469 Offset += 3; in opcode_11111001()
473 bool Decoder::opcode_11111010(const uint8_t *OC, unsigned &Offset, in opcode_11111010() argument
475 uint32_t Imm = (OC[Offset + 1] << 16) in opcode_11111010()
476 | (OC[Offset + 2] << 8) in opcode_11111010()
477 | (OC[Offset + 3] << 0); in opcode_11111010()
481 OC[Offset + 0], OC[Offset + 1], OC[Offset + 2], OC[Offset + 3], in opcode_11111010()
484 Offset += 4; in opcode_11111010()
488 bool Decoder::opcode_11111011(const uint8_t *OC, unsigned &Offset, in opcode_11111011() argument
490 SW.startLine() << format("0x%02x ; nop\n", OC[Offset]); in opcode_11111011()
491 ++Offset; in opcode_11111011()
495 bool Decoder::opcode_11111100(const uint8_t *OC, unsigned &Offset, in opcode_11111100() argument
497 SW.startLine() << format("0x%02x ; nop.w\n", OC[Offset]); in opcode_11111100()
498 ++Offset; in opcode_11111100()
502 bool Decoder::opcode_11111101(const uint8_t *OC, unsigned &Offset, in opcode_11111101() argument
504 SW.startLine() << format("0x%02x ; b\n", OC[Offset]); in opcode_11111101()
505 ++Offset; in opcode_11111101()
509 bool Decoder::opcode_11111110(const uint8_t *OC, unsigned &Offset, in opcode_11111110() argument
511 SW.startLine() << format("0x%02x ; b.w\n", OC[Offset]); in opcode_11111110()
512 ++Offset; in opcode_11111110()
516 bool Decoder::opcode_11111111(const uint8_t *OC, unsigned &Offset, in opcode_11111111() argument
518 ++Offset; in opcode_11111111()
523 bool Decoder::opcode_alloc_s(const uint8_t *OC, unsigned &Offset, in opcode_alloc_s() argument
525 uint32_t NumBytes = (OC[Offset] & 0x1F) << 4; in opcode_alloc_s()
526 SW.startLine() << format("0x%02x ; %s sp, #%u\n", OC[Offset], in opcode_alloc_s()
529 ++Offset; in opcode_alloc_s()
533 bool Decoder::opcode_save_r19r20_x(const uint8_t *OC, unsigned &Offset, in opcode_save_r19r20_x() argument
535 uint32_t Off = (OC[Offset] & 0x1F) << 3; in opcode_save_r19r20_x()
538 "0x%02x ; stp x19, x20, [sp, #-%u]!\n", OC[Offset], Off); in opcode_save_r19r20_x()
541 "0x%02x ; ldp x19, x20, [sp], #%u\n", OC[Offset], Off); in opcode_save_r19r20_x()
542 ++Offset; in opcode_save_r19r20_x()
546 bool Decoder::opcode_save_fplr(const uint8_t *OC, unsigned &Offset, in opcode_save_fplr() argument
548 uint32_t Off = (OC[Offset] & 0x3F) << 3; in opcode_save_fplr()
550 "0x%02x ; %s x29, x30, [sp, #%u]\n", OC[Offset], in opcode_save_fplr()
552 ++Offset; in opcode_save_fplr()
556 bool Decoder::opcode_save_fplr_x(const uint8_t *OC, unsigned &Offset, in opcode_save_fplr_x() argument
558 uint32_t Off = ((OC[Offset] & 0x3F) + 1) << 3; in opcode_save_fplr_x()
561 "0x%02x ; stp x29, x30, [sp, #-%u]!\n", OC[Offset], Off); in opcode_save_fplr_x()
564 "0x%02x ; ldp x29, x30, [sp], #%u\n", OC[Offset], Off); in opcode_save_fplr_x()
565 ++Offset; in opcode_save_fplr_x()
569 bool Decoder::opcode_alloc_m(const uint8_t *OC, unsigned &Offset, in opcode_alloc_m() argument
571 uint32_t NumBytes = ((OC[Offset] & 0x07) << 8); in opcode_alloc_m()
572 NumBytes |= (OC[Offset + 1] & 0xFF); in opcode_alloc_m()
575 OC[Offset], OC[Offset + 1], in opcode_alloc_m()
578 Offset += 2; in opcode_alloc_m()
582 bool Decoder::opcode_save_regp(const uint8_t *OC, unsigned &Offset, in opcode_save_regp() argument
584 uint32_t Reg = ((OC[Offset] & 0x03) << 8); in opcode_save_regp()
585 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_regp()
588 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_regp()
591 OC[Offset], OC[Offset + 1], in opcode_save_regp()
593 Offset += 2; in opcode_save_regp()
597 bool Decoder::opcode_save_regp_x(const uint8_t *OC, unsigned &Offset, in opcode_save_regp_x() argument
599 uint32_t Reg = ((OC[Offset] & 0x03) << 8); in opcode_save_regp_x()
600 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_regp_x()
603 uint32_t Off = ((OC[Offset + 1] & 0x3F) + 1) << 3; in opcode_save_regp_x()
607 OC[Offset], OC[Offset + 1], Reg, in opcode_save_regp_x()
612 OC[Offset], OC[Offset + 1], Reg, in opcode_save_regp_x()
614 Offset += 2; in opcode_save_regp_x()
618 bool Decoder::opcode_save_reg(const uint8_t *OC, unsigned &Offset, in opcode_save_reg() argument
620 uint32_t Reg = (OC[Offset] & 0x03) << 8; in opcode_save_reg()
621 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_reg()
624 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_reg()
626 OC[Offset], OC[Offset + 1], in opcode_save_reg()
629 Offset += 2; in opcode_save_reg()
633 bool Decoder::opcode_save_reg_x(const uint8_t *OC, unsigned &Offset, in opcode_save_reg_x() argument
635 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_reg_x()
636 Reg |= (OC[Offset + 1] & 0xE0); in opcode_save_reg_x()
639 uint32_t Off = ((OC[Offset + 1] & 0x1F) + 1) << 3; in opcode_save_reg_x()
642 OC[Offset], OC[Offset + 1], Reg, Off); in opcode_save_reg_x()
645 OC[Offset], OC[Offset + 1], Reg, Off); in opcode_save_reg_x()
646 Offset += 2; in opcode_save_reg_x()
650 bool Decoder::opcode_save_lrpair(const uint8_t *OC, unsigned &Offset, in opcode_save_lrpair() argument
652 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_lrpair()
653 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_lrpair()
657 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_lrpair()
659 OC[Offset], OC[Offset + 1], in opcode_save_lrpair()
662 Offset += 2; in opcode_save_lrpair()
666 bool Decoder::opcode_save_fregp(const uint8_t *OC, unsigned &Offset, in opcode_save_fregp() argument
668 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_fregp()
669 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_fregp()
672 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_fregp()
674 OC[Offset], OC[Offset + 1], in opcode_save_fregp()
677 Offset += 2; in opcode_save_fregp()
681 bool Decoder::opcode_save_fregp_x(const uint8_t *OC, unsigned &Offset, in opcode_save_fregp_x() argument
683 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_fregp_x()
684 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_fregp_x()
687 uint32_t Off = ((OC[Offset + 1] & 0x3F) + 1) << 3; in opcode_save_fregp_x()
690 "0x%02x%02x ; stp d%u, d%u, [sp, #-%u]!\n", OC[Offset], in opcode_save_fregp_x()
691 OC[Offset + 1], Reg, Reg + 1, Off); in opcode_save_fregp_x()
694 "0x%02x%02x ; ldp d%u, d%u, [sp], #%u\n", OC[Offset], in opcode_save_fregp_x()
695 OC[Offset + 1], Reg, Reg + 1, Off); in opcode_save_fregp_x()
696 Offset += 2; in opcode_save_fregp_x()
700 bool Decoder::opcode_save_freg(const uint8_t *OC, unsigned &Offset, in opcode_save_freg() argument
702 uint32_t Reg = (OC[Offset] & 0x01) << 8; in opcode_save_freg()
703 Reg |= (OC[Offset + 1] & 0xC0); in opcode_save_freg()
706 uint32_t Off = (OC[Offset + 1] & 0x3F) << 3; in opcode_save_freg()
708 OC[Offset], OC[Offset + 1], in opcode_save_freg()
711 Offset += 2; in opcode_save_freg()
715 bool Decoder::opcode_save_freg_x(const uint8_t *OC, unsigned &Offset, in opcode_save_freg_x() argument
717 uint32_t Reg = ((OC[Offset + 1] & 0xE0) >> 5) + 8; in opcode_save_freg_x()
718 uint32_t Off = ((OC[Offset + 1] & 0x1F) + 1) << 3; in opcode_save_freg_x()
721 "0x%02x%02x ; str d%u, [sp, #-%u]!\n", OC[Offset], in opcode_save_freg_x()
722 OC[Offset + 1], Reg, Off); in opcode_save_freg_x()
725 "0x%02x%02x ; ldr d%u, [sp], #%u\n", OC[Offset], in opcode_save_freg_x()
726 OC[Offset + 1], Reg, Off); in opcode_save_freg_x()
727 Offset += 2; in opcode_save_freg_x()
731 bool Decoder::opcode_alloc_l(const uint8_t *OC, unsigned &Offset, in opcode_alloc_l() argument
734 (OC[Offset + 1] << 16) | (OC[Offset + 2] << 8) | (OC[Offset + 3] << 0); in opcode_alloc_l()
737 "0x%02x%02x%02x%02x ; %s sp, #%u\n", OC[Offset], OC[Offset + 1], in opcode_alloc_l()
738 OC[Offset + 2], OC[Offset + 3], in opcode_alloc_l()
740 Offset += 4; in opcode_alloc_l()
744 bool Decoder::opcode_setfp(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_setfp() argument
746 SW.startLine() << format("0x%02x ; mov fp, sp\n", OC[Offset]); in opcode_setfp()
747 ++Offset; in opcode_setfp()
751 bool Decoder::opcode_addfp(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_addfp() argument
753 unsigned NumBytes = OC[Offset + 1] << 3; in opcode_addfp()
755 OC[Offset], OC[Offset + 1], NumBytes); in opcode_addfp()
756 Offset += 2; in opcode_addfp()
760 bool Decoder::opcode_nop(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_nop() argument
762 SW.startLine() << format("0x%02x ; nop\n", OC[Offset]); in opcode_nop()
763 ++Offset; in opcode_nop()
767 bool Decoder::opcode_end(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_end() argument
769 SW.startLine() << format("0x%02x ; end\n", OC[Offset]); in opcode_end()
770 ++Offset; in opcode_end()
774 bool Decoder::opcode_end_c(const uint8_t *OC, unsigned &Offset, unsigned Length, in opcode_end_c() argument
776 SW.startLine() << format("0x%02x ; end_c\n", OC[Offset]); in opcode_end_c()
777 ++Offset; in opcode_end_c()
781 void Decoder::decodeOpcodes(ArrayRef<uint8_t> Opcodes, unsigned Offset, in decodeOpcodes() argument
783 assert((!Prologue || Offset == 0) && "prologue should always use offset 0"); in decodeOpcodes()
786 for (unsigned OI = Offset, OE = Opcodes.size(); !Terminated && OI < OE; ) { in decodeOpcodes()
819 uint64_t Offset = VA - SectionVA; in dumpXDataRecord() local
821 reinterpret_cast<const ulittle32_t *>(Contents.data() + Offset); in dumpXDataRecord()
826 if (Contents.size() - Offset < 8) in dumpXDataRecord()
844 if ((int64_t)(Contents.size() - Offset - 4 * HeaderWords(XData) - in dumpXDataRecord()
893 COFF, Section, Offset + HandlerOffset * sizeof(uint32_t)); in dumpXDataRecord()
920 const SectionRef Section, uint64_t Offset, in dumpUnpackedEntry() argument
925 ErrorOr<SymbolRef> Function = getRelocatedSymbol(COFF, Section, Offset); in dumpUnpackedEntry()
929 ErrorOr<SymbolRef> XDataRecord = getRelocatedSymbol(COFF, Section, Offset + 4); in dumpUnpackedEntry()
1011 const SectionRef Section, uint64_t Offset, in dumpPackedEntry() argument
1017 ErrorOr<SymbolRef> Function = getRelocatedSymbol(COFF, Section, Offset); in dumpPackedEntry()
1067 uint64_t Offset = PDataEntrySize * Index; in dumpProcedureDataEntry() local
1069 reinterpret_cast<const ulittle32_t *>(Contents.data() + Offset); in dumpProcedureDataEntry()
1074 return dumpUnpackedEntry(COFF, Section, Offset, Index, Entry); in dumpProcedureDataEntry()
1079 return dumpPackedEntry(COFF, Section, Offset, Index, Entry); in dumpProcedureDataEntry()