2015-06-17 11:06:16 +08:00
|
|
|
//===- HexagonMCELFStreamer.h - Hexagon subclass of MCElfStreamer ---------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2016-12-17 09:09:05 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H
|
|
|
|
#define LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H
|
2015-06-17 11:06:16 +08:00
|
|
|
|
|
|
|
#include "MCTargetDesc/HexagonMCTargetDesc.h"
|
|
|
|
#include "llvm/MC/MCELFStreamer.h"
|
2016-12-17 09:09:05 +08:00
|
|
|
#include "llvm/MC/MCInstrInfo.h"
|
|
|
|
#include <cstdint>
|
|
|
|
#include <memory>
|
2015-06-17 11:06:16 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class HexagonMCELFStreamer : public MCELFStreamer {
|
|
|
|
std::unique_ptr<MCInstrInfo> MCII;
|
|
|
|
|
|
|
|
public:
|
|
|
|
HexagonMCELFStreamer(MCContext &Context, MCAsmBackend &TAB,
|
|
|
|
raw_pwrite_stream &OS, MCCodeEmitter *Emitter)
|
|
|
|
: MCELFStreamer(Context, TAB, OS, Emitter),
|
|
|
|
MCII(createHexagonMCInstrInfo()) {}
|
|
|
|
|
2017-02-07 03:35:46 +08:00
|
|
|
HexagonMCELFStreamer(MCContext &Context,
|
|
|
|
MCAsmBackend &TAB,
|
|
|
|
raw_pwrite_stream &OS, MCCodeEmitter *Emitter,
|
|
|
|
MCAssembler *Assembler) :
|
|
|
|
MCELFStreamer(Context, TAB, OS, Emitter),
|
|
|
|
MCII (createHexagonMCInstrInfo()) {}
|
|
|
|
|
2017-04-14 15:44:23 +08:00
|
|
|
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI,
|
|
|
|
bool) override;
|
2015-06-17 11:06:16 +08:00
|
|
|
void EmitSymbol(const MCInst &Inst);
|
|
|
|
void HexagonMCEmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
|
|
|
unsigned ByteAlignment,
|
|
|
|
unsigned AccessSize);
|
|
|
|
void HexagonMCEmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
|
|
|
unsigned ByteAlignment, unsigned AccessSize);
|
|
|
|
};
|
|
|
|
|
2017-02-07 03:35:46 +08:00
|
|
|
MCStreamer *createHexagonELFStreamer(Triple const &TT, MCContext &Context,
|
|
|
|
MCAsmBackend &MAB, raw_pwrite_stream &OS,
|
|
|
|
MCCodeEmitter *CE);
|
2015-06-17 11:06:16 +08:00
|
|
|
|
2016-12-17 09:09:05 +08:00
|
|
|
} // end namespace llvm
|
2015-06-17 11:06:16 +08:00
|
|
|
|
2016-12-17 09:09:05 +08:00
|
|
|
#endif // LLVM_LIB_TARGET_HEXAGON_MCTARGETDESC_HEXAGONMCELFSTREAMER_H
|