Lines Matching refs:OS
43 formatted_raw_ostream &OS; member in __anona20e7bb00111::MCAsmStreamer
66 : MCStreamer(Context), OSOwner(std::move(os)), OS(*OSOwner), in MCAsmStreamer()
81 OS << '\n'; in EmitEOL()
302 OS << '\n'; in EmitCommentsAndEOL()
312 OS.PadToColumn(MAI->getCommentColumn()); in EmitCommentsAndEOL()
314 OS << MAI->getCommentString() << ' ' << Comments.substr(0, Position) <<'\n'; in EmitCommentsAndEOL()
329 OS << '\t'; in emitRawComment()
330 OS << MAI->getCommentString() << T; in emitRawComment()
373 OS << Comments; in emitExplicitComments()
380 Section->PrintSwitchToSection(*MAI, OS, Subsection); in ChangeSection()
387 Symbol->print(OS, MAI); in EmitLabel()
388 OS << MAI->getLabelSuffix(); in EmitLabel()
402 OS << "\t" << MCLOHDirectiveName() << " " << str << "\t"; in EmitLOHDirective()
406 OS << ", "; in EmitLOHDirective()
408 Arg->print(OS, MAI); in EmitLOHDirective()
415 case MCAF_SyntaxUnified: OS << "\t.syntax unified"; break; in EmitAssemblerFlag()
416 case MCAF_SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break; in EmitAssemblerFlag()
417 case MCAF_Code16: OS << '\t'<< MAI->getCode16Directive();break; in EmitAssemblerFlag()
418 case MCAF_Code32: OS << '\t'<< MAI->getCode32Directive();break; in EmitAssemblerFlag()
419 case MCAF_Code64: OS << '\t'<< MAI->getCode64Directive();break; in EmitAssemblerFlag()
426 OS << "\t.linker_option \"" << Options[0] << '"'; in EmitLinkerOptions()
429 OS << ", " << '"' << *it << '"'; in EmitLinkerOptions()
431 OS << "\n"; in EmitLinkerOptions()
438 case MCDR_DataRegion: OS << "\t.data_region"; break; in EmitDataRegion()
439 case MCDR_DataRegionJT8: OS << "\t.data_region jt8"; break; in EmitDataRegion()
440 case MCDR_DataRegionJT16: OS << "\t.data_region jt16"; break; in EmitDataRegion()
441 case MCDR_DataRegionJT32: OS << "\t.data_region jt32"; break; in EmitDataRegion()
442 case MCDR_DataRegionEnd: OS << "\t.end_data_region"; break; in EmitDataRegion()
450 case MCVM_WatchOSVersionMin: OS << "\t.watchos_version_min"; break; in EmitVersionMin()
451 case MCVM_TvOSVersionMin: OS << "\t.tvos_version_min"; break; in EmitVersionMin()
452 case MCVM_IOSVersionMin: OS << "\t.ios_version_min"; break; in EmitVersionMin()
453 case MCVM_OSXVersionMin: OS << "\t.macosx_version_min"; break; in EmitVersionMin()
455 OS << " " << Major << ", " << Minor; in EmitVersionMin()
457 OS << ", " << Update; in EmitVersionMin()
464 OS << "\t.thumb_func"; in EmitThumbFunc()
467 OS << '\t'; in EmitThumbFunc()
468 Func->print(OS, MAI); in EmitThumbFunc()
474 Symbol->print(OS, MAI); in EmitAssignment()
475 OS << " = "; in EmitAssignment()
476 Value->print(OS, MAI); in EmitAssignment()
484 OS << ".weakref "; in EmitWeakReference()
485 Alias->print(OS, MAI); in EmitWeakReference()
486 OS << ", "; in EmitWeakReference()
487 Symbol->print(OS, MAI); in EmitWeakReference()
504 OS << "\t.type\t"; in EmitSymbolAttribute()
505 Symbol->print(OS, MAI); in EmitSymbolAttribute()
506 OS << ',' << ((MAI->getCommentString()[0] != '@') ? '@' : '%'); in EmitSymbolAttribute()
509 case MCSA_ELF_TypeFunction: OS << "function"; break; in EmitSymbolAttribute()
510 case MCSA_ELF_TypeIndFunction: OS << "gnu_indirect_function"; break; in EmitSymbolAttribute()
511 case MCSA_ELF_TypeObject: OS << "object"; break; in EmitSymbolAttribute()
512 case MCSA_ELF_TypeTLS: OS << "tls_object"; break; in EmitSymbolAttribute()
513 case MCSA_ELF_TypeCommon: OS << "common"; break; in EmitSymbolAttribute()
514 case MCSA_ELF_TypeNoType: OS << "no_type"; break; in EmitSymbolAttribute()
515 case MCSA_ELF_TypeGnuUniqueObject: OS << "gnu_unique_object"; break; in EmitSymbolAttribute()
520 OS << MAI->getGlobalDirective(); in EmitSymbolAttribute()
522 case MCSA_Hidden: OS << "\t.hidden\t"; break; in EmitSymbolAttribute()
523 case MCSA_IndirectSymbol: OS << "\t.indirect_symbol\t"; break; in EmitSymbolAttribute()
524 case MCSA_Internal: OS << "\t.internal\t"; break; in EmitSymbolAttribute()
525 case MCSA_LazyReference: OS << "\t.lazy_reference\t"; break; in EmitSymbolAttribute()
526 case MCSA_Local: OS << "\t.local\t"; break; in EmitSymbolAttribute()
530 OS << "\t.no_dead_strip\t"; in EmitSymbolAttribute()
532 case MCSA_SymbolResolver: OS << "\t.symbol_resolver\t"; break; in EmitSymbolAttribute()
533 case MCSA_AltEntry: OS << "\t.alt_entry\t"; break; in EmitSymbolAttribute()
535 OS << "\t.private_extern\t"; in EmitSymbolAttribute()
537 case MCSA_Protected: OS << "\t.protected\t"; break; in EmitSymbolAttribute()
538 case MCSA_Reference: OS << "\t.reference\t"; break; in EmitSymbolAttribute()
539 case MCSA_Weak: OS << MAI->getWeakDirective(); break; in EmitSymbolAttribute()
541 OS << "\t.weak_definition\t"; in EmitSymbolAttribute()
544 case MCSA_WeakReference: OS << MAI->getWeakRefDirective(); break; in EmitSymbolAttribute()
545 case MCSA_WeakDefAutoPrivate: OS << "\t.weak_def_can_be_hidden\t"; break; in EmitSymbolAttribute()
548 Symbol->print(OS, MAI); in EmitSymbolAttribute()
555 OS << ".desc" << ' '; in EmitSymbolDesc()
556 Symbol->print(OS, MAI); in EmitSymbolDesc()
557 OS << ',' << DescValue; in EmitSymbolDesc()
563 OS << "\t.intel_syntax noprefix"; in EmitSyntaxDirective()
572 OS << "\t.def\t "; in BeginCOFFSymbolDef()
573 Symbol->print(OS, MAI); in BeginCOFFSymbolDef()
574 OS << ';'; in BeginCOFFSymbolDef()
579 OS << "\t.scl\t" << StorageClass << ';'; in EmitCOFFSymbolStorageClass()
584 OS << "\t.type\t" << Type << ';'; in EmitCOFFSymbolType()
589 OS << "\t.endef"; in EndCOFFSymbolDef()
594 OS << "\t.safeseh\t"; in EmitCOFFSafeSEH()
595 Symbol->print(OS, MAI); in EmitCOFFSafeSEH()
600 OS << "\t.secidx\t"; in EmitCOFFSectionIndex()
601 Symbol->print(OS, MAI); in EmitCOFFSectionIndex()
606 OS << "\t.secrel32\t"; in EmitCOFFSecRel32()
607 Symbol->print(OS, MAI); in EmitCOFFSecRel32()
613 OS << "\t.size\t"; in emitELFSize()
614 Symbol->print(OS, MAI); in emitELFSize()
615 OS << ", "; in emitELFSize()
616 Value->print(OS, MAI); in emitELFSize()
617 OS << '\n'; in emitELFSize()
622 OS << "\t.comm\t"; in EmitCommonSymbol()
623 Symbol->print(OS, MAI); in EmitCommonSymbol()
624 OS << ',' << Size; in EmitCommonSymbol()
628 OS << ',' << ByteAlignment; in EmitCommonSymbol()
630 OS << ',' << Log2_32(ByteAlignment); in EmitCommonSymbol()
641 OS << "\t.lcomm\t"; in EmitLocalCommonSymbol()
642 Symbol->print(OS, MAI); in EmitLocalCommonSymbol()
643 OS << ',' << Size; in EmitLocalCommonSymbol()
650 OS << ',' << ByteAlign; in EmitLocalCommonSymbol()
654 OS << ',' << Log2_32(ByteAlign); in EmitLocalCommonSymbol()
667 OS << ".zerofill "; in EmitZerofill()
671 OS << MOSection->getSegmentName() << "," << MOSection->getSectionName(); in EmitZerofill()
674 OS << ','; in EmitZerofill()
675 Symbol->print(OS, MAI); in EmitZerofill()
676 OS << ',' << Size; in EmitZerofill()
678 OS << ',' << Log2_32(ByteAlignment); in EmitZerofill()
693 OS << ".tbss "; in EmitTBSSSymbol()
694 Symbol->print(OS, MAI); in EmitTBSSSymbol()
695 OS << ", " << Size; in EmitTBSSSymbol()
699 if (ByteAlignment > 1) OS << ", " << Log2_32(ByteAlignment); in EmitTBSSSymbol()
706 static void PrintQuotedString(StringRef Data, raw_ostream &OS) { in PrintQuotedString() argument
707 OS << '"'; in PrintQuotedString()
712 OS << '\\' << (char)C; in PrintQuotedString()
717 OS << (char)C; in PrintQuotedString()
722 case '\b': OS << "\\b"; break; in PrintQuotedString()
723 case '\f': OS << "\\f"; break; in PrintQuotedString()
724 case '\n': OS << "\\n"; break; in PrintQuotedString()
725 case '\r': OS << "\\r"; break; in PrintQuotedString()
726 case '\t': OS << "\\t"; break; in PrintQuotedString()
728 OS << '\\'; in PrintQuotedString()
729 OS << toOctal(C >> 6); in PrintQuotedString()
730 OS << toOctal(C >> 3); in PrintQuotedString()
731 OS << toOctal(C >> 0); in PrintQuotedString()
736 OS << '"'; in PrintQuotedString()
745 OS << MAI->getData8bitsDirective(); in EmitBytes()
746 OS << (unsigned)(unsigned char)Data[0]; in EmitBytes()
754 OS << MAI->getAscizDirective(); in EmitBytes()
757 OS << MAI->getAsciiDirective(); in EmitBytes()
760 PrintQuotedString(Data, OS); in EmitBytes()
770 OS << MAI->getData8bitsDirective(); in EmitBinaryData()
772 OS << format("0x%02x", uint8_t(Data[J])) << ", "; in EmitBinaryData()
773 OS << format("0x%02x", uint8_t(Data[J])); in EmitBinaryData()
831 OS << Directive; in EmitValueImpl()
832 Value->print(OS, MAI); in EmitValueImpl()
842 OS << ".uleb128 "; in EmitULEB128Value()
843 Value->print(OS, MAI); in EmitULEB128Value()
853 OS << ".sleb128 "; in EmitSLEB128Value()
854 Value->print(OS, MAI); in EmitSLEB128Value()
860 OS << MAI->getGPRel64Directive(); in EmitGPRel64Value()
861 Value->print(OS, MAI); in EmitGPRel64Value()
867 OS << MAI->getGPRel32Directive(); in EmitGPRel32Value()
868 Value->print(OS, MAI); in EmitGPRel32Value()
885 OS << ZeroDirective; in emitFill()
886 NumBytes.print(OS, MAI); in emitFill()
888 OS << ',' << (int)FillValue; in emitFill()
907 OS << "\t.fill\t"; in emitFill()
908 NumValues.print(OS, MAI); in emitFill()
909 OS << ", " << Size << ", 0x"; in emitFill()
910 OS.write_hex(truncateToSize(Expr, 4)); in emitFill()
924 OS << "\t.p2align\t"; in EmitValueToAlignment()
927 OS << ".p2alignw "; in EmitValueToAlignment()
930 OS << ".p2alignl "; in EmitValueToAlignment()
936 OS << Log2_32(ByteAlignment); in EmitValueToAlignment()
939 OS << ", 0x"; in EmitValueToAlignment()
940 OS.write_hex(truncateToSize(Value, ValueSize)); in EmitValueToAlignment()
943 OS << ", " << MaxBytesToEmit; in EmitValueToAlignment()
953 case 1: OS << ".balign"; break; in EmitValueToAlignment()
954 case 2: OS << ".balignw"; break; in EmitValueToAlignment()
955 case 4: OS << ".balignl"; break; in EmitValueToAlignment()
959 OS << ' ' << ByteAlignment; in EmitValueToAlignment()
960 OS << ", " << truncateToSize(Value, ValueSize); in EmitValueToAlignment()
962 OS << ", " << MaxBytesToEmit; in EmitValueToAlignment()
976 OS << ".org "; in emitValueToOffset()
977 Offset->print(OS, MAI); in emitValueToOffset()
978 OS << ", " << (unsigned)Value; in emitValueToOffset()
984 OS << "\t.file\t"; in EmitFileDirective()
985 PrintQuotedString(Filename, OS); in EmitFileDirective()
1016 OS << "\t.file\t" << FileNo << ' '; in EmitDwarfFileDirective()
1018 PrintQuotedString(Directory, OS); in EmitDwarfFileDirective()
1019 OS << ' '; in EmitDwarfFileDirective()
1021 PrintQuotedString(Filename, OS); in EmitDwarfFileDirective()
1032 OS << "\t.loc\t" << FileNo << " " << Line << " " << Column; in EmitDwarfLocDirective()
1034 OS << " basic_block"; in EmitDwarfLocDirective()
1036 OS << " prologue_end"; in EmitDwarfLocDirective()
1038 OS << " epilogue_begin"; in EmitDwarfLocDirective()
1042 OS << " is_stmt "; in EmitDwarfLocDirective()
1045 OS << "1"; in EmitDwarfLocDirective()
1047 OS << "0"; in EmitDwarfLocDirective()
1051 OS << " isa " << Isa; in EmitDwarfLocDirective()
1053 OS << " discriminator " << Discriminator; in EmitDwarfLocDirective()
1056 OS.PadToColumn(MAI->getCommentColumn()); in EmitDwarfLocDirective()
1057 OS << MAI->getCommentString() << ' ' << FileName << ':' in EmitDwarfLocDirective()
1076 OS << "\t.cv_file\t" << FileNo << ' '; in EmitCVFileDirective()
1078 PrintQuotedString(Filename, OS); in EmitCVFileDirective()
1088 OS << "\t.cv_loc\t" << FunctionId << " " << FileNo << " " << Line << " " in EmitCVLocDirective()
1091 OS << " prologue_end"; in EmitCVLocDirective()
1095 OS << " is_stmt "; in EmitCVLocDirective()
1098 OS << "1"; in EmitCVLocDirective()
1100 OS << "0"; in EmitCVLocDirective()
1104 OS.PadToColumn(MAI->getCommentColumn()); in EmitCVLocDirective()
1105 OS << MAI->getCommentString() << ' ' << FileName << ':' in EmitCVLocDirective()
1116 OS << "\t.cv_linetable\t" << FunctionId << ", "; in EmitCVLinetableDirective()
1117 FnStart->print(OS, MAI); in EmitCVLinetableDirective()
1118 OS << ", "; in EmitCVLinetableDirective()
1119 FnEnd->print(OS, MAI); in EmitCVLinetableDirective()
1128 OS << "\t.cv_inline_linetable\t" << PrimaryFunctionId << ' ' << SourceFileId in EmitCVInlineLinetableDirective()
1130 FnStartSym->print(OS, MAI); in EmitCVInlineLinetableDirective()
1131 OS << ' '; in EmitCVInlineLinetableDirective()
1132 FnEndSym->print(OS, MAI); in EmitCVInlineLinetableDirective()
1134 OS << " contains"; in EmitCVInlineLinetableDirective()
1136 OS << ' ' << SecondaryFunctionId; in EmitCVInlineLinetableDirective()
1147 OS << "\t.cv_def_range\t"; in EmitCVDefRangeDirective()
1149 OS << ' '; in EmitCVDefRangeDirective()
1150 Range.first->print(OS, MAI); in EmitCVDefRangeDirective()
1151 OS << ' '; in EmitCVDefRangeDirective()
1152 Range.second->print(OS, MAI); in EmitCVDefRangeDirective()
1154 OS << ", "; in EmitCVDefRangeDirective()
1155 PrintQuotedString(FixedSizePortion, OS); in EmitCVDefRangeDirective()
1161 OS << "\t.cv_stringtable"; in EmitCVStringTableDirective()
1166 OS << "\t.cv_filechecksums"; in EmitCVFileChecksumsDirective()
1172 OS << "\t.ident\t"; in EmitIdent()
1173 PrintQuotedString(IdentString, OS); in EmitIdent()
1179 OS << "\t.cfi_sections "; in EmitCFISections()
1181 OS << ".eh_frame"; in EmitCFISections()
1183 OS << ", .debug_frame"; in EmitCFISections()
1185 OS << ".debug_frame"; in EmitCFISections()
1192 OS << "\t.cfi_startproc"; in EmitCFIStartProcImpl()
1194 OS << " simple"; in EmitCFIStartProcImpl()
1200 OS << "\t.cfi_endproc"; in EmitCFIEndProcImpl()
1208 InstPrinter->printRegName(OS, LLVMRegister); in EmitRegisterName()
1210 OS << Register; in EmitRegisterName()
1216 OS << "\t.cfi_def_cfa "; in EmitCFIDefCfa()
1218 OS << ", " << Offset; in EmitCFIDefCfa()
1224 OS << "\t.cfi_def_cfa_offset " << Offset; in EmitCFIDefCfaOffset()
1228 static void PrintCFIEscape(llvm::formatted_raw_ostream &OS, StringRef Values) { in PrintCFIEscape() argument
1229 OS << "\t.cfi_escape "; in PrintCFIEscape()
1233 OS << format("0x%02x", uint8_t(Values[i])) << ", "; in PrintCFIEscape()
1234 OS << format("0x%02x", uint8_t(Values[e])); in PrintCFIEscape()
1240 PrintCFIEscape(OS, Values); in EmitCFIEscape()
1250 PrintCFIEscape(OS, StringRef((const char *)&Buffer[0], Len)); in EmitCFIGnuArgsSize()
1256 OS << "\t.cfi_def_cfa_register "; in EmitCFIDefCfaRegister()
1263 OS << "\t.cfi_offset "; in EmitCFIOffset()
1265 OS << ", " << Offset; in EmitCFIOffset()
1272 OS << "\t.cfi_personality " << Encoding << ", "; in EmitCFIPersonality()
1273 Sym->print(OS, MAI); in EmitCFIPersonality()
1279 OS << "\t.cfi_lsda " << Encoding << ", "; in EmitCFILsda()
1280 Sym->print(OS, MAI); in EmitCFILsda()
1286 OS << "\t.cfi_remember_state"; in EmitCFIRememberState()
1292 OS << "\t.cfi_restore_state"; in EmitCFIRestoreState()
1298 OS << "\t.cfi_same_value "; in EmitCFISameValue()
1305 OS << "\t.cfi_rel_offset "; in EmitCFIRelOffset()
1307 OS << ", " << Offset; in EmitCFIRelOffset()
1313 OS << "\t.cfi_adjust_cfa_offset " << Adjustment; in EmitCFIAdjustCfaOffset()
1319 OS << "\t.cfi_signal_frame"; in EmitCFISignalFrame()
1325 OS << "\t.cfi_undefined " << Register; in EmitCFIUndefined()
1331 OS << "\t.cfi_register " << Register1 << ", " << Register2; in EmitCFIRegister()
1337 OS << "\t.cfi_window_save"; in EmitCFIWindowSave()
1344 OS << ".seh_proc "; in EmitWinCFIStartProc()
1345 Symbol->print(OS, MAI); in EmitWinCFIStartProc()
1352 OS << "\t.seh_endproc"; in EmitWinCFIEndProc()
1359 OS << "\t.seh_startchained"; in EmitWinCFIStartChained()
1366 OS << "\t.seh_endchained"; in EmitWinCFIEndChained()
1374 OS << "\t.seh_handler "; in EmitWinEHHandler()
1375 Sym->print(OS, MAI); in EmitWinEHHandler()
1377 OS << ", @unwind"; in EmitWinEHHandler()
1379 OS << ", @except"; in EmitWinEHHandler()
1395 OS << "\t.seh_handlerdata"; in EmitWinEHHandlerData()
1402 OS << "\t.seh_pushreg " << Register; in EmitWinCFIPushReg()
1409 OS << "\t.seh_setframe " << Register << ", " << Offset; in EmitWinCFISetFrame()
1416 OS << "\t.seh_stackalloc " << Size; in EmitWinCFIAllocStack()
1423 OS << "\t.seh_savereg " << Register << ", " << Offset; in EmitWinCFISaveReg()
1430 OS << "\t.seh_savexmm " << Register << ", " << Offset; in EmitWinCFISaveXMM()
1437 OS << "\t.seh_pushframe"; in EmitWinCFIPushFrame()
1439 OS << " @code"; in EmitWinCFIPushFrame()
1446 OS << "\t.seh_endprologue"; in EmitWinCFIEndProlog()
1452 raw_ostream &OS = GetCommentOS(); in AddEncodingComment() local
1478 OS << "encoding: ["; in AddEncodingComment()
1481 OS << ','; in AddEncodingComment()
1495 OS << format("0x%02x", uint8_t(Code[i])); in AddEncodingComment()
1499 OS << format("0x%02x", uint8_t(Code[i])) << '\'' in AddEncodingComment()
1502 OS << char('A' + MapEntry - 1); in AddEncodingComment()
1506 OS << "0b"; in AddEncodingComment()
1518 OS << char('A' + MapEntry - 1); in AddEncodingComment()
1520 OS << Bit; in AddEncodingComment()
1524 OS << "]\n"; in AddEncodingComment()
1529 OS << " fixup " << char('A' + i) << " - " << "offset: " << F.getOffset() in AddEncodingComment()
1549 getTargetStreamer()->prettyPrintAsm(*InstPrinter, OS, Inst, STI); in EmitInstruction()
1551 InstPrinter->printInst(&Inst, OS, "", STI); in EmitInstruction()
1557 OS << "\t.bundle_align_mode " << AlignPow2; in EmitBundleAlignMode()
1562 OS << "\t.bundle_lock"; in EmitBundleLock()
1564 OS << " align_to_end"; in EmitBundleLock()
1569 OS << "\t.bundle_unlock"; in EmitBundleUnlock()
1575 OS << "\t.reloc "; in EmitRelocDirective()
1576 Offset.print(OS, MAI); in EmitRelocDirective()
1577 OS << ", " << Name; in EmitRelocDirective()
1579 OS << ", "; in EmitRelocDirective()
1580 Expr->print(OS, MAI); in EmitRelocDirective()
1592 OS << String; in EmitRawTextImpl()
1615 std::unique_ptr<formatted_raw_ostream> OS, in createAsmStreamer() argument
1619 return new MCAsmStreamer(Context, std::move(OS), isVerboseAsm, in createAsmStreamer()