Lines Matching +full:lower +full:- +full:case

1 //===-- SystemZAsmPrinter.cpp - SystemZ LLVM assembly printer -------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
41 if (MI->isCompare()) in lowerRILow()
43 .addReg(SystemZMC::getRegAsGR32(MI->getOperand(0).getReg())) in lowerRILow()
44 .addImm(MI->getOperand(1).getImm()); in lowerRILow()
47 .addReg(SystemZMC::getRegAsGR32(MI->getOperand(0).getReg())) in lowerRILow()
48 .addReg(SystemZMC::getRegAsGR32(MI->getOperand(1).getReg())) in lowerRILow()
49 .addImm(MI->getOperand(2).getImm()); in lowerRILow()
55 if (MI->isCompare()) in lowerRIHigh()
57 .addReg(SystemZMC::getRegAsGRH32(MI->getOperand(0).getReg())) in lowerRIHigh()
58 .addImm(MI->getOperand(1).getImm()); in lowerRIHigh()
61 .addReg(SystemZMC::getRegAsGRH32(MI->getOperand(0).getReg())) in lowerRIHigh()
62 .addReg(SystemZMC::getRegAsGRH32(MI->getOperand(1).getReg())) in lowerRIHigh()
63 .addImm(MI->getOperand(2).getImm()); in lowerRIHigh()
70 .addReg(MI->getOperand(0).getReg()) in lowerRIEfLow()
71 .addReg(MI->getOperand(1).getReg()) in lowerRIEfLow()
72 .addReg(SystemZMC::getRegAsGR64(MI->getOperand(2).getReg())) in lowerRIEfLow()
73 .addImm(MI->getOperand(3).getImm()) in lowerRIEfLow()
74 .addImm(MI->getOperand(4).getImm()) in lowerRIEfLow()
75 .addImm(MI->getOperand(5).getImm()); in lowerRIEfLow()
98 if (MI->memoperands_empty()) in lowerAlignmentHint()
102 for (MachineInstr::mmo_iterator MMOI = MI->memoperands_begin(), in lowerAlignmentHint()
103 EE = MI->memoperands_end(); MMOI != EE; ++MMOI) in lowerAlignmentHint()
104 if ((*MMOI)->getAlign() < Alignment) in lowerAlignmentHint()
105 Alignment = (*MMOI)->getAlign(); in lowerAlignmentHint()
123 .addReg(SystemZMC::getRegAsVR128(MI->getOperand(0).getReg())) in lowerSubvectorLoad()
124 .addReg(MI->getOperand(1).getReg()) in lowerSubvectorLoad()
125 .addImm(MI->getOperand(2).getImm()) in lowerSubvectorLoad()
126 .addReg(MI->getOperand(3).getReg()); in lowerSubvectorLoad()
133 .addReg(SystemZMC::getRegAsVR128(MI->getOperand(0).getReg())) in lowerSubvectorStore()
134 .addReg(MI->getOperand(1).getReg()) in lowerSubvectorStore()
135 .addImm(MI->getOperand(2).getImm()) in lowerSubvectorStore()
136 .addReg(MI->getOperand(3).getReg()) in lowerSubvectorStore()
140 // The XPLINK ABI requires that a no-op encoding the call type is emitted after
163 case SystemZII::MO_ADA_DIRECT_FUNC_DESC: in insert()
183 Sym = MO.getParent()->getMF()->getTarget().getSymbol(GV); in insert()
187 Sym = MO.getParent()->getMF()->getContext().getOrCreateSymbol(SymName); in insert()
197 SystemZ_MC::verifyInstructionPredicates(MI->getOpcode(), in emitInstruction()
200 SystemZMCInstLower Lower(MF->getContext(), *this); in emitInstruction() local
202 switch (MI->getOpcode()) { in emitInstruction()
203 case SystemZ::Return: in emitInstruction()
208 case SystemZ::Return_XPLINK: in emitInstruction()
215 case SystemZ::CondReturn: in emitInstruction()
217 .addImm(MI->getOperand(0).getImm()) in emitInstruction()
218 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
222 case SystemZ::CondReturn_XPLINK: in emitInstruction()
224 .addImm(MI->getOperand(0).getImm()) in emitInstruction()
225 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
231 case SystemZ::CRBReturn: in emitInstruction()
233 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
234 .addReg(MI->getOperand(1).getReg()) in emitInstruction()
235 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
240 case SystemZ::CGRBReturn: in emitInstruction()
242 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
243 .addReg(MI->getOperand(1).getReg()) in emitInstruction()
244 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
249 case SystemZ::CIBReturn: in emitInstruction()
251 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
252 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
253 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
258 case SystemZ::CGIBReturn: in emitInstruction()
260 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
261 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
262 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
267 case SystemZ::CLRBReturn: in emitInstruction()
269 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
270 .addReg(MI->getOperand(1).getReg()) in emitInstruction()
271 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
276 case SystemZ::CLGRBReturn: in emitInstruction()
278 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
279 .addReg(MI->getOperand(1).getReg()) in emitInstruction()
280 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
285 case SystemZ::CLIBReturn: in emitInstruction()
287 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
288 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
289 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
294 case SystemZ::CLGIBReturn: in emitInstruction()
296 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
297 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
298 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
303 case SystemZ::CallBRASL_XPLINK64: in emitInstruction()
307 .addExpr(Lower.getExpr(MI->getOperand(0), in emitInstruction()
312 case SystemZ::CallBASR_XPLINK64: in emitInstruction()
315 .addReg(MI->getOperand(0).getReg())); in emitInstruction()
319 case SystemZ::CallBASR_STACKEXT: in emitInstruction()
322 .addReg(MI->getOperand(0).getReg())); in emitInstruction()
326 case SystemZ::ADA_ENTRY_VALUE: in emitInstruction()
327 case SystemZ::ADA_ENTRY: { in emitInstruction()
328 const SystemZSubtarget &Subtarget = MF->getSubtarget<SystemZSubtarget>(); in emitInstruction()
330 uint32_t Disp = ADATable.insert(MI->getOperand(1)); in emitInstruction()
331 Register TargetReg = MI->getOperand(0).getReg(); in emitInstruction()
333 Register ADAReg = MI->getOperand(2).getReg(); in emitInstruction()
334 Disp += MI->getOperand(3).getImm(); in emitInstruction()
335 bool LoadAddr = MI->getOpcode() == SystemZ::ADA_ENTRY; in emitInstruction()
338 unsigned Op = TII->getOpcodeForOffset(Op0, Disp); in emitInstruction()
363 case SystemZ::CallBRASL: in emitInstruction()
366 .addExpr(Lower.getExpr(MI->getOperand(0), MCSymbolRefExpr::VK_PLT)); in emitInstruction()
369 case SystemZ::CallBASR: in emitInstruction()
372 .addReg(MI->getOperand(0).getReg()); in emitInstruction()
375 case SystemZ::CallJG: in emitInstruction()
377 .addExpr(Lower.getExpr(MI->getOperand(0), MCSymbolRefExpr::VK_PLT)); in emitInstruction()
380 case SystemZ::CallBRCL: in emitInstruction()
382 .addImm(MI->getOperand(0).getImm()) in emitInstruction()
383 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
384 .addExpr(Lower.getExpr(MI->getOperand(2), MCSymbolRefExpr::VK_PLT)); in emitInstruction()
387 case SystemZ::CallBR: in emitInstruction()
389 .addReg(MI->getOperand(0).getReg()); in emitInstruction()
392 case SystemZ::CallBCR: in emitInstruction()
394 .addImm(MI->getOperand(0).getImm()) in emitInstruction()
395 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
396 .addReg(MI->getOperand(2).getReg()); in emitInstruction()
399 case SystemZ::CRBCall: in emitInstruction()
401 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
402 .addReg(MI->getOperand(1).getReg()) in emitInstruction()
403 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
404 .addReg(MI->getOperand(3).getReg()) in emitInstruction()
408 case SystemZ::CGRBCall: in emitInstruction()
410 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
411 .addReg(MI->getOperand(1).getReg()) in emitInstruction()
412 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
413 .addReg(MI->getOperand(3).getReg()) in emitInstruction()
417 case SystemZ::CIBCall: in emitInstruction()
419 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
420 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
421 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
422 .addReg(MI->getOperand(3).getReg()) in emitInstruction()
426 case SystemZ::CGIBCall: in emitInstruction()
428 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
429 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
430 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
431 .addReg(MI->getOperand(3).getReg()) in emitInstruction()
435 case SystemZ::CLRBCall: in emitInstruction()
437 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
438 .addReg(MI->getOperand(1).getReg()) in emitInstruction()
439 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
440 .addReg(MI->getOperand(3).getReg()) in emitInstruction()
444 case SystemZ::CLGRBCall: in emitInstruction()
446 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
447 .addReg(MI->getOperand(1).getReg()) in emitInstruction()
448 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
449 .addReg(MI->getOperand(3).getReg()) in emitInstruction()
453 case SystemZ::CLIBCall: in emitInstruction()
455 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
456 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
457 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
458 .addReg(MI->getOperand(3).getReg()) in emitInstruction()
462 case SystemZ::CLGIBCall: in emitInstruction()
464 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
465 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
466 .addImm(MI->getOperand(2).getImm()) in emitInstruction()
467 .addReg(MI->getOperand(3).getReg()) in emitInstruction()
471 case SystemZ::TLS_GDCALL: in emitInstruction()
474 .addExpr(getTLSGetOffset(MF->getContext())) in emitInstruction()
475 .addExpr(Lower.getExpr(MI->getOperand(0), MCSymbolRefExpr::VK_TLSGD)); in emitInstruction()
478 case SystemZ::TLS_LDCALL: in emitInstruction()
481 .addExpr(getTLSGetOffset(MF->getContext())) in emitInstruction()
482 .addExpr(Lower.getExpr(MI->getOperand(0), MCSymbolRefExpr::VK_TLSLDM)); in emitInstruction()
485 case SystemZ::GOT: in emitInstruction()
487 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
488 .addExpr(getGlobalOffsetTable(MF->getContext())); in emitInstruction()
491 case SystemZ::IILF64: in emitInstruction()
493 .addReg(SystemZMC::getRegAsGR32(MI->getOperand(0).getReg())) in emitInstruction()
494 .addImm(MI->getOperand(2).getImm()); in emitInstruction()
497 case SystemZ::IIHF64: in emitInstruction()
499 .addReg(SystemZMC::getRegAsGRH32(MI->getOperand(0).getReg())) in emitInstruction()
500 .addImm(MI->getOperand(2).getImm()); in emitInstruction()
503 case SystemZ::RISBHH: in emitInstruction()
504 case SystemZ::RISBHL: in emitInstruction()
508 case SystemZ::RISBLH: in emitInstruction()
509 case SystemZ::RISBLL: in emitInstruction()
513 case SystemZ::VLVGP32: in emitInstruction()
515 .addReg(MI->getOperand(0).getReg()) in emitInstruction()
516 .addReg(SystemZMC::getRegAsGR64(MI->getOperand(1).getReg())) in emitInstruction()
517 .addReg(SystemZMC::getRegAsGR64(MI->getOperand(2).getReg())); in emitInstruction()
520 case SystemZ::VLR32: in emitInstruction()
521 case SystemZ::VLR64: in emitInstruction()
523 .addReg(SystemZMC::getRegAsVR128(MI->getOperand(0).getReg())) in emitInstruction()
524 .addReg(SystemZMC::getRegAsVR128(MI->getOperand(1).getReg())); in emitInstruction()
527 case SystemZ::VL: in emitInstruction()
528 Lower.lower(MI, LoweredMI); in emitInstruction()
532 case SystemZ::VST: in emitInstruction()
533 Lower.lower(MI, LoweredMI); in emitInstruction()
537 case SystemZ::VLM: in emitInstruction()
538 Lower.lower(MI, LoweredMI); in emitInstruction()
542 case SystemZ::VSTM: in emitInstruction()
543 Lower.lower(MI, LoweredMI); in emitInstruction()
547 case SystemZ::VL32: in emitInstruction()
551 case SystemZ::VL64: in emitInstruction()
555 case SystemZ::VST32: in emitInstruction()
559 case SystemZ::VST64: in emitInstruction()
563 case SystemZ::LFER: in emitInstruction()
565 .addReg(SystemZMC::getRegAsGR64(MI->getOperand(0).getReg())) in emitInstruction()
566 .addReg(SystemZMC::getRegAsVR128(MI->getOperand(1).getReg())) in emitInstruction()
570 case SystemZ::LEFR: in emitInstruction()
572 .addReg(SystemZMC::getRegAsVR128(MI->getOperand(0).getReg())) in emitInstruction()
573 .addReg(SystemZMC::getRegAsVR128(MI->getOperand(0).getReg())) in emitInstruction()
574 .addReg(MI->getOperand(1).getReg()) in emitInstruction()
579 case SystemZ::NAME##64: LoweredMI = lowerRILow(MI, SystemZ::NAME); break in emitInstruction()
596 case SystemZ::NAME##64: LoweredMI = lowerRIHigh(MI, SystemZ::NAME); break in emitInstruction()
612 case SystemZ::Serialize: in emitInstruction()
613 if (MF->getSubtarget<SystemZSubtarget>().hasFastSerialization()) in emitInstruction()
625 case SystemZ::Trap: { in emitInstruction()
627 OutStreamer->emitLabel(DotSym); in emitInstruction()
638 case SystemZ::CondTrap: { in emitInstruction()
640 OutStreamer->emitLabel(DotSym); in emitInstruction()
645 .addImm(MI->getOperand(0).getImm()) in emitInstruction()
646 .addImm(MI->getOperand(1).getImm()) in emitInstruction()
651 case TargetOpcode::FENTRY_CALL: in emitInstruction()
652 LowerFENTRY_CALL(*MI, Lower); in emitInstruction()
655 case TargetOpcode::STACKMAP: in emitInstruction()
659 case TargetOpcode::PATCHPOINT: in emitInstruction()
660 LowerPATCHPOINT(*MI, Lower); in emitInstruction()
663 case SystemZ::EXRL_Pseudo: { in emitInstruction()
664 unsigned TargetInsOpc = MI->getOperand(0).getImm(); in emitInstruction()
665 Register LenMinus1Reg = MI->getOperand(1).getReg(); in emitInstruction()
666 Register DestReg = MI->getOperand(2).getReg(); in emitInstruction()
667 int64_t DestDisp = MI->getOperand(3).getImm(); in emitInstruction()
668 Register SrcReg = MI->getOperand(4).getReg(); in emitInstruction()
669 int64_t SrcDisp = MI->getOperand(5).getImm(); in emitInstruction()
675 SystemZTargetStreamer::MCInstSTIPair ET_STI(ET, &MF->getSubtarget()); in emitInstruction()
677 TS->EXRLTargets2Sym.find(ET_STI); in emitInstruction()
678 if (I != TS->EXRLTargets2Sym.end()) in emitInstruction()
679 DotSym = I->second; in emitInstruction()
681 TS->EXRLTargets2Sym[ET_STI] = DotSym = OutContext.createTempSymbol(); in emitInstruction()
690 Lower.lower(MI, LoweredMI); in emitInstruction()
726 SystemZMCInstLower &Lower) { in LowerFENTRY_CALL() argument
727 MCContext &Ctx = MF->getContext(); in LowerFENTRY_CALL()
728 if (MF->getFunction().hasFnAttribute("mrecord-mcount")) { in LowerFENTRY_CALL()
730 OutStreamer->pushSection(); in LowerFENTRY_CALL()
731 OutStreamer->switchSection( in LowerFENTRY_CALL()
733 OutStreamer->emitSymbolValue(DotSym, 8); in LowerFENTRY_CALL()
734 OutStreamer->popSection(); in LowerFENTRY_CALL()
735 OutStreamer->emitLabel(DotSym); in LowerFENTRY_CALL()
738 if (MF->getFunction().hasFnAttribute("mnop-mcount")) { in LowerFENTRY_CALL()
746 OutStreamer->emitInstruction( in LowerFENTRY_CALL()
752 auto *TII = MF->getSubtarget<SystemZSubtarget>().getInstrInfo(); in LowerSTACKMAP()
756 auto &Ctx = OutStreamer->getContext(); in LowerSTACKMAP()
758 OutStreamer->emitLabel(MILabel); in LowerSTACKMAP()
770 MII->getOpcode() == TargetOpcode::PATCHPOINT || in LowerSTACKMAP()
771 MII->getOpcode() == TargetOpcode::STACKMAP) in LowerSTACKMAP()
773 ShadowBytes += TII->getInstSizeInBytes(*MII); in LowerSTACKMAP()
774 if (MII->isCall()) in LowerSTACKMAP()
781 ShadowBytes += EmitNop(OutContext, *OutStreamer, NumNOPBytes - ShadowBytes, in LowerSTACKMAP()
785 // Lower a patchpoint of the form:
788 SystemZMCInstLower &Lower) { in LowerPATCHPOINT() argument
789 auto &Ctx = OutStreamer->getContext(); in LowerPATCHPOINT()
791 OutStreamer->emitLabel(MILabel); in LowerPATCHPOINT()
802 unsigned ScratchIdx = -1; in LowerPATCHPOINT()
827 const MCExpr *Expr = Lower.getExpr(CalleeMO, MCSymbolRefExpr::VK_PLT); in LowerPATCHPOINT()
838 assert((NumBytes - EncodedBytes) % 2 == 0 && in LowerPATCHPOINT()
841 EncodedBytes += EmitNop(OutContext, *OutStreamer, NumBytes - EncodedBytes, in LowerPATCHPOINT()
845 // The *alignment* of 128-bit vector types is different between the software
849 if (M.getModuleFlag("s390x-visible-vector-ABI")) { in emitAttributes()
851 TM.getMCSubtargetInfo()->hasFeature(SystemZ::FeatureVector); in emitAttributes()
852 OutStreamer->emitGNUAttribute(8, HasVectorFeature ? 2 : 1); in emitAttributes()
856 // Convert a SystemZ-specific constant pool modifier into the associated
861 case SystemZCP::TLSGD: return MCSymbolRefExpr::VK_TLSGD; in getModifierVariantKind()
862 case SystemZCP::TLSLDM: return MCSymbolRefExpr::VK_TLSLDM; in getModifierVariantKind()
863 case SystemZCP::DTPOFF: return MCSymbolRefExpr::VK_DTPOFF; in getModifierVariantKind()
864 case SystemZCP::NTPOFF: return MCSymbolRefExpr::VK_NTPOFF; in getModifierVariantKind()
874 MCSymbolRefExpr::create(getSymbol(ZCPV->getGlobalValue()), in emitMachineConstantPoolValue()
875 getModifierVariantKind(ZCPV->getModifier()), in emitMachineConstantPoolValue()
877 uint64_t Size = getDataLayout().getTypeAllocSize(ZCPV->getType()); in emitMachineConstantPoolValue()
879 OutStreamer->emitValue(Expr, Size); in emitMachineConstantPoolValue()
885 if (MAI->getAssemblerDialect() == AD_HLASM) { in printFormattedRegName()
907 MCOp.getExpr()->print(OS, MAI); in printOperand()
933 const MachineOperand &MO = MI->getOperand(OpNo); in PrintAsmOperand()
943 SystemZMCInstLower Lower(MF->getContext(), *this); in PrintAsmOperand() local
944 MCOp = Lower.lowerOperand(MO); in PrintAsmOperand()
956 case 'A': in PrintAsmMemoryOperand()
958 // setMemRefs(), so MI->memoperands() is empty and the alignment in PrintAsmMemoryOperand()
961 case 'O': in PrintAsmMemoryOperand()
962 OS << MI->getOperand(OpNo + 1).getImm(); in PrintAsmMemoryOperand()
964 case 'R': in PrintAsmMemoryOperand()
965 ::printReg(MI->getOperand(OpNo).getReg(), MAI, OS); in PrintAsmMemoryOperand()
969 printAddress(MAI, MI->getOperand(OpNo).getReg(), in PrintAsmMemoryOperand()
970 MCOperand::createImm(MI->getOperand(OpNo + 1).getImm()), in PrintAsmMemoryOperand()
971 MI->getOperand(OpNo + 2).getReg(), OS); in PrintAsmMemoryOperand()
985 OutStreamer->pushSection(); in emitADASection()
988 OutStreamer->switchSection(getObjFileLowering().getADASection()); in emitADASection()
999 OutStreamer->AddComment(Twine("Offset ") \ in emitADASection()
1002 .concat(Sym->getName())); in emitADASection()
1004 case SystemZII::MO_ADA_DIRECT_FUNC_DESC: in emitADASection()
1008 OutStreamer->emitValue( in emitADASection()
1013 OutStreamer->emitValue( in emitADASection()
1020 case SystemZII::MO_ADA_DATA_SYMBOL_ADDR: in emitADASection()
1022 OutStreamer->emitValue( in emitADASection()
1029 case SystemZII::MO_ADA_INDIRECT_FUNC_DESC: { in emitADASection()
1031 Twine(Sym->getName()).concat("@indirect")); in emitADASection()
1032 OutStreamer->emitAssignment(Alias, in emitADASection()
1034 OutStreamer->emitSymbolAttribute(Alias, MCSA_IndirectSymbol); in emitADASection()
1037 OutStreamer->emitValue( in emitADASection()
1050 OutStreamer->popSection(); in emitADASection()
1056 ProductID = cast<MDString>(MD)->getString().str(); in getProductID()
1065 return VersionVal->getZExtValue(); in getProductVersion()
1072 return ReleaseVal->getZExtValue(); in getProductRelease()
1079 return PatchVal->getZExtValue(); in getProductPatch()
1087 long SecondsSinceEpoch = Val->getSExtValue(); in getTranslationTime()
1094 OutStreamer->pushSection(); in emitIDRLSection()
1095 OutStreamer->switchSection(getObjFileLowering().getIDRLSection()); in emitIDRLSection()
1106 O << formatv("{0,-10}{1,0-2:d}{2,0-2:d}{3:%Y%m%d%H%M%S}{4,0-2}", in emitIDRLSection()
1112 OutStreamer->emitInt8(0); // Reserved. in emitIDRLSection()
1113 OutStreamer->emitInt8(3); // Format. in emitIDRLSection()
1114 OutStreamer->emitInt16(IDRLDataLength); // Length. in emitIDRLSection()
1115 OutStreamer->emitBytes(Data.str()); in emitIDRLSection()
1116 OutStreamer->popSection(); in emitIDRLSection()
1124 OutStreamer->emitLabel(FnEndSym); in emitFunctionBodyEnd()
1126 OutStreamer->pushSection(); in emitFunctionBodyEnd()
1127 OutStreamer->switchSection(getObjFileLowering().getPPA1Section()); in emitFunctionBodyEnd()
1129 OutStreamer->popSection(); in emitFunctionBodyEnd()
1188 OutStreamer->AddComment("PPA1 Flags 1"); in emitPPA1Flags()
1190 OutStreamer->AddComment(" Bit 0: 1 = 64-bit DSA"); in emitPPA1Flags()
1192 OutStreamer->AddComment(" Bit 0: 0 = 32-bit DSA"); in emitPPA1Flags()
1194 OutStreamer->AddComment(" Bit 7: 1 = Vararg function"); in emitPPA1Flags()
1195 OutStreamer->emitInt8(static_cast<uint8_t>(Flags1)); // Flags 1. in emitPPA1Flags()
1197 OutStreamer->AddComment("PPA1 Flags 2"); in emitPPA1Flags()
1199 OutStreamer->AddComment(" Bit 0: 1 = External procedure"); in emitPPA1Flags()
1201 OutStreamer->AddComment(" Bit 3: 1 = STACKPROTECT is enabled"); in emitPPA1Flags()
1203 OutStreamer->AddComment(" Bit 3: 0 = STACKPROTECT is not enabled"); in emitPPA1Flags()
1204 OutStreamer->emitInt8(static_cast<uint8_t>(Flags2)); // Flags 2. in emitPPA1Flags()
1206 OutStreamer->AddComment("PPA1 Flags 3"); in emitPPA1Flags()
1208 OutStreamer->AddComment(" Bit 2: 1 = FP Reg Mask is in optional area"); in emitPPA1Flags()
1209 OutStreamer->emitInt8( in emitPPA1Flags()
1212 OutStreamer->AddComment("PPA1 Flags 4"); in emitPPA1Flags()
1214 OutStreamer->AddComment(" Bit 2: 1 = Vector Reg Mask is in optional area"); in emitPPA1Flags()
1216 OutStreamer->AddComment(" Bit 3: 1 = C++ EH block"); in emitPPA1Flags()
1219 OutStreamer->AddComment(" Bit 7: 1 = Name Length and Name"); in emitPPA1Flags()
1220 OutStreamer->emitInt8(static_cast<uint8_t>( in emitPPA1Flags()
1234 // Emit padding to ensure that the next optional field word-aligned. in emitPPA1Name()
1235 uint8_t ExtraZeros = 4 - ((2 + OutSize) % 4); in emitPPA1Name()
1241 OutStreamer->AddComment("Length of Name"); in emitPPA1Name()
1242 OutStreamer->emitInt16(OutSize); in emitPPA1Name()
1243 OutStreamer->AddComment("Name of Function"); in emitPPA1Name()
1244 OutStreamer->emitBytes(OutName); in emitPPA1Name()
1245 OutStreamer->emitZeros(ExtraZeros); in emitPPA1Name()
1251 const TargetRegisterInfo *TRI = MF->getRegInfo().getTargetRegisterInfo(); in emitPPA1()
1252 const SystemZSubtarget &Subtarget = MF->getSubtarget<SystemZSubtarget>(); in emitPPA1()
1256 MF->getInfo<SystemZMachineFunctionInfo>(); in emitPPA1()
1259 const MachineFrameInfo &MFFrame = MF->getFrameInfo(); in emitPPA1()
1273 for (unsigned I = ZFI->getSpillGPRRegs().LowGPR, in emitPPA1()
1274 E = ZFI->getSpillGPRRegs().HighGPR; in emitPPA1()
1276 unsigned V = TRI->getEncodingValue((Register)I); in emitPPA1()
1278 SavedGPRMask |= 1 << (15 - V); in emitPPA1()
1283 unsigned I = TRI->getEncodingValue(Reg); in emitPPA1()
1287 SavedFPRMask |= 1 << (15 - I); in emitPPA1()
1293 unsigned BitNum = I - 16; in emitPPA1()
1294 SavedVRMask |= 1 << (7 - BitNum); in emitPPA1()
1306 uint8_t FrameReg = TRI->getEncodingValue(TRI->getFrameRegister(*MF)); in emitPPA1()
1307 uint8_t AllocaReg = ZFL->hasFP(*MF) ? FrameReg : 0; in emitPPA1()
1332 OutStreamer->AddComment("PPA1"); in emitPPA1()
1333 OutStreamer->emitLabel(CurrentFnPPA1Sym); in emitPPA1()
1334 OutStreamer->AddComment("Version"); in emitPPA1()
1335 OutStreamer->emitInt8(0x02); // Version. in emitPPA1()
1336 OutStreamer->AddComment("LE Signature X'CE'"); in emitPPA1()
1337 OutStreamer->emitInt8(0xCE); // CEL signature. in emitPPA1()
1338 OutStreamer->AddComment("Saved GPR Mask"); in emitPPA1()
1339 OutStreamer->emitInt16(SavedGPRMask); in emitPPA1()
1340 OutStreamer->AddComment("Offset to PPA2"); in emitPPA1()
1341 OutStreamer->emitAbsoluteSymbolDiff(PPA2Sym, CurrentFnPPA1Sym, 4); in emitPPA1()
1343 bool NeedEmitEHBlock = !MF->getLandingPads().empty(); in emitPPA1()
1346 MF->getFunction().hasName() && MF->getFunction().getName().size() > 0; in emitPPA1()
1348 emitPPA1Flags(OutStreamer, MF->getFunction().isVarArg(), in emitPPA1()
1352 OutStreamer->AddComment("Length/4 of Parms"); in emitPPA1()
1353 OutStreamer->emitInt16( in emitPPA1()
1354 static_cast<uint16_t>(ZFI->getSizeOfFnParams() / 4)); // Parms/4. in emitPPA1()
1355 OutStreamer->AddComment("Length of Code"); in emitPPA1()
1356 OutStreamer->emitAbsoluteSymbolDiff(FnEndSym, CurrentFnEPMarkerSym, 4); in emitPPA1()
1360 OutStreamer->AddComment("FPR mask"); in emitPPA1()
1361 OutStreamer->emitInt16(SavedFPRMask); in emitPPA1()
1362 OutStreamer->AddComment("AR mask"); in emitPPA1()
1363 OutStreamer->emitInt16(0); // AR Mask, unused currently. in emitPPA1()
1364 OutStreamer->AddComment("FPR Save Area Locator"); in emitPPA1()
1365 OutStreamer->AddComment(Twine(" Bit 0-3: Register R") in emitPPA1()
1368 OutStreamer->AddComment(Twine(" Bit 4-31: Offset ") in emitPPA1()
1371 OutStreamer->emitInt32(FrameAndFPROffset); // Offset to FPR save area with in emitPPA1()
1378 OutStreamer->AddComment("VR mask"); in emitPPA1()
1379 OutStreamer->emitInt8(SavedVRMask); in emitPPA1()
1380 OutStreamer->emitInt8(0); // Reserved. in emitPPA1()
1381 OutStreamer->emitInt16(0); // Also reserved. in emitPPA1()
1382 OutStreamer->AddComment("VR Save Area Locator"); in emitPPA1()
1383 OutStreamer->AddComment(Twine(" Bit 0-3: Register R") in emitPPA1()
1386 OutStreamer->AddComment(Twine(" Bit 4-31: Offset ") in emitPPA1()
1389 OutStreamer->emitInt32(FrameAndVROffset); in emitPPA1()
1396 MF->getFunction().getPersonalityFn()->stripPointerCasts()); in emitPPA1()
1398 Per ? MF->getTarget().getSymbol(Per) : nullptr; in emitPPA1()
1401 OutStreamer->AddComment("Version"); in emitPPA1()
1402 OutStreamer->emitInt32(1); in emitPPA1()
1403 OutStreamer->AddComment("Flags"); in emitPPA1()
1404 OutStreamer->emitInt32(0); // LSDA field is a WAS offset in emitPPA1()
1405 OutStreamer->AddComment("Personality routine"); in emitPPA1()
1406 OutStreamer->emitInt64(ADATable.insert( in emitPPA1()
1408 OutStreamer->AddComment("LSDA location"); in emitPPA1()
1409 MCSymbol *GCCEH = MF->getContext().getOrCreateSymbol( in emitPPA1()
1410 Twine("GCC_except_table") + Twine(MF->getFunctionNumber())); in emitPPA1()
1411 OutStreamer->emitInt64( in emitPPA1()
1417 emitPPA1Name(OutStreamer, MF->getFunction().getName()); in emitPPA1()
1420 OutStreamer->emitAbsoluteSymbolDiff(CurrentFnEPMarkerSym, CurrentFnPPA1Sym, in emitPPA1()
1431 OutStreamer->pushSection(); in emitPPA2()
1432 OutStreamer->switchSection(getObjFileLowering().getPPA2Section()); in emitPPA2()
1433 MCContext &OutContext = OutStreamer->getContext(); in emitPPA2()
1453 ostr << formatv("{0,0-2:d}{1,0-2:d}{2,0-2:d}", ProductVersion, ProductRelease, in emitPPA2()
1457 SmallString<sizeof(CompilationTime) - 1> CompilationTimeStr; in emitPPA2()
1458 SmallString<sizeof(Version) - 1> VersionStr; in emitPPA2()
1486 StringRef Language = cast<MDString>(MD)->getString(); in emitPPA2()
1488 .Case("C", PPA2MemberSubId::C) in emitPPA2()
1489 .Case("C++", PPA2MemberSubId::CXX) in emitPPA2()
1490 .Case("Swift", PPA2MemberSubId::Swift) in emitPPA2()
1491 .Case("Go", PPA2MemberSubId::Go) in emitPPA2()
1496 OutStreamer->emitLabel(PPA2Sym); in emitPPA2()
1497 OutStreamer->emitInt8(static_cast<uint8_t>(PPA2MemberId::LE_C_Runtime)); in emitPPA2()
1498 OutStreamer->emitInt8(static_cast<uint8_t>(MemberSubId)); in emitPPA2()
1499 OutStreamer->emitInt8(0x22); // Member defined, c370_plist+c370_env in emitPPA2()
1500 OutStreamer->emitInt8(0x04); // Control level 4 (XPLink) in emitPPA2()
1501 OutStreamer->emitAbsoluteSymbolDiff(CELQSTRT, PPA2Sym, 4); in emitPPA2()
1502 OutStreamer->emitInt32(0x00000000); in emitPPA2()
1503 OutStreamer->emitAbsoluteSymbolDiff(DateVersionSym, PPA2Sym, 4); in emitPPA2()
1504 OutStreamer->emitInt32( in emitPPA2()
1510 const StringRef &CharMode = cast<MDString>(MD)->getString(); in emitPPA2()
1521 OutStreamer->emitInt8(Flgs); in emitPPA2()
1522 OutStreamer->emitInt8(0x00); // Reserved. in emitPPA2()
1526 OutStreamer->emitInt16(0x0000); // 16 Reserved flag bits. in emitPPA2()
1529 OutStreamer->emitLabel(DateVersionSym); in emitPPA2()
1530 OutStreamer->emitBytes(CompilationTimeStr.str()); in emitPPA2()
1531 OutStreamer->emitBytes(VersionStr.str()); in emitPPA2()
1533 OutStreamer->emitInt16(0x0000); // Service level string length. in emitPPA2()
1536 // specially-named section. in emitPPA2()
1537 OutStreamer->switchSection(getObjFileLowering().getPPA2ListSection()); in emitPPA2()
1540 OutStreamer->AddComment("A(PPA2-CELQSTRT)"); in emitPPA2()
1541 OutStreamer->emitAbsoluteSymbolDiff(PPA2Sym, CELQSTRT, 8); in emitPPA2()
1542 OutStreamer->popSection(); in emitPPA2()
1546 const SystemZSubtarget &Subtarget = MF->getSubtarget<SystemZSubtarget>(); in emitFunctionEntryLabel()
1549 MCContext &OutContext = OutStreamer->getContext(); in emitFunctionEntryLabel()
1552 std::string N(MF->getFunction().hasName() in emitFunctionEntryLabel()
1553 ? Twine(MF->getFunction().getName()).concat("_").str() in emitFunctionEntryLabel()
1562 const MachineFrameInfo &MFFrame = MF->getFrameInfo(); in emitFunctionEntryLabel()
1579 OutStreamer->AddComment("XPLINK Routine Layout Entry"); in emitFunctionEntryLabel()
1580 OutStreamer->emitLabel(CurrentFnEPMarkerSym); in emitFunctionEntryLabel()
1581 OutStreamer->AddComment("Eyecatcher 0x00C300C500C500"); in emitFunctionEntryLabel()
1582 OutStreamer->emitIntValueInHex(0x00C300C500C500, 7); // Eyecatcher. in emitFunctionEntryLabel()
1583 OutStreamer->AddComment("Mark Type C'1'"); in emitFunctionEntryLabel()
1584 OutStreamer->emitInt8(0xF1); // Mark Type. in emitFunctionEntryLabel()
1585 OutStreamer->AddComment("Offset to PPA1"); in emitFunctionEntryLabel()
1586 OutStreamer->emitAbsoluteSymbolDiff(CurrentFnPPA1Sym, CurrentFnEPMarkerSym, in emitFunctionEntryLabel()
1588 if (OutStreamer->isVerboseAsm()) { in emitFunctionEntryLabel()
1589 OutStreamer->AddComment("DSA Size 0x" + Twine::utohexstr(DSASize)); in emitFunctionEntryLabel()
1590 OutStreamer->AddComment("Entry Flags"); in emitFunctionEntryLabel()
1592 OutStreamer->AddComment(" Bit 1: 1 = Leaf function"); in emitFunctionEntryLabel()
1594 OutStreamer->AddComment(" Bit 1: 0 = Non-leaf function"); in emitFunctionEntryLabel()
1596 OutStreamer->AddComment(" Bit 2: 1 = Uses alloca"); in emitFunctionEntryLabel()
1598 OutStreamer->AddComment(" Bit 2: 0 = Does not use alloca"); in emitFunctionEntryLabel()
1600 OutStreamer->emitInt32(DSAAndFlags); in emitFunctionEntryLabel()