Home | History | Annotate | Download | only in AsmPrinter

Lines Matching refs:Asm

10 // This file contains support for writing dwarf debug info into asm files.
168 : Asm(A), MMI(Asm->MMI), FirstCU(nullptr), PrevLabel(nullptr),
208 unsigned DwarfVersionNumber = Asm->TM.Options.MCOptions.DwarfVersion;
212 Asm->OutStreamer.getContext().setDwarfVersion(DwarfVersion);
225 static MCSymbol *emitSectionSym(AsmPrinter *Asm, const MCSection *Section,
227 Asm->OutStreamer.SwitchSection(Section);
231 MCSymbol *TmpSym = Asm->GetTempSymbol(SymbolStem);
232 Asm->OutStreamer.EmitLabel(TmpSym);
320 const TargetRegisterInfo *RI = Asm->TM.getRegisterInfo();
321 MachineLocation Location(RI->getFrameRegister(*Asm->MF));
352 static void addSectionLabel(AsmPrinter &Asm, DwarfUnit &U, DIE &D,
355 if (Asm.MAI->doesDwarfUseRelocationsAcrossSections())
365 MCSymbol *RangeSym = Asm->GetTempSymbol("debug_ranges", GlobalRangeCount++);
373 addSectionLabel(*Asm, TheCU, ScopeDIE, dwarf::DW_AT_ranges, RangeSym,
628 InfoHolder.getUnits().size(), DIUnit, Asm, this, &InfoHolder);
637 if (!Asm->OutStreamer.hasRawTextSupport() || SingleCU)
638 Asm->OutStreamer.getContext().setMCLineTableCompilationDir(
672 NewCU.initSection(Asm->getObjFileLowering().getDwarfInfoDWOSection(),
676 NewCU.initSection(Asm->getObjFileLowering().getDwarfInfoSection(),
784 SectionMap[Asm->getObjFileLowering().getTextSection()];
905 uint64_t ID = DIEHash(Asm).computeCUSignature(TheU->getUnitDie());
914 addSectionLabel(*Asm, *SkCU, SkCU->getUnitDie(),
918 addSectionLabel(*Asm, *SkCU, SkCU->getUnitDie(),
934 addSectionLabel(*Asm, U, U.getUnitDie(), dwarf::DW_AT_ranges,
935 Asm->GetTempSymbol("cu_ranges", U.getUniqueID()),
998 Sym = Asm->GetTempSymbol("debug_end", ID);
999 Asm->OutStreamer.SwitchSection(Section);
1000 Asm->OutStreamer.EmitLabel(Sym);
1045 AddrPool.emit(*Asm, Asm->getObjFileLowering().getDwarfAddrSection());
1240 Asm->GetTempSymbol("debug_loc", DotDebugLocEntries.size() - 1);
1320 const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
1341 Asm->OutStreamer.EmitLabel(PrevLabel);
1369 Asm->OutStreamer.EmitLabel(PrevLabel);
1437 // non-asm case.
1449 if (Asm->OutStreamer.hasRawTextSupport())
1451 Asm->OutStreamer.getContext().setDwarfCompileUnitID(0);
1453 Asm->OutStreamer.getContext().setDwarfCompileUnitID(TheCU->getUniqueID());
1456 FunctionBeginSym = Asm->GetTempSymbol("func_begin", Asm->getFunctionNumber());
1458 Asm->OutStreamer.EmitLabel(FunctionBeginSym);
1461 calculateDbgValueHistory(MF, Asm->TM.getRegisterInfo(), DbgValues);
1556 FunctionEndSym = Asm->GetTempSymbol("func_end", Asm->getFunctionNumber());
1558 Asm->OutStreamer.EmitLabel(FunctionEndSym);
1561 Asm->OutStreamer.getContext().setDwarfCompileUnitID(0);
1593 PrevSection = Asm->getCurrentSection();
1624 unsigned CUID = Asm->OutStreamer.getContext().getDwarfCompileUnitID();
1628 Asm->OutStreamer.EmitDwarfLocDirective(Src, Line, Col, Flags, 0,
1638 const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
1642 emitSectionSym(Asm, TLOF.getDwarfInfoSection(), "section_info");
1645 emitSectionSym(Asm, TLOF.getDwarfInfoDWOSection(), "section_info_dwo");
1647 emitSectionSym(Asm, TLOF.getDwarfAbbrevSection(), "section_abbrev");
1650 Asm, TLOF.getDwarfAbbrevDWOSection(), "section_abbrev_dwo");
1652 emitSectionSym(Asm, TLOF.getDwarfARangesSection());
1655 emitSectionSym(Asm, TLOF.getDwarfLineSection(), "section_line");
1658 emitSectionSym(Asm, TLOF.getDwarfGnuPubNamesSection());
1660 emitSectionSym(Asm, TLOF.getDwarfGnuPubTypesSection());
1662 emitSectionSym(Asm, TLOF.getDwarfPubNamesSection());
1663 emitSectionSym(Asm, TLOF.getDwarfPubTypesSection());
1667 emitSectionSym(Asm, TLOF.getDwarfStrSection(), "info_string");
1670 emitSectionSym(Asm, TLOF.getDwarfStrDWOSection(), "skel_string");
1672 emitSectionSym(Asm, TLOF.getDwarfAddrSection(), "addr_sec");
1674 emitSectionSym(Asm, TLOF.getDwarfLocDWOSection(), "skel_loc");
1677 emitSectionSym(Asm, TLOF.getDwarfLocSection(), "section_debug_loc");
1679 emitSectionSym(Asm, TLOF.getDwarfRangesSection(), "debug_range");
1688 if (Asm->isVerbose())
1689 Asm->OutStreamer.AddComment("Abbrev [" + Twine(Abbrev.getNumber()) +
1693 Asm->EmitULEB128(Abbrev.getNumber());
1704 if (Asm->isVerbose()) {
1705 Asm->OutStreamer.AddComment(dwarf::AttributeString(Attr));
1707 Asm->OutStreamer.AddComment(dwarf::AccessibilityString(
1712 Values[i]->EmitValue(Asm, Form);
1720 Asm->OutStreamer.AddComment("End Of Children Mark");
1721 Asm->EmitInt8(0);
1736 Holder.emitAbbrevs(Asm->getObjFileLowering().getDwarfAbbrevSection());
1742 Asm->OutStreamer.AddComment("Extended Op");
1743 Asm->EmitInt8(0);
1745 Asm->OutStreamer.AddComment("Op size");
1746 Asm->EmitInt8(Asm->getDataLayout().getPointerSize() + 1);
1747 Asm->OutStreamer.AddComment("DW_LNE_set_address");
1748 Asm->EmitInt8(dwarf::DW_LNE_set_address);
1750 Asm->OutStreamer.AddComment("Section end label");
1752 Asm->OutStreamer.EmitSymbolValue(
1753 Asm->GetTempSymbol("section_end", SectionEnd),
1754 Asm->getDataLayout().getPointerSize());
1757 Asm->OutStreamer.AddComment("DW_LNE_end_sequence");
1758 Asm->EmitInt8(0);
1759 Asm->EmitInt8(1);
1760 Asm->EmitInt8(1);
1765 AccelNames.FinalizeTable(Asm, "Names");
1766 Asm->OutStreamer.SwitchSection(
1767 Asm->getObjFileLowering().getDwarfAccelNamesSection());
1768 MCSymbol *SectionBegin = Asm->GetTempSymbol("names_begin");
1769 Asm->OutStreamer.EmitLabel(SectionBegin);
1772 AccelNames.Emit(Asm, SectionBegin, &InfoHolder);
1778 AccelObjC.FinalizeTable(Asm, "ObjC");
1779 Asm->OutStreamer.SwitchSection(
1780 Asm->getObjFileLowering().getDwarfAccelObjCSection());
1781 MCSymbol *SectionBegin = Asm->GetTempSymbol("objc_begin");
1782 Asm->OutStreamer.EmitLabel(SectionBegin);
1785 AccelObjC.Emit(Asm, SectionBegin, &InfoHolder);
1790 AccelNamespace.FinalizeTable(Asm, "namespac");
1791 Asm->OutStreamer.SwitchSection(
1792 Asm->getObjFileLowering().getDwarfAccelNamespaceSection());
1793 MCSymbol *SectionBegin = Asm->GetTempSymbol("namespac_begin");
1794 Asm->OutStreamer.EmitLabel(SectionBegin);
1797 AccelNamespace.Emit(Asm, SectionBegin, &InfoHolder);
1803 AccelTypes.FinalizeTable(Asm, "types");
1804 Asm->OutStreamer.SwitchSection(
1805 Asm->getObjFileLowering().getDwarfAccelTypesSection());
1806 MCSymbol *SectionBegin = Asm->GetTempSymbol("types_begin");
1807 Asm->OutStreamer.EmitLabel(SectionBegin);
1810 AccelTypes.Emit(Asm, SectionBegin, &InfoHolder);
1874 GnuStyle ? Asm->getObjFileLowering().getDwarfGnuPubNamesSection()
1875 : Asm->getObjFileLowering().getDwarfPubNamesSection();
1896 Asm->OutStreamer.SwitchSection(PSec);
1899 Asm->OutStreamer.AddComment("Length of Public " + Name + " Info");
1900 MCSymbol *BeginLabel = Asm->GetTempSymbol("pub" + Name + "_begin", ID);
1901 MCSymbol *EndLabel = Asm->GetTempSymbol("pub" + Name + "_end", ID);
1902 Asm->EmitLabelDifference(EndLabel, BeginLabel, 4);
1904 Asm->OutStreamer.EmitLabel(BeginLabel);
1906 Asm->OutStreamer.AddComment("DWARF Version");
1907 Asm->EmitInt16(dwarf::DW_PUBNAMES_VERSION);
1909 Asm->OutStreamer.AddComment("Offset of Compilation Unit Info");
1910 Asm->EmitSectionOffset(TheU->getLabelBegin(), TheU->getSectionSym());
1912 Asm->OutStreamer.AddComment("Compilation Unit Length");
1913 Asm->EmitLabelDifference(TheU->getLabelEnd(), TheU->getLabelBegin(), 4);
1920 Asm->OutStreamer.AddComment("DIE offset");
1921 Asm->EmitInt32(Entity->getOffset());
1925 Asm->OutStreamer.AddComment(
1928 Asm->EmitInt8(Desc.toBits());
1931 Asm->OutStreamer.AddComment("External Name");
1932 Asm->OutStreamer.EmitBytes(StringRef(Name, GI.getKeyLength() + 1));
1935 Asm->OutStreamer.AddComment("End Mark");
1936 Asm->EmitInt32(0);
1937 Asm->OutStreamer.EmitLabel(EndLabel);
1943 GnuStyle ? Asm->getObjFileLowering().getDwarfGnuPubTypesSection()
1944 : Asm->getObjFileLowering().getDwarfPubTypesSection();
1952 Holder.emitStrings(Asm->getObjFileLowering().getDwarfStrSection());
1975 Asm->EmitDwarfRegOp(Streamer, Loc, DV.isIndirect());
1983 Asm->EmitDwarfRegOp(Streamer, Loc, DV.isIndirect());
1991 Asm->EmitDwarfRegOp(Streamer, TLoc, DV.isIndirect());
1995 Asm->EmitDwarfRegOp(Streamer, Loc, DV.isIndirect());
2018 Asm->OutStreamer.AddComment("Loc expr size");
2019 MCSymbol *begin = Asm->OutStreamer.getContext().CreateTempSymbol();
2020 MCSymbol *end = Asm->OutStreamer.getContext().CreateTempSymbol();
2021 Asm->EmitLabelDifference(end, begin, 2);
2022 Asm->OutStreamer.EmitLabel(begin);
2024 APByteStreamer Streamer(*Asm);
2027 Asm->OutStreamer.EmitLabel(end);
2033 Asm->OutStreamer.SwitchSection(
2034 Asm->getObjFileLowering().getDwarfLocSection());
2035 unsigned char Size = Asm->getDataLayout().getPointerSize();
2037 Asm->OutStreamer.EmitLabel(DebugLoc.Label);
2046 Asm->EmitLabelDifference(Entry.getBeginSym(), Base, Size);
2047 Asm->EmitLabelDifference(Entry.getEndSym(), Base, Size);
2049 Asm->OutStreamer.EmitSymbolValue(Entry.getBeginSym(), Size);
2050 Asm->OutStreamer.EmitSymbolValue(Entry.getEndSym(), Size);
2055 Asm->OutStreamer.EmitIntValue(0, Size);
2056 Asm->OutStreamer.EmitIntValue(0, Size);
2061 Asm->OutStreamer.SwitchSection(
2062 Asm->getObjFileLowering().getDwarfLocDWOSection());
2064 Asm->OutStreamer.EmitLabel(DebugLoc.Label);
2070 Asm->EmitInt8(dwarf::DW_LLE_start_length_entry);
2072 Asm->EmitULEB128(idx);
2073 Asm->EmitLabelDifference(Entry.getEndSym(), Entry.getBeginSym(), 4);
2077 Asm->EmitInt8(dwarf::DW_LLE_end_of_list_entry);
2089 Asm->OutStreamer.SwitchSection(
2090 Asm->getObjFileLowering().getDwarfARangesSection());
2116 unsigned IA = A.Sym ? Asm->OutStreamer.GetSymbolOrder(A.Sym) : 0;
2117 unsigned IB = B.Sym ? Asm->OutStreamer.GetSymbolOrder(B.Sym) : 0;
2157 unsigned PtrSize = Asm->getDataLayout().getPointerSize();
2192 Asm->OutStreamer.AddComment("Length of ARange Set");
2193 Asm->EmitInt32(ContentSize);
2194 Asm->OutStreamer.AddComment("DWARF Arange version number");
2195 Asm->EmitInt16(dwarf::DW_ARANGES_VERSION);
2196 Asm
2197 Asm->EmitSectionOffset(CU->getLocalLabelBegin(), CU->getLocalSectionSym());
2198 Asm->OutStreamer.AddComment("Address Size (in bytes)");
2199 Asm->EmitInt8(PtrSize);
2200 Asm->OutStreamer.AddComment("Segment Size (in bytes)");
2201 Asm->EmitInt8(0);
2203 Asm->OutStreamer.EmitFill(Padding, 0xff);
2206 Asm->EmitLabelReference(Span.Start, PtrSize);
2210 Asm->EmitLabelDifference(Span.End, Span.Start, PtrSize);
2218 Asm->OutStreamer.EmitIntValue(Size, PtrSize);
2222 Asm->OutStreamer.AddComment("ARange terminator");
2223 Asm->OutStreamer.EmitIntValue(0, PtrSize);
2224 Asm->OutStreamer.EmitIntValue(0, PtrSize);
2231 Asm->OutStreamer.SwitchSection(
2232 Asm->getObjFileLowering().getDwarfRangesSection());
2235 unsigned char Size = Asm->getDataLayout().getPointerSize();
2244 Asm->OutStreamer.EmitLabel(List.getSym());
2254 Asm->EmitLabelDifference(Begin, Base, Size);
2255 Asm->EmitLabelDifference(End, Base, Size);
2257 Asm->OutStreamer.EmitSymbolValue(Begin, Size);
2258 Asm->OutStreamer.EmitSymbolValue(End, Size);
2263 Asm->OutStreamer.EmitIntValue(0, Size);
2264 Asm->OutStreamer.EmitIntValue(0, Size);
2269 Asm->OutStreamer.EmitLabel(
2270 Asm->GetTempSymbol("cu_ranges", TheCU->getUniqueID()));
2276 Asm->OutStreamer.EmitSymbolValue(Begin, Size);
2277 Asm->OutStreamer.EmitSymbolValue(End, Size);
2280 Asm->OutStreamer.EmitIntValue(0, Size);
2281 Asm->OutStreamer.EmitIntValue(0, Size);
2307 CU.getUniqueID(), CU.getCUNode(), Asm, this, &SkeletonHolder);
2309 NewCU.initSection(Asm->getObjFileLowering().getDwarfInfoSection(),
2325 auto OwnedUnit = make_unique<DwarfTypeUnit>(TU.getUniqueID(), CU, Asm, this,
2331 Asm->getObjFileLowering().getDwarfTypesSection(TU.getTypeSignature()));
2350 InfoHolder.emitAbbrevs(Asm->getObjFileLowering().getDwarfAbbrevDWOSection());
2355 Asm->OutStreamer.SwitchSection(
2356 Asm->getObjFileLowering().getDwarfLineDWOSection());
2357 SplitTypeUnitFileTable.Emit(Asm->OutStreamer);
2366 Asm->getObjFileLowering().getDwarfStrOffDWOSection();
2368 InfoHolder.emitStrings(Asm->getObjFileLowering().getDwarfStrDWOSection(),
2410 make_unique<DwarfTypeUnit>(InfoHolder.getUnits().size(), CU, Asm, this,
2431 ? Asm->getObjFileLowering().getDwarfTypesDWOSection(Signature)
2432 : Asm->getObjFileLowering().getDwarfTypesSection(Signature));
2490 AccelNames.AddName(Name, InfoHolder.getStringPool().getSymbol(*Asm, Name),
2497 AccelObjC.AddName(Name, InfoHolder.getStringPool().getSymbol(*Asm, Name),
2504 AccelNamespace.AddName(Name, InfoHolder.getStringPool().getSymbol(*Asm, Name),
2511 AccelTypes.AddName(Name, InfoHolder.getStringPool().getSymbol(*Asm, Name),