LLVM 20.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]

Public Member Functions

 CSKYMCCodeEmitter (MCContext &Ctx, const MCInstrInfo &MII)
 
 ~CSKYMCCodeEmitter ()
 
void encodeInstruction (const MCInst &Inst, SmallVectorImpl< char > &CB, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const override
 Encode the given Inst to bytes and append to CB.
 
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 getRegSeqImmOpValue (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getRegisterSeqOpValue (const MCInst &MI, unsigned Op, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getOImmOpValue (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getImmOpValueIDLY (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getImmJMPIX (const MCInst &MI, unsigned Idx, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
unsigned getImmOpValueMSBSize (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
 
template<llvm::CSKY::Fixups FIXUP>
unsigned getDataSymbolOpValue (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
 
void expandJBTF (const MCInst &MI, SmallVectorImpl< char > &CB, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
void expandNEG (const MCInst &MI, SmallVectorImpl< char > &CB, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
 
void expandRSUBI (const MCInst &MI, SmallVectorImpl< char > &CB, 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.
 
virtual void encodeInstruction (const MCInst &Inst, SmallVectorImpl< char > &CB, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const =0
 Encode the given Inst to bytes and append to CB.
 

Additional Inherited Members

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

Detailed Description

Definition at line 25 of file CSKYMCCodeEmitter.h.

Constructor & Destructor Documentation

◆ CSKYMCCodeEmitter()

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

Definition at line 30 of file CSKYMCCodeEmitter.h.

◆ ~CSKYMCCodeEmitter()

llvm::CSKYMCCodeEmitter::~CSKYMCCodeEmitter ( )
inline

Definition at line 33 of file CSKYMCCodeEmitter.h.

Member Function Documentation

◆ encodeInstruction()

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

◆ expandJBTF()

void CSKYMCCodeEmitter::expandJBTF ( const MCInst MI,
SmallVectorImpl< char > &  CB,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const

◆ expandNEG()

void CSKYMCCodeEmitter::expandNEG ( const MCInst MI,
SmallVectorImpl< char > &  CB,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const

◆ expandRSUBI()

void CSKYMCCodeEmitter::expandRSUBI ( const MCInst MI,
SmallVectorImpl< char > &  CB,
SmallVectorImpl< MCFixup > &  Fixups,
const MCSubtargetInfo STI 
) const

◆ 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

◆ 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

◆ getDataSymbolOpValue()

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

◆ getImmJMPIX()

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

Definition at line 278 of file CSKYMCCodeEmitter.cpp.

References assert(), Idx, and MI.

◆ getImmOpValue()

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

◆ getImmOpValueIDLY()

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

◆ getImmOpValueMSBSize()

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

◆ getImmShiftOpValue()

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

Definition at line 88 of file CSKYMCCodeEmitter.h.

References assert(), llvm::MCOperand::getImm(), Idx, 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

◆ getRegisterSeqOpValue()

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

◆ getRegSeqImmOpValue()

unsigned CSKYMCCodeEmitter::getRegSeqImmOpValue ( 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: