Home | History | Annotate | Download | only in AsmPrinter

Lines Matching refs:Asm

10 // This file contains support for writing dwarf debug info into asm files.
160 : Asm(A), MMI(Asm->MMI), FirstCU(0),
210 static MCSymbol *emitSectionSym(AsmPrinter *Asm, const MCSection *Section,
212 Asm->OutStreamer.SwitchSection(Section);
215 MCSymbol *TmpSym = Asm->GetTempSymbol(SymbolStem);
216 Asm->OutStreamer.EmitLabel(TmpSym);
221 return Asm->GetTempSymbol(StringPref);
230 return Entry.first = Asm->GetTempSymbol(StringPref, Entry.second);
239 Entry.first = Asm->GetTempSymbol(StringPref, Entry.second);
275 // If special LLVM prefix that is used to inform the asm
405 Asm->GetTempSymbol("func_begin",
406 Asm->getFunctionNumber()));
408 Asm->GetTempSymbol("func_end",
409 Asm->getFunctionNumber()));
410 const TargetRegisterInfo *RI = Asm->TM.getRegisterInfo();
411 MachineLocation Location(RI->getFrameRegister(*Asm->MF));
440 * Asm->getDataLayout().getPointerSize());
505 * Asm->getDataLayout().getPointerSize());
629 if (Asm->TM.hasMCUseLoc() &&
630 Asm->OutStreamer.getKind() == MCStreamer::SK_AsmStreamer)
658 Asm->OutStreamer.EmitDwarfFileDirective(SrcId, DirName, FileName, CUID);
672 DIUnit.getLanguage(), Die, Asm,
689 MCSymbol *LineTableStartSym = Asm->GetTempSymbol("line_table_start",
691 Asm->OutStreamer.getContext().setMCLineTableSymbol(LineTableStartSym,
698 if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
701 Asm->GetTempSymbol("section_line") : LineTableStartSym);
803 SectionMap.insert(Asm->getObjFileLowering().getTextSection());
886 Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering().getTextSection());
887 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("text_end"));
888 Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering().getDataSection());
889 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("data_end"));
893 Asm->OutStreamer.SwitchSection(SectionMap[I]);
894 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("section_end", I+1));
960 InfoHolder.emitAddresses(Asm->getObjFileLowering().getDwarfAddrSection());
1089 static DotDebugLocEntry getDebugLocEntry(AsmPrinter *Asm,
1096 MachineLocation MLoc = Asm->getDebugValueLocation(MI);
1201 DotDebugLocEntries.push_back(getDebugLocEntry(Asm, FLabel, SLabel,
1247 const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
1268 Asm->OutStreamer.EmitLabel(PrevLabel);
1294 Asm->OutStreamer.EmitLabel(PrevLabel);
1368 Asm->OutStreamer.getContext().setDwarfCompileUnitID(TheCU->getUniqueID());
1370 FunctionBeginSym = Asm->GetTempSymbol("func_begin",
1371 Asm->getFunctionNumber());
1373 Asm->OutStreamer.EmitLabel(FunctionBeginSym);
1377 const TargetRegisterInfo *TRI = Asm->TM.getRegisterInfo();
1550 FunctionEndSym = Asm->GetTempSymbol("func_end",
1551 Asm->getFunctionNumber());
1553 Asm->OutStreamer.EmitLabel(FunctionEndSym);
1555 Asm->OutStreamer.getContext().setDwarfCompileUnitID(0);
1595 DebugFrames.push_back(FunctionDebugFrameInfo(Asm->getFunctionNumber(),
1646 Asm->OutStreamer.getContext().getDwarfCompileUnitID());
1648 Asm->OutStreamer.EmitDwarfLocDirective(Src, Line, Col, Flags, 0, 0, Fn);
1680 Offset += Values[i]->SizeOf(Asm, AbbrevData[i].getForm());
1718 const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
1722 emitSectionSym(Asm, TLOF.getDwarfInfoSection(), "section_info");
1724 emitSectionSym(Asm, TLOF.getDwarfAbbrevSection(), "section_abbrev");
1727 emitSectionSym(Asm, TLOF.getDwarfAbbrevDWOSection(),
1729 emitSectionSym(Asm, TLOF.getDwarfARangesSection());
1732 emitSectionSym(Asm, MacroInfo);
1735 emitSectionSym(Asm, TLOF.getDwarfLineSection(), "section_line");
1736 emitSectionSym(Asm, TLOF.getDwarfLocSection());
1738 emitSectionSym(Asm, TLOF.getDwarfPubNamesSection());
1739 emitSectionSym(Asm, TLOF.getDwarfPubTypesSection());
1741 emitSectionSym(Asm, TLOF.getDwarfStrSection(), "info_string");
1744 emitSectionSym(Asm, TLOF.getDwarfStrDWOSection(), "skel_string");
1745 DwarfDebugRangeSectionSym = emitSectionSym(Asm, TLOF.getDwarfRangesSection(),
1748 DwarfDebugLocSectionSym = emitSectionSym(Asm, TLOF.getDwarfLocSection(),
1751 TextSectionSym = emitSectionSym(Asm, TLOF.getTextSection(), "text_begin");
1752 emitSectionSym(Asm, TLOF.getDataSection());
1762 if (Asm->isVerbose())
1763 Asm->OutStreamer.AddComment("Abbrev [" + Twine(AbbrevNumber) + "] 0x" +
1767 Asm->EmitULEB128(AbbrevNumber);
1778 if (Asm->isVerbose())
1779 Asm->OutStreamer.AddComment(dwarf::AttributeString(Attr));
1793 Asm->EmitInt32(Addr);
1800 if (Asm->MAI->doesDwarfUseRelocationsAcrossSections()) {
1801 Asm->EmitLabelPlusOffset(DwarfDebugRangeSectionSym,
1805 Asm->EmitLabelOffsetDifference(DwarfDebugRangeSectionSym,
1814 if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
1815 Asm->EmitLabelReference(L->getValue(), 4);
1817 Asm->EmitLabelDifference(L->getValue(), DwarfDebugLocSectionSym, 4);
1819 Values[i]->EmitValue(Asm, Form);
1824 if (Asm->isVerbose()) {
1826 Asm->OutStreamer.AddComment(dwarf::AccessibilityString(V->getValue()));
1828 Values[i]->EmitValue(Asm, Form);
1833 Values[i]->EmitValue(Asm, Form);
1845 if (Asm->isVerbose())
1846 Asm->OutStreamer.AddComment("End Of Children Mark");
1847 Asm->EmitInt8(0);
1857 Asm->OutStreamer.SwitchSection(USection);
1864 Asm->OutStreamer
1865 .EmitLabel(Asm->GetTempSymbol(USection->getLabelBeginName(),
1874 Asm->OutStreamer.AddComment("Length of Compilation Unit Info");
1875 Asm->EmitInt32(ContentSize);
1876 Asm->OutStreamer.AddComment("DWARF version number");
1877 Asm->EmitInt16(dwarf::DWARF_VERSION);
1878 Asm->OutStreamer.AddComment("Offset Into Abbrev. Section");
1879 Asm->EmitSectionOffset(Asm->GetTempSymbol(ASection->getLabelBeginName()),
1881 Asm->OutStreamer.AddComment("Address Size (in bytes)");
1882 Asm->EmitInt8(Asm->getDataLayout().getPointerSize());
1885 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol(USection->getLabelEndName(),
1907 Holder.emitUnits(this, Asm->getObjFileLowering().getDwarfInfoSection(),
1908 Asm->getObjFileLowering().getDwarfAbbrevSection(),
1915 emitAbbrevs(Asm->getObjFileLowering().getDwarfAbbrevSection(),
1918 emitSkeletonAbbrevs(Asm->getObjFileLowering().getDwarfAbbrevSection());
1926 Asm->OutStreamer.SwitchSection(Section);
1928 MCSymbol *Begin = Asm->GetTempSymbol(Section->getLabelBeginName());
1929 Asm->OutStreamer.EmitLabel(Begin);
1937 Asm->EmitULEB128(Abbrev->getNumber(), "Abbreviation Code");
1940 Abbrev->Emit(Asm);
1944 Asm->EmitULEB128(0, "EOM(3)");
1946 MCSymbol *End = Asm->GetTempSymbol(Section->getLabelEndName());
1947 Asm->OutStreamer.EmitLabel(End);
1954 Asm->OutStreamer.AddComment("Extended Op");
1955 Asm->EmitInt8(0);
1957 Asm->OutStreamer.AddComment("Op size");
1958 Asm->EmitInt8(Asm->getDataLayout().getPointerSize() + 1);
1959 Asm->OutStreamer.AddComment("DW_LNE_set_address");
1960 Asm->EmitInt8(dwarf::DW_LNE_set_address);
1962 Asm->OutStreamer.AddComment("Section end label");
1964 Asm->OutStreamer.EmitSymbolValue(Asm->GetTempSymbol("section_end",SectionEnd),
1965 Asm->getDataLayout().getPointerSize());
1968 Asm->OutStreamer.AddComment("DW_LNE_end_sequence");
1969 Asm->EmitInt8(0);
1970 Asm->EmitInt8(1);
1971 Asm->EmitInt8(1);
1992 AT.FinalizeTable(Asm, "Names");
1993 Asm->OutStreamer.SwitchSection(
1994 Asm->getObjFileLowering().getDwarfAccelNamesSection());
1995 MCSymbol *SectionBegin = Asm->GetTempSymbol("names_begin");
1996 Asm->OutStreamer.EmitLabel(SectionBegin);
1999 AT.Emit(Asm, SectionBegin, &InfoHolder);
2021 AT.FinalizeTable(Asm, "ObjC");
2022 Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering()
2024 MCSymbol *SectionBegin = Asm->GetTempSymbol("objc_begin");
2025 Asm->OutStreamer.EmitLabel(SectionBegin);
2028 AT.Emit(Asm, SectionBegin, &InfoHolder);
2049 AT.FinalizeTable(Asm, "namespac");
2050 Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering()
2052 MCSymbol *SectionBegin = Asm->GetTempSymbol("namespac_begin");
2053 Asm->OutStreamer.EmitLabel(SectionBegin);
2056 AT.Emit(Asm, SectionBegin, &InfoHolder);
2084 AT.FinalizeTable(Asm, "types");
2085 Asm->OutStreamer.SwitchSection(Asm->getObjFileLowering()
2087 MCSymbol *SectionBegin = Asm->GetTempSymbol("types_begin");
2088 Asm->OutStreamer.EmitLabel(SectionBegin);
2091 AT.Emit(Asm, SectionBegin, &InfoHolder);
2097 const MCSection *ISec = Asm->getObjFileLowering().getDwarfInfoSection();
2108 Asm->OutStreamer.SwitchSection(
2109 Asm->getObjFileLowering().getDwarfPubNamesSection());
2111 Asm->OutStreamer.AddComment("Length of Public Names Info");
2112 Asm->EmitLabelDifference(Asm->GetTempSymbol("pubnames_end", ID),
2113 Asm->GetTempSymbol("pubnames_begin", ID), 4);
2115 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("pubnames_begin", ID));
2117 Asm->OutStreamer.AddComment("DWARF Version");
2118 Asm->EmitInt16(dwarf::DWARF_VERSION);
2120 Asm->OutStreamer.AddComment("Offset of Compilation Unit Info");
2121 Asm->EmitSectionOffset(Asm->GetTempSymbol(ISec->getLabelBeginName(), ID),
2124 Asm->OutStreamer.AddComment("Compilation Unit Length");
2125 Asm->EmitLabelDifference(Asm->GetTempSymbol(ISec->getLabelEndName(), ID),
2126 Asm->GetTempSymbol(ISec->getLabelBeginName(), ID),
2135 Asm->OutStreamer.AddComment("DIE offset");
2136 Asm->EmitInt32(Entity->getOffset());
2138 if (Asm->isVerbose())
2139 Asm->OutStreamer.AddComment("External Name");
2140 Asm->OutStreamer.EmitBytes(StringRef(Name, strlen(Name)+1), 0);
2143 Asm->OutStreamer.AddComment("End Mark");
2144 Asm->EmitInt32(0);
2145 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("pubnames_end", ID));
2154 Asm->OutStreamer.SwitchSection(
2155 Asm->getObjFileLowering().getDwarfPubTypesSection());
2156 Asm->OutStreamer.AddComment("Length of Public Types Info");
2157 Asm->EmitLabelDifference(
2158 Asm->GetTempSymbol("pubtypes_end", TheCU->getUniqueID()),
2159 Asm->GetTempSymbol("pubtypes_begin", TheCU->getUniqueID()), 4);
2161 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("pubtypes_begin",
2164 if (Asm->isVerbose()) Asm->OutStreamer.AddComment("DWARF Version");
2165 Asm->EmitInt16(dwarf::DWARF_VERSION);
2167 Asm->OutStreamer.AddComment("Offset of Compilation Unit Info");
2168 const MCSection *ISec = Asm->getObjFileLowering().getDwarfInfoSection();
2169 Asm->EmitSectionOffset(Asm->GetTempSymbol(ISec->getLabelBeginName(),
2173 Asm->OutStreamer.AddComment("Compilation Unit Length");
2174 Asm->EmitLabelDifference(Asm->GetTempSymbol(ISec->getLabelEndName(),
2176 Asm->GetTempSymbol(ISec->getLabelBeginName(),
2186 if (Asm->isVerbose()) Asm->OutStreamer.AddComment("DIE offset");
2187 Asm->EmitInt32(Entity->getOffset());
2189 if (Asm->isVerbose()) Asm->OutStreamer.AddComment("External Name");
2191 Asm->OutStreamer.EmitBytes(StringRef(Name, GI->getKeyLength()+1));
2194 Asm->OutStreamer.AddComment("End Mark");
2195 Asm->EmitInt32(0);
2196 AsmAsm->GetTempSymbol("pubtypes_end",
2209 Asm->OutStreamer.SwitchSection(StrSection);
2225 Asm->OutStreamer.EmitLabel(Entries[i].second->getValue().first);
2228 Asm->OutStreamer.EmitBytes(StringRef(Entries[i].second->getKeyData(),
2234 Asm->OutStreamer.SwitchSection(OffsetSection);
2238 Asm->OutStreamer.EmitIntValue(offset, size);
2250 Asm->OutStreamer.SwitchSection(AddrSection);
2268 Asm->EmitLabelReference(Entries[i].second->first,
2269 Asm->getDataLayout().getPointerSize());
2271 Asm->OutStreamer.EmitIntValue(0, Asm->getDataLayout().getPointerSize());
2279 Holder.emitStrings(Asm->getObjFileLowering().getDwarfStrSection());
2296 Asm->OutStreamer.SwitchSection(
2297 Asm->getObjFileLowering().getDwarfLocSection());
2298 unsigned char Size = Asm->getDataLayout().getPointerSize();
2299 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("debug_loc", 0));
2307 Asm->OutStreamer.EmitIntValue(0, Size);
2308 Asm->OutStreamer.EmitIntValue(0, Size);
2309 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("debug_loc", index));
2311 Asm->OutStreamer.EmitSymbolValue(Entry.Begin, Size);
2312 Asm->OutStreamer.EmitSymbolValue(Entry.End, Size);
2314 Asm->OutStreamer.AddComment("Loc expr size");
2315 MCSymbol *begin = Asm->OutStreamer.getContext().CreateTempSymbol();
2316 MCSymbol *end = Asm->OutStreamer.getContext().CreateTempSymbol();
2317 Asm->EmitLabelDifference(end, begin, 2);
2318 Asm->OutStreamer.EmitLabel(begin);
2324 Asm->OutStreamer.AddComment("DW_OP_consts");
2325 Asm->EmitInt8(dwarf::DW_OP_consts);
2326 Asm->EmitSLEB128(Entry.getInt());
2328 Asm->OutStreamer.AddComment("DW_OP_constu");
2329 Asm->EmitInt8(dwarf::DW_OP_constu);
2330 Asm->EmitULEB128(Entry.getInt());
2335 Asm->EmitDwarfRegOp(Entry.Loc);
2343 Asm->EmitDwarfRegOp(Entry.Loc);
2344 Asm->OutStreamer.AddComment("DW_OP_deref");
2345 Asm->EmitInt8(dwarf::DW_OP_deref);
2346 Asm->OutStreamer.AddComment("DW_OP_plus_uconst");
2347 Asm->EmitInt8(dwarf::DW_OP_plus_uconst);
2348 Asm->EmitSLEB128(DV.getAddrElement(1));
2353 Asm->EmitDwarfRegOp(Loc);
2357 Asm->EmitDwarfRegOp(Entry.Loc);
2364 Asm->EmitInt8(dwarf::DW_OP_plus_uconst);
2365 Asm->EmitULEB128(DV.getAddrElement(++i));
2368 Asm->EmitInt8(dwarf::DW_OP_deref);
2376 Asm->OutStreamer.EmitLabel(end);
2384 Asm->OutStreamer.SwitchSection(
2385 Asm->getObjFileLowering().getDwarfARangesSection());
2391 Asm->OutStreamer.SwitchSection(
2392 Asm->getObjFileLowering().getDwarfRangesSection());
2393 unsigned char Size = Asm->getDataLayout().getPointerSize();
2398 Asm->OutStreamer.EmitSymbolValue(const_cast<MCSymbol*>(*I), Size);
2400 Asm->OutStreamer.EmitIntValue(0, Size);
2407 Asm->getObjFileLowering().getDwarfMacroInfoSection()) {
2409 Asm->OutStreamer.SwitchSection(LineInfo);
2432 if (!Asm->MAI->doesDwarfUseInlineInfoSection())
2438 Asm->OutStreamer.SwitchSection(
2439 Asm->getObjFileLowering().getDwarfDebugInlineSection());
2441 Asm->OutStreamer.AddComment("Length of Debug Inlined Information Entry");
2442 Asm->EmitLabelDifference(Asm->GetTempSymbol("debug_inlined_end", 1),
2443 Asm->GetTempSymbol("debug_inlined_begin", 1), 4);
2445 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("debug_inlined_begin", 1));
2447 Asm->OutStreamer.AddComment("Dwarf Version");
2448 Asm->EmitInt16(dwarf::DWARF_VERSION);
2449 Asm->OutStreamer.AddComment("Address Size (in bytes)");
2450 Asm->EmitInt8(Asm->getDataLayout().getPointerSize());
2463 Asm->OutStreamer.AddComment("MIPS linkage name");
2465 Asm->EmitSectionOffset(InfoHolder.getStringPoolEntry(Name),
2468 Asm->EmitSectionOffset(InfoHolder
2472 Asm->OutStreamer.AddComment("Function name");
2473 Asm->EmitSectionOffset(InfoHolder.getStringPoolEntry(Name),
2475 Asm->EmitULEB128(Labels.size(), "Inline count");
2479 if (Asm->isVerbose()) Asm->OutStreamer.AddComment("DIE offset");
2480 Asm->EmitInt32(LI->second->getOffset());
2482 if (Asm->isVerbose()) Asm->OutStreamer.AddComment("low_pc");
2483 Asm->OutStreamer.EmitSymbolValue(LI->first,
2484 Asm->getDataLayout().getPointerSize());
2488 Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("debug_inlined_end", 1));
2503 DIUnit.getLanguage(), Die, Asm,
2522 if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
2546 InfoHolder.emitUnits(this, Asm->getObjFileLowering().getDwarfInfoDWOSection(),
2547 Asm->getObjFileLowering().getDwarfAbbrevDWOSection(),
2555 emitAbbrevs(Asm->getObjFileLowering().getDwarfAbbrevDWOSection(),
2564 const MCSection *OffSec = Asm->getObjFileLowering()
2567 InfoHolder.emitStrings(Asm->getObjFileLowering().getDwarfStrDWOSection(),