13#ifndef LLVM_LIB_TARGET_SYSTEMZ_MCTARGETDESC_SYSTEMZHLASMASMSTREAMER_H
14#define LLVM_LIB_TARGET_SYSTEMZ_MCTARGETDESC_SYSTEMZHLASMASMSTREAMER_H
33 constexpr static size_t InstLimit = 80;
34 constexpr static size_t ContIndicatorColumn = 72;
35 constexpr static size_t ContStartColumn = 15;
36 constexpr static size_t ContLen = ContIndicatorColumn - ContStartColumn;
37 std::unique_ptr<formatted_raw_ostream> FOSOwner;
42 std::unique_ptr<MCInstPrinter> InstPrinter;
43 std::unique_ptr<MCAssembler> Assembler;
47 bool IsVerboseAsm =
false;
51 std::unique_ptr<formatted_raw_ostream> os,
52 std::unique_ptr<MCInstPrinter>
printer,
53 std::unique_ptr<MCCodeEmitter> emitter,
54 std::unique_ptr<MCAsmBackend> asmbackend)
59 (asmbackend) ? asmbackend->createObjectWriter(NullStream)
61 CommentStream(CommentToEmit) {
63 if (Assembler->getBackendPtr())
66 Context.setUseNamesOnTempLabels(
true);
67 auto *TO =
Context.getTargetOptions();
70 IsVerboseAsm = TO->AsmVerbose;
72 InstPrinter->setCommentStream(CommentStream);
88 unsigned ValueSize,
unsigned MaxBytesToEmit);
90 unsigned MaxBytesToEmit)
override;
93 unsigned MaxBytesToEmit = 0)
override;
113 Align ByteAlignment)
override {}
122 bool Parens =
false);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the SmallString class.
This class is intended to be used as a base class for asm properties and features specific to the tar...
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
Instances of this class represent a single low-level machine instruction.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Streaming machine code generation interface.
void setAllowAutoPadding(bool v)
Generic base class for all target subtargets.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Represents a location in source code.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef - Represent a constant reference to a string, i.e.
void emitCodeAlignment(Align Alignment, const MCSubtargetInfo *STI, unsigned MaxBytesToEmit=0) override
Emit nops until the byte alignment ByteAlignment is reached.
void emitHLASMValueImpl(const MCExpr *Value, unsigned Size, bool Parens=false)
void emitRawTextImpl(StringRef String) override
EmitRawText - If this file is backed by an assembly streamer, this dumps the specified string in the ...
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, Align ByteAlignment) override
Emit a common symbol.
void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc) override
Emit the expression Value into the output as a native integer of the given Size bytes.
void emitBytes(StringRef Data) override
Emit the bytes in Data into the output.
void emitAlignmentDS(uint64_t ByteAlignment, std::optional< int64_t > Value, unsigned ValueSize, unsigned MaxBytesToEmit)
void emitZerofill(MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, Align ByteAlignment=Align(1), SMLoc Loc=SMLoc()) override
Emit the zerofill section and an optional symbol.
MCAssembler & getAssembler()
void AddComment(const Twine &T, bool EOL=true) override
Add a comment that can be emitted to the generated .s file to make the output of the compiler more re...
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
bool isVerboseAsm() const override
Return true if this streamer supports verbose assembly at all.
void emitValueToAlignment(Align Alignment, int64_t Fill, uint8_t FillLen, unsigned MaxBytesToEmit) override
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
SystemZHLASMAsmStreamer(MCContext &Context, std::unique_ptr< formatted_raw_ostream > os, std::unique_ptr< MCInstPrinter > printer, std::unique_ptr< MCCodeEmitter > emitter, std::unique_ptr< MCAsmBackend > asmbackend)
bool hasRawTextSupport() const override
Do we support EmitRawText?
void changeSection(MCSection *Section, uint32_t Subsection) override
This is called by popSection and switchSection, if the current section changes.
void emitLabel(MCSymbol *Symbol, SMLoc Loc) override
Emit a label for Symbol into the current section.
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override
Add the given Attribute to Symbol.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
LLVM Value Representation.
A raw_ostream that discards all output.
A raw_ostream that writes to an std::string.
A raw_ostream that writes to an SmallVector or SmallString.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
This struct is a compact representation of a valid (non-zero power of two) alignment.