LLVM  14.0.0git
Public Member Functions | List of all members
llvm::CSKYMCCodeEmitter Class Reference

#include "Target/CSKY/MCTargetDesc/CSKYMCCodeEmitter.h"

Inheritance diagram for llvm::CSKYMCCodeEmitter:
Inheritance graph
[legend]
Collaboration diagram for llvm::CSKYMCCodeEmitter:
Collaboration graph
[legend]

Public Member Functions

 CSKYMCCodeEmitter (MCContext &Ctx, const MCInstrInfo &MII)
 
 ~CSKYMCCodeEmitter ()
 
void encodeInstruction (const MCInst &Inst, raw_ostream &OS, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const override
 EncodeInstruction - Encode the given Inst to bytes on the output stream OS. More...
 
uint64_t getBinaryCodeForInstr (const MCInst &MI, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getMachineOpValue (const MCInst &MI, const MCOperand &MO, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
template<int shift = 0>
unsigned getImmOpValue (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getOImmOpValue (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getImmShiftOpValue (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
MCFixupKind getTargetFixup (const MCExpr *Expr) const
 
template<llvm::CSKY::Fixups FIXUP>
unsigned getBranchSymbolOpValue (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
template<llvm::CSKY::Fixups FIXUP>
unsigned getConstpoolSymbolOpValue (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getCallSymbolOpValue (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getBareSymbolOpValue (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
- Public Member Functions inherited from llvm::MCCodeEmitter
 MCCodeEmitter (const MCCodeEmitter &)=delete
 
MCCodeEmitteroperator= (const MCCodeEmitter &)=delete
 
virtual ~MCCodeEmitter ()
 
virtual void reset ()
 Lifetime management. More...
 
virtual void emitPrefix (const MCInst &Inst, raw_ostream &OS, const MCSubtargetInfo &STI) const
 Emit the prefixes of given instruction on the output stream. More...
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::MCCodeEmitter
 MCCodeEmitter ()
 

Detailed Description

Definition at line 23 of file CSKYMCCodeEmitter.h.

Constructor & Destructor Documentation

◆ CSKYMCCodeEmitter()

llvm::CSKYMCCodeEmitter::CSKYMCCodeEmitter ( MCContext Ctx,
const MCInstrInfo MII 
)
inline

Definition at line 28 of file CSKYMCCodeEmitter.h.

◆ ~CSKYMCCodeEmitter()

llvm::CSKYMCCodeEmitter::~CSKYMCCodeEmitter ( )
inline

Definition at line 31 of file CSKYMCCodeEmitter.h.

Member Function Documentation

◆ encodeInstruction()

void CSKYMCCodeEmitter::encodeInstruction ( const MCInst Inst,
raw_ostream OS,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const
overridevirtual

EncodeInstruction - Encode the given Inst to bytes on the output stream OS.

Implements llvm::MCCodeEmitter.

Definition at line 34 of file CSKYMCCodeEmitter.cpp.

References llvm::MCInstrInfo::get(), getBinaryCodeForInstr(), llvm::MCInstrDesc::getSize(), llvm::support::little, MI, and llvm::Check::Size.

◆ getBareSymbolOpValue()

unsigned llvm::CSKYMCCodeEmitter::getBareSymbolOpValue ( const MCInst MI,
unsigned  Idx,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const
inline

◆ getBinaryCodeForInstr()

uint64_t llvm::CSKYMCCodeEmitter::getBinaryCodeForInstr ( const MCInst MI,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const

Referenced by encodeInstruction().

◆ getBranchSymbolOpValue()

template<llvm::CSKY::Fixups FIXUP>
unsigned llvm::CSKYMCCodeEmitter::getBranchSymbolOpValue ( const MCInst MI,
unsigned  Idx,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const
inline

◆ getCallSymbolOpValue()

unsigned llvm::CSKYMCCodeEmitter::getCallSymbolOpValue ( const MCInst MI,
unsigned  Idx,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const
inline

◆ getConstpoolSymbolOpValue()

template<llvm::CSKY::Fixups FIXUP>
unsigned llvm::CSKYMCCodeEmitter::getConstpoolSymbolOpValue ( const MCInst MI,
unsigned  Idx,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const
inline

◆ getImmOpValue()

template<int shift = 0>
unsigned llvm::CSKYMCCodeEmitter::getImmOpValue ( const MCInst MI,
unsigned  Idx,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const
inline

◆ getImmShiftOpValue()

unsigned llvm::CSKYMCCodeEmitter::getImmShiftOpValue ( const MCInst MI,
unsigned  Idx,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const
inline

Definition at line 60 of file CSKYMCCodeEmitter.h.

References assert(), llvm::MCOperand::getImm(), llvm::MCOperand::isImm(), and MI.

◆ getMachineOpValue()

unsigned CSKYMCCodeEmitter::getMachineOpValue ( const MCInst MI,
const MCOperand MO,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const

◆ getOImmOpValue()

unsigned CSKYMCCodeEmitter::getOImmOpValue ( const MCInst MI,
unsigned  Idx,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const

◆ getTargetFixup()

MCFixupKind CSKYMCCodeEmitter::getTargetFixup ( const MCExpr Expr) const

The documentation for this class was generated from the following files: