003 File Manager
Current Path:
/usr/src/contrib/llvm-project/llvm/lib/Target/Mips/MCTargetDesc
usr
/
src
/
contrib
/
llvm-project
/
llvm
/
lib
/
Target
/
Mips
/
MCTargetDesc
/
📁
..
📄
MipsABIFlagsSection.cpp
(2.51 KB)
📄
MipsABIFlagsSection.h
(5.84 KB)
📄
MipsABIInfo.cpp
(3.7 KB)
📄
MipsABIInfo.h
(2.59 KB)
📄
MipsAsmBackend.cpp
(24.31 KB)
📄
MipsAsmBackend.h
(2.73 KB)
📄
MipsBaseInfo.h
(4.46 KB)
📄
MipsELFObjectWriter.cpp
(24.29 KB)
📄
MipsELFStreamer.cpp
(3.83 KB)
📄
MipsELFStreamer.h
(3.34 KB)
📄
MipsFixupKinds.h
(5.86 KB)
📄
MipsInstPrinter.cpp
(8.25 KB)
📄
MipsInstPrinter.h
(3.51 KB)
📄
MipsMCAsmInfo.cpp
(1.86 KB)
📄
MipsMCAsmInfo.h
(926 B)
📄
MipsMCCodeEmitter.cpp
(40.54 KB)
📄
MipsMCCodeEmitter.h
(13.69 KB)
📄
MipsMCExpr.cpp
(7.94 KB)
📄
MipsMCExpr.h
(2.42 KB)
📄
MipsMCNaCl.h
(1.24 KB)
📄
MipsMCTargetDesc.cpp
(7.15 KB)
📄
MipsMCTargetDesc.h
(2.04 KB)
📄
MipsNaClELFStreamer.cpp
(8.86 KB)
📄
MipsOptionRecord.cpp
(3.57 KB)
📄
MipsTargetStreamer.cpp
(45.07 KB)
Editing: MipsELFStreamer.h
//===- MipsELFStreamer.h - ELF Object Output --------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This is a custom MCELFStreamer which allows us to insert some hooks before // emitting data into an actual object file. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSELFSTREAMER_H #define LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSELFSTREAMER_H #include "MipsOptionRecord.h" #include "llvm/ADT/SmallVector.h" #include "llvm/MC/MCELFStreamer.h" #include <memory> namespace llvm { class MCAsmBackend; class MCCodeEmitter; class MCContext; class MCSubtargetInfo; struct MCDwarfFrameInfo; class MipsELFStreamer : public MCELFStreamer { SmallVector<std::unique_ptr<MipsOptionRecord>, 8> MipsOptionRecords; MipsRegInfoRecord *RegInfoRecord; SmallVector<MCSymbol*, 4> Labels; public: MipsELFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> MAB, std::unique_ptr<MCObjectWriter> OW, std::unique_ptr<MCCodeEmitter> Emitter); /// Overriding this function allows us to add arbitrary behaviour before the /// \p Inst is actually emitted. For example, we can inspect the operands and /// gather sufficient information that allows us to reason about the register /// usage for the translation unit. void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override; /// Overriding this function allows us to record all labels that should be /// marked as microMIPS. Based on this data marking is done in /// EmitInstruction. void emitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override; /// Overriding this function allows us to dismiss all labels that are /// candidates for marking as microMIPS when .section directive is processed. void SwitchSection(MCSection *Section, const MCExpr *Subsection = nullptr) override; /// Overriding these functions allows us to dismiss all labels that are /// candidates for marking as microMIPS when .word/.long/.4byte etc /// directives are emitted. void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc) override; void emitIntValue(uint64_t Value, unsigned Size) override; // Overriding these functions allows us to avoid recording of these labels // in EmitLabel and later marking them as microMIPS. void emitCFIStartProcImpl(MCDwarfFrameInfo &Frame) override; void emitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override; MCSymbol *emitCFILabel() override; /// Emits all the option records stored up until the point it's called. void EmitMipsOptionRecords(); /// Mark labels as microMIPS, if necessary for the subtarget. void createPendingLabelRelocs(); }; MCELFStreamer *createMipsELFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> MAB, std::unique_ptr<MCObjectWriter> OW, std::unique_ptr<MCCodeEmitter> Emitter, bool RelaxAll); } // end namespace llvm #endif // LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSELFSTREAMER_H
Upload File
Create Folder