Lines Matching refs:OS

43   formatted_raw_ostream &OS;  member in __anon0a0f6ae50111::MCAsmStreamer
65 : MCStreamer(Context), OSOwner(std::move(os)), OS(*OSOwner), in MCAsmStreamer()
78 OS << '\n'; in EmitEOL()
270 OS << '\n'; in EmitCommentsAndEOL()
280 OS.PadToColumn(MAI->getCommentColumn()); in EmitCommentsAndEOL()
282 OS << MAI->getCommentString() << ' ' << Comments.substr(0, Position) <<'\n'; in EmitCommentsAndEOL()
297 OS << '\t'; in emitRawComment()
298 OS << MAI->getCommentString() << T; in emitRawComment()
305 Section->PrintSwitchToSection(*MAI, OS, Subsection); in ChangeSection()
312 Symbol->print(OS, MAI); in EmitLabel()
313 OS << MAI->getLabelSuffix(); in EmitLabel()
327 OS << "\t" << MCLOHDirectiveName() << " " << str << "\t"; in EmitLOHDirective()
332 OS << ", "; in EmitLOHDirective()
334 (*It)->print(OS, MAI); in EmitLOHDirective()
341 case MCAF_SyntaxUnified: OS << "\t.syntax unified"; break; in EmitAssemblerFlag()
342 case MCAF_SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break; in EmitAssemblerFlag()
343 case MCAF_Code16: OS << '\t'<< MAI->getCode16Directive();break; in EmitAssemblerFlag()
344 case MCAF_Code32: OS << '\t'<< MAI->getCode32Directive();break; in EmitAssemblerFlag()
345 case MCAF_Code64: OS << '\t'<< MAI->getCode64Directive();break; in EmitAssemblerFlag()
352 OS << "\t.linker_option \"" << Options[0] << '"'; in EmitLinkerOptions()
355 OS << ", " << '"' << *it << '"'; in EmitLinkerOptions()
357 OS << "\n"; in EmitLinkerOptions()
364 case MCDR_DataRegion: OS << "\t.data_region"; break; in EmitDataRegion()
365 case MCDR_DataRegionJT8: OS << "\t.data_region jt8"; break; in EmitDataRegion()
366 case MCDR_DataRegionJT16: OS << "\t.data_region jt16"; break; in EmitDataRegion()
367 case MCDR_DataRegionJT32: OS << "\t.data_region jt32"; break; in EmitDataRegion()
368 case MCDR_DataRegionEnd: OS << "\t.end_data_region"; break; in EmitDataRegion()
376 case MCVM_WatchOSVersionMin: OS << "\t.watchos_version_min"; break; in EmitVersionMin()
377 case MCVM_TvOSVersionMin: OS << "\t.tvos_version_min"; break; in EmitVersionMin()
378 case MCVM_IOSVersionMin: OS << "\t.ios_version_min"; break; in EmitVersionMin()
379 case MCVM_OSXVersionMin: OS << "\t.macosx_version_min"; break; in EmitVersionMin()
381 OS << " " << Major << ", " << Minor; in EmitVersionMin()
383 OS << ", " << Update; in EmitVersionMin()
390 OS << "\t.thumb_func"; in EmitThumbFunc()
393 OS << '\t'; in EmitThumbFunc()
394 Func->print(OS, MAI); in EmitThumbFunc()
400 Symbol->print(OS, MAI); in EmitAssignment()
401 OS << " = "; in EmitAssignment()
402 Value->print(OS, MAI); in EmitAssignment()
410 OS << ".weakref "; in EmitWeakReference()
411 Alias->print(OS, MAI); in EmitWeakReference()
412 OS << ", "; in EmitWeakReference()
413 Symbol->print(OS, MAI); in EmitWeakReference()
430 OS << "\t.type\t"; in EmitSymbolAttribute()
431 Symbol->print(OS, MAI); in EmitSymbolAttribute()
432 OS << ',' << ((MAI->getCommentString()[0] != '@') ? '@' : '%'); in EmitSymbolAttribute()
435 case MCSA_ELF_TypeFunction: OS << "function"; break; in EmitSymbolAttribute()
436 case MCSA_ELF_TypeIndFunction: OS << "gnu_indirect_function"; break; in EmitSymbolAttribute()
437 case MCSA_ELF_TypeObject: OS << "object"; break; in EmitSymbolAttribute()
438 case MCSA_ELF_TypeTLS: OS << "tls_object"; break; in EmitSymbolAttribute()
439 case MCSA_ELF_TypeCommon: OS << "common"; break; in EmitSymbolAttribute()
440 case MCSA_ELF_TypeNoType: OS << "no_type"; break; in EmitSymbolAttribute()
441 case MCSA_ELF_TypeGnuUniqueObject: OS << "gnu_unique_object"; break; in EmitSymbolAttribute()
446 OS << MAI->getGlobalDirective(); in EmitSymbolAttribute()
448 case MCSA_Hidden: OS << "\t.hidden\t"; break; in EmitSymbolAttribute()
449 case MCSA_IndirectSymbol: OS << "\t.indirect_symbol\t"; break; in EmitSymbolAttribute()
450 case MCSA_Internal: OS << "\t.internal\t"; break; in EmitSymbolAttribute()
451 case MCSA_LazyReference: OS << "\t.lazy_reference\t"; break; in EmitSymbolAttribute()
452 case MCSA_Local: OS << "\t.local\t"; break; in EmitSymbolAttribute()
456 OS << "\t.no_dead_strip\t"; in EmitSymbolAttribute()
458 case MCSA_SymbolResolver: OS << "\t.symbol_resolver\t"; break; in EmitSymbolAttribute()
460 OS << "\t.private_extern\t"; in EmitSymbolAttribute()
462 case MCSA_Protected: OS << "\t.protected\t"; break; in EmitSymbolAttribute()
463 case MCSA_Reference: OS << "\t.reference\t"; break; in EmitSymbolAttribute()
464 case MCSA_Weak: OS << MAI->getWeakDirective(); break; in EmitSymbolAttribute()
466 OS << "\t.weak_definition\t"; in EmitSymbolAttribute()
469 case MCSA_WeakReference: OS << MAI->getWeakRefDirective(); break; in EmitSymbolAttribute()
470 case MCSA_WeakDefAutoPrivate: OS << "\t.weak_def_can_be_hidden\t"; break; in EmitSymbolAttribute()
473 Symbol->print(OS, MAI); in EmitSymbolAttribute()
480 OS << ".desc" << ' '; in EmitSymbolDesc()
481 Symbol->print(OS, MAI); in EmitSymbolDesc()
482 OS << ',' << DescValue; in EmitSymbolDesc()
488 OS << "\t.intel_syntax noprefix\n"; in EmitSyntaxDirective()
495 OS << "\t.def\t "; in BeginCOFFSymbolDef()
496 Symbol->print(OS, MAI); in BeginCOFFSymbolDef()
497 OS << ';'; in BeginCOFFSymbolDef()
502 OS << "\t.scl\t" << StorageClass << ';'; in EmitCOFFSymbolStorageClass()
507 OS << "\t.type\t" << Type << ';'; in EmitCOFFSymbolType()
512 OS << "\t.endef"; in EndCOFFSymbolDef()
517 OS << "\t.safeseh\t"; in EmitCOFFSafeSEH()
518 Symbol->print(OS, MAI); in EmitCOFFSafeSEH()
523 OS << "\t.secidx\t"; in EmitCOFFSectionIndex()
524 Symbol->print(OS, MAI); in EmitCOFFSectionIndex()
529 OS << "\t.secrel32\t"; in EmitCOFFSecRel32()
530 Symbol->print(OS, MAI); in EmitCOFFSecRel32()
536 OS << "\t.size\t"; in emitELFSize()
537 Symbol->print(OS, MAI); in emitELFSize()
538 OS << ", "; in emitELFSize()
539 Value->print(OS, MAI); in emitELFSize()
540 OS << '\n'; in emitELFSize()
545 OS << "\t.comm\t"; in EmitCommonSymbol()
546 Symbol->print(OS, MAI); in EmitCommonSymbol()
547 OS << ',' << Size; in EmitCommonSymbol()
551 OS << ',' << ByteAlignment; in EmitCommonSymbol()
553 OS << ',' << Log2_32(ByteAlignment); in EmitCommonSymbol()
564 OS << "\t.lcomm\t"; in EmitLocalCommonSymbol()
565 Symbol->print(OS, MAI); in EmitLocalCommonSymbol()
566 OS << ',' << Size; in EmitLocalCommonSymbol()
573 OS << ',' << ByteAlign; in EmitLocalCommonSymbol()
577 OS << ',' << Log2_32(ByteAlign); in EmitLocalCommonSymbol()
590 OS << ".zerofill "; in EmitZerofill()
594 OS << MOSection->getSegmentName() << "," << MOSection->getSectionName(); in EmitZerofill()
597 OS << ','; in EmitZerofill()
598 Symbol->print(OS, MAI); in EmitZerofill()
599 OS << ',' << Size; in EmitZerofill()
601 OS << ',' << Log2_32(ByteAlignment); in EmitZerofill()
616 OS << ".tbss "; in EmitTBSSSymbol()
617 Symbol->print(OS, MAI); in EmitTBSSSymbol()
618 OS << ", " << Size; in EmitTBSSSymbol()
622 if (ByteAlignment > 1) OS << ", " << Log2_32(ByteAlignment); in EmitTBSSSymbol()
629 static void PrintQuotedString(StringRef Data, raw_ostream &OS) { in PrintQuotedString() argument
630 OS << '"'; in PrintQuotedString()
635 OS << '\\' << (char)C; in PrintQuotedString()
640 OS << (char)C; in PrintQuotedString()
645 case '\b': OS << "\\b"; break; in PrintQuotedString()
646 case '\f': OS << "\\f"; break; in PrintQuotedString()
647 case '\n': OS << "\\n"; break; in PrintQuotedString()
648 case '\r': OS << "\\r"; break; in PrintQuotedString()
649 case '\t': OS << "\\t"; break; in PrintQuotedString()
651 OS << '\\'; in PrintQuotedString()
652 OS << toOctal(C >> 6); in PrintQuotedString()
653 OS << toOctal(C >> 3); in PrintQuotedString()
654 OS << toOctal(C >> 0); in PrintQuotedString()
659 OS << '"'; in PrintQuotedString()
668 OS << MAI->getData8bitsDirective(); in EmitBytes()
669 OS << (unsigned)(unsigned char)Data[0]; in EmitBytes()
677 OS << MAI->getAscizDirective(); in EmitBytes()
680 OS << MAI->getAsciiDirective(); in EmitBytes()
683 PrintQuotedString(Data, OS); in EmitBytes()
742 OS << Directive; in EmitValueImpl()
743 Value->print(OS, MAI); in EmitValueImpl()
753 OS << ".uleb128 "; in EmitULEB128Value()
754 Value->print(OS, MAI); in EmitULEB128Value()
764 OS << ".sleb128 "; in EmitSLEB128Value()
765 Value->print(OS, MAI); in EmitSLEB128Value()
771 OS << MAI->getGPRel64Directive(); in EmitGPRel64Value()
772 Value->print(OS, MAI); in EmitGPRel64Value()
778 OS << MAI->getGPRel32Directive(); in EmitGPRel32Value()
779 Value->print(OS, MAI); in EmitGPRel32Value()
789 OS << ZeroDirective << NumBytes; in EmitFill()
791 OS << ',' << (int)FillValue; in EmitFill()
810 OS << "\t.align\t"; in EmitValueToAlignment()
813 OS << ".p2alignw "; in EmitValueToAlignment()
816 OS << ".p2alignl "; in EmitValueToAlignment()
823 OS << ByteAlignment; in EmitValueToAlignment()
825 OS << Log2_32(ByteAlignment); in EmitValueToAlignment()
828 OS << ", 0x"; in EmitValueToAlignment()
829 OS.write_hex(truncateToSize(Value, ValueSize)); in EmitValueToAlignment()
832 OS << ", " << MaxBytesToEmit; in EmitValueToAlignment()
842 case 1: OS << ".balign"; break; in EmitValueToAlignment()
843 case 2: OS << ".balignw"; break; in EmitValueToAlignment()
844 case 4: OS << ".balignl"; break; in EmitValueToAlignment()
848 OS << ' ' << ByteAlignment; in EmitValueToAlignment()
849 OS << ", " << truncateToSize(Value, ValueSize); in EmitValueToAlignment()
851 OS << ", " << MaxBytesToEmit; in EmitValueToAlignment()
865 OS << ".org "; in emitValueToOffset()
866 Offset->print(OS, MAI); in emitValueToOffset()
867 OS << ", " << (unsigned)Value; in emitValueToOffset()
873 OS << "\t.file\t"; in EmitFileDirective()
874 PrintQuotedString(Filename, OS); in EmitFileDirective()
905 OS << "\t.file\t" << FileNo << ' '; in EmitDwarfFileDirective()
907 PrintQuotedString(Directory, OS); in EmitDwarfFileDirective()
908 OS << ' '; in EmitDwarfFileDirective()
910 PrintQuotedString(Filename, OS); in EmitDwarfFileDirective()
921 OS << "\t.loc\t" << FileNo << " " << Line << " " << Column; in EmitDwarfLocDirective()
923 OS << " basic_block"; in EmitDwarfLocDirective()
925 OS << " prologue_end"; in EmitDwarfLocDirective()
927 OS << " epilogue_begin"; in EmitDwarfLocDirective()
931 OS << " is_stmt "; in EmitDwarfLocDirective()
934 OS << "1"; in EmitDwarfLocDirective()
936 OS << "0"; in EmitDwarfLocDirective()
940 OS << " isa " << Isa; in EmitDwarfLocDirective()
942 OS << " discriminator " << Discriminator; in EmitDwarfLocDirective()
945 OS.PadToColumn(MAI->getCommentColumn()); in EmitDwarfLocDirective()
946 OS << MAI->getCommentString() << ' ' << FileName << ':' in EmitDwarfLocDirective()
962 OS << "\t.ident\t"; in EmitIdent()
963 PrintQuotedString(IdentString, OS); in EmitIdent()
969 OS << "\t.cfi_sections "; in EmitCFISections()
971 OS << ".eh_frame"; in EmitCFISections()
973 OS << ", .debug_frame"; in EmitCFISections()
975 OS << ".debug_frame"; in EmitCFISections()
982 OS << "\t.cfi_startproc"; in EmitCFIStartProcImpl()
984 OS << " simple"; in EmitCFIStartProcImpl()
990 OS << "\t.cfi_endproc"; in EmitCFIEndProcImpl()
998 InstPrinter->printRegName(OS, LLVMRegister); in EmitRegisterName()
1000 OS << Register; in EmitRegisterName()
1006 OS << "\t.cfi_def_cfa "; in EmitCFIDefCfa()
1008 OS << ", " << Offset; in EmitCFIDefCfa()
1014 OS << "\t.cfi_def_cfa_offset " << Offset; in EmitCFIDefCfaOffset()
1018 static void PrintCFIEscape(llvm::formatted_raw_ostream &OS, StringRef Values) { in PrintCFIEscape() argument
1019 OS << "\t.cfi_escape "; in PrintCFIEscape()
1023 OS << format("0x%02x", uint8_t(Values[i])) << ", "; in PrintCFIEscape()
1024 OS << format("0x%02x", uint8_t(Values[e])); in PrintCFIEscape()
1030 PrintCFIEscape(OS, Values); in EmitCFIEscape()
1040 PrintCFIEscape(OS, StringRef((const char *)&Buffer[0], Len)); in EmitCFIGnuArgsSize()
1046 OS << "\t.cfi_def_cfa_register "; in EmitCFIDefCfaRegister()
1053 OS << "\t.cfi_offset "; in EmitCFIOffset()
1055 OS << ", " << Offset; in EmitCFIOffset()
1062 OS << "\t.cfi_personality " << Encoding << ", "; in EmitCFIPersonality()
1063 Sym->print(OS, MAI); in EmitCFIPersonality()
1069 OS << "\t.cfi_lsda " << Encoding << ", "; in EmitCFILsda()
1070 Sym->print(OS, MAI); in EmitCFILsda()
1076 OS << "\t.cfi_remember_state"; in EmitCFIRememberState()
1082 OS << "\t.cfi_restore_state"; in EmitCFIRestoreState()
1088 OS << "\t.cfi_same_value "; in EmitCFISameValue()
1095 OS << "\t.cfi_rel_offset "; in EmitCFIRelOffset()
1097 OS << ", " << Offset; in EmitCFIRelOffset()
1103 OS << "\t.cfi_adjust_cfa_offset " << Adjustment; in EmitCFIAdjustCfaOffset()
1109 OS << "\t.cfi_signal_frame"; in EmitCFISignalFrame()
1115 OS << "\t.cfi_undefined " << Register; in EmitCFIUndefined()
1121 OS << "\t.cfi_register " << Register1 << ", " << Register2; in EmitCFIRegister()
1127 OS << "\t.cfi_window_save"; in EmitCFIWindowSave()
1134 OS << ".seh_proc "; in EmitWinCFIStartProc()
1135 Symbol->print(OS, MAI); in EmitWinCFIStartProc()
1142 OS << "\t.seh_endproc"; in EmitWinCFIEndProc()
1149 OS << "\t.seh_startchained"; in EmitWinCFIStartChained()
1156 OS << "\t.seh_endchained"; in EmitWinCFIEndChained()
1164 OS << "\t.seh_handler "; in EmitWinEHHandler()
1165 Sym->print(OS, MAI); in EmitWinEHHandler()
1167 OS << ", @unwind"; in EmitWinEHHandler()
1169 OS << ", @except"; in EmitWinEHHandler()
1185 OS << "\t.seh_handlerdata"; in EmitWinEHHandlerData()
1192 OS << "\t.seh_pushreg " << Register; in EmitWinCFIPushReg()
1199 OS << "\t.seh_setframe " << Register << ", " << Offset; in EmitWinCFISetFrame()
1206 OS << "\t.seh_stackalloc " << Size; in EmitWinCFIAllocStack()
1213 OS << "\t.seh_savereg " << Register << ", " << Offset; in EmitWinCFISaveReg()
1220 OS << "\t.seh_savexmm " << Register << ", " << Offset; in EmitWinCFISaveXMM()
1227 OS << "\t.seh_pushframe"; in EmitWinCFIPushFrame()
1229 OS << " @code"; in EmitWinCFIPushFrame()
1236 OS << "\t.seh_endprologue"; in EmitWinCFIEndProlog()
1242 raw_ostream &OS = GetCommentOS(); in AddEncodingComment() local
1268 OS << "encoding: ["; in AddEncodingComment()
1271 OS << ','; in AddEncodingComment()
1285 OS << format("0x%02x", uint8_t(Code[i])); in AddEncodingComment()
1289 OS << format("0x%02x", uint8_t(Code[i])) << '\'' in AddEncodingComment()
1292 OS << char('A' + MapEntry - 1); in AddEncodingComment()
1296 OS << "0b"; in AddEncodingComment()
1308 OS << char('A' + MapEntry - 1); in AddEncodingComment()
1310 OS << Bit; in AddEncodingComment()
1314 OS << "]\n"; in AddEncodingComment()
1319 OS << " fixup " << char('A' + i) << " - " << "offset: " << F.getOffset() in AddEncodingComment()
1339 getTargetStreamer()->prettyPrintAsm(*InstPrinter, OS, Inst, STI); in EmitInstruction()
1341 InstPrinter->printInst(&Inst, OS, "", STI); in EmitInstruction()
1347 OS << "\t.bundle_align_mode " << AlignPow2; in EmitBundleAlignMode()
1352 OS << "\t.bundle_lock"; in EmitBundleLock()
1354 OS << " align_to_end"; in EmitBundleLock()
1359 OS << "\t.bundle_unlock"; in EmitBundleUnlock()
1365 OS << "\t.reloc "; in EmitRelocDirective()
1366 Offset.print(OS, MAI); in EmitRelocDirective()
1367 OS << ", " << Name; in EmitRelocDirective()
1369 OS << ", "; in EmitRelocDirective()
1370 Expr->print(OS, MAI); in EmitRelocDirective()
1382 OS << String; in EmitRawTextImpl()
1405 std::unique_ptr<formatted_raw_ostream> OS, in createAsmStreamer() argument
1409 return new MCAsmStreamer(Context, std::move(OS), isVerboseAsm, in createAsmStreamer()