LLVM  3.7.0
HexagonMCELFStreamer.h
Go to the documentation of this file.
1 //===- HexagonMCELFStreamer.h - Hexagon subclass of MCElfStreamer ---------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef HEXAGONMCELFSTREAMER_H
11 #define HEXAGONMCELFSTREAMER_H
12 
16 #include "llvm/MC/MCELFStreamer.h"
17 #include "HexagonTargetStreamer.h"
18 
19 namespace llvm {
20 
22  std::unique_ptr<MCInstrInfo> MCII;
23 
24 public:
26  raw_pwrite_stream &OS, MCCodeEmitter *Emitter)
27  : MCELFStreamer(Context, TAB, OS, Emitter),
28  MCII(createHexagonMCInstrInfo()) {}
29 
30  virtual void EmitInstruction(const MCInst &Inst,
31  const MCSubtargetInfo &STI) override;
32  void EmitSymbol(const MCInst &Inst);
33  void HexagonMCEmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
34  unsigned ByteAlignment,
35  unsigned AccessSize);
36  void HexagonMCEmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
37  unsigned ByteAlignment, unsigned AccessSize);
38 };
39 
40 MCStreamer *createHexagonELFStreamer(MCContext &Context, MCAsmBackend &MAB,
41  raw_pwrite_stream &OS, MCCodeEmitter *CE);
42 
43 } // namespace llvm
44 
45 #endif
virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:39
Context object for machine code objects.
Definition: MCContext.h:48
MCInstrInfo * createHexagonMCInstrInfo()
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:150
MCCodeEmitter - Generic instruction encoding interface.
Definition: MCCodeEmitter.h:23
Definition for classes that emit Hexagon machine code from MCInsts.
void HexagonMCEmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment, unsigned AccessSize)
void EmitSymbol(const MCInst &Inst)
MCStreamer * createHexagonELFStreamer(MCContext &Context, MCAsmBackend &MAB, raw_pwrite_stream &OS, MCCodeEmitter *CE)
MCSubtargetInfo - Generic base class for all target subtargets.
An abstract base class for streams implementations that also support a pwrite operation.
Definition: raw_ostream.h:321
Generic interface to target specific assembler backends.
Definition: MCAsmBackend.h:34
HexagonMCELFStreamer(MCContext &Context, MCAsmBackend &TAB, raw_pwrite_stream &OS, MCCodeEmitter *Emitter)
void HexagonMCEmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment, unsigned AccessSize)