LLVM: lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
21
22using namespace llvm;
23
25 std::unique_ptr MAB,
26 std::unique_ptr OW,
27 std::unique_ptr Emitter)
31 MipsOptionRecords.push_back(
32 std::unique_ptr(RegInfoRecord));
33}
34
38
40 const MCRegisterInfo *MCRegInfo = Context.getRegisterInfo();
41
44
45 if (.isReg())
46 continue;
47
49 RegInfoRecord->SetPhysRegUsed(Reg, MCRegInfo);
50 }
51
53}
54
59
65
70
74
75
77 for (auto *L : Labels) {
78 auto *Label = static_cast<MCSymbolELF *>(L);
81 }
82 }
83
84 Labels.clear();
85}
86
89 Labels.push_back(Symbol);
90}
91
96
102
107
109 for (const auto &I : MipsOptionRecords)
110 I->EmitMipsOptionRecord();
111}
112
115 std::unique_ptr MAB,
116 std::unique_ptr OW,
117 std::unique_ptr Emitter) {
118 return new MipsELFStreamer(Context, std::move(MAB), std::move(OW),
120}
dxil DXContainer Global Emitter
LLVM_ABI bool registerSymbol(const MCSymbol &Symbol)
Context object for machine code objects.
LLVM_ABI MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Emit a label for Symbol into the current section.
MCELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
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.
unsigned getNumOperands() const
const MCOperand & getOperand(unsigned i) const
MCAssembler & getAssembler()
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc()) override
Emit the expression Value into the output as a native integer of the given Size bytes.
Instances of this class represent operands of the MCInst class.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Wrapper class representing physical registers. Should be passed by value.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
MCContext & getContext() const
MCTargetStreamer * getTargetStreamer()
virtual void emitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
virtual void switchSection(MCSection *Section, uint32_t Subsec=0)
Set the current section where code is being emitted to Section.
Generic base class for all target subtargets.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void emitCFIStartProcImpl(MCDwarfFrameInfo &Frame) override
Definition MipsELFStreamer.cpp:55
void EmitMipsOptionRecords()
Emits all the option records stored up until the point it's called.
Definition MipsELFStreamer.cpp:108
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Overriding this function allows us to add arbitrary behaviour before the Inst is actually emitted.
Definition MipsELFStreamer.cpp:35
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Overriding this function allows us to record all labels that should be marked as microMIPS.
Definition MipsELFStreamer.cpp:87
void emitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override
Definition MipsELFStreamer.cpp:66
MipsELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
Definition MipsELFStreamer.cpp:24
MCSymbol * emitCFILabel() override
When emitting an object file, create and emit a real label.
Definition MipsELFStreamer.cpp:60
void createPendingLabelRelocs()
Mark labels as microMIPS, if necessary for the subtarget.
Definition MipsELFStreamer.cpp:71
void switchSection(MCSection *Section, uint32_t Subsection=0) override
Overriding this function allows us to dismiss all labels that are candidates for marking as microMIPS...
Definition MipsELFStreamer.cpp:92
void emitIntValue(uint64_t Value, unsigned Size) override
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
Definition MipsELFStreamer.cpp:103
void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc) override
Overriding these functions allows us to dismiss all labels that are candidates for marking as microMI...
Definition MipsELFStreamer.cpp:97
bool isMicroMipsEnabled() const
Represents a location in source code.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
MCELFStreamer * createMipsELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
Definition MipsELFStreamer.cpp:114
DWARFExpression::Operation Op
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.