LLVM 20.0.0git
|
#include "Target/CSKY/MCTargetDesc/CSKYMCCodeEmitter.h"
Additional Inherited Members | |
Protected Member Functions inherited from llvm::MCCodeEmitter | |
MCCodeEmitter () | |
Definition at line 25 of file CSKYMCCodeEmitter.h.
|
inline |
Definition at line 30 of file CSKYMCCodeEmitter.h.
|
inline |
Definition at line 33 of file CSKYMCCodeEmitter.h.
|
overridevirtual |
Encode the given Inst
to bytes and append to CB
.
Implements llvm::MCCodeEmitter.
Definition at line 138 of file CSKYMCCodeEmitter.cpp.
References llvm::MCInstBuilder::addImm(), llvm::MCInstBuilder::addOperand(), expandJBTF(), expandNEG(), expandRSUBI(), llvm::MCInstrInfo::get(), getBinaryCodeForInstr(), MI, Size, and writeData().
void CSKYMCCodeEmitter::expandJBTF | ( | const MCInst & | MI, |
SmallVectorImpl< char > & | CB, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 68 of file CSKYMCCodeEmitter.cpp.
References llvm::MCInstBuilder::addImm(), llvm::MCInstBuilder::addOperand(), getBinaryCodeForInstr(), llvm::MCSubtargetInfo::hasFeature(), MI, and writeData().
Referenced by encodeInstruction().
void CSKYMCCodeEmitter::expandNEG | ( | const MCInst & | MI, |
SmallVectorImpl< char > & | CB, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 94 of file CSKYMCCodeEmitter.cpp.
References llvm::MCInstBuilder::addImm(), llvm::MCInstBuilder::addOperand(), getBinaryCodeForInstr(), MI, Size, and writeData().
Referenced by encodeInstruction().
void CSKYMCCodeEmitter::expandRSUBI | ( | const MCInst & | MI, |
SmallVectorImpl< char > & | CB, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 116 of file CSKYMCCodeEmitter.cpp.
References llvm::MCInstBuilder::addImm(), llvm::MCInstBuilder::addOperand(), getBinaryCodeForInstr(), MI, Size, and writeData().
Referenced by encodeInstruction().
|
inline |
Definition at line 161 of file CSKYMCCodeEmitter.h.
References assert(), llvm::MCFixup::create(), llvm::CSKY::fixup_csky_pcrel_imm18_scale2, llvm::MCOperand::getExpr(), llvm::MCExpr::getKind(), getTargetFixup(), Idx, llvm::MCOperand::isExpr(), MI, and llvm::MCExpr::Target.
uint64_t llvm::CSKYMCCodeEmitter::getBinaryCodeForInstr | ( | const MCInst & | MI, |
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Referenced by encodeInstruction(), expandJBTF(), expandNEG(), and expandRSUBI().
|
inline |
Definition at line 99 of file CSKYMCCodeEmitter.h.
References assert(), llvm::MCFixup::create(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCExpr::getKind(), getTargetFixup(), Idx, llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), MI, and llvm::MCExpr::Target.
|
inline |
Definition at line 147 of file CSKYMCCodeEmitter.h.
References assert(), llvm::MCFixup::create(), llvm::CSKY::fixup_csky_pcrel_imm26_scale2, llvm::MCOperand::getExpr(), llvm::MCExpr::getKind(), getTargetFixup(), Idx, llvm::MCOperand::isExpr(), MI, and llvm::MCExpr::Target.
|
inline |
Definition at line 118 of file CSKYMCCodeEmitter.h.
References assert(), llvm::MCFixup::create(), llvm::MCOperand::getExpr(), llvm::MCExpr::getKind(), getTargetFixup(), Idx, llvm::MCOperand::isExpr(), MI, and llvm::MCExpr::Target.
|
inline |
Definition at line 133 of file CSKYMCCodeEmitter.h.
References assert(), llvm::MCFixup::create(), llvm::MCOperand::getExpr(), llvm::MCExpr::getKind(), getTargetFixup(), Idx, llvm::MCOperand::isExpr(), MI, and llvm::MCExpr::Target.
unsigned CSKYMCCodeEmitter::getImmJMPIX | ( | const MCInst & | MI, |
unsigned | Idx, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 278 of file CSKYMCCodeEmitter.cpp.
|
inline |
Definition at line 50 of file CSKYMCCodeEmitter.h.
References assert(), llvm::MCFixup::create(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), getTargetFixup(), Idx, llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), and MI.
unsigned CSKYMCCodeEmitter::getImmOpValueIDLY | ( | const MCInst & | MI, |
unsigned | Idx, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 39 of file CSKYMCCodeEmitter.cpp.
References assert(), llvm::MCOperand::getImm(), Idx, llvm::MCOperand::isImm(), and MI.
unsigned CSKYMCCodeEmitter::getImmOpValueMSBSize | ( | const MCInst & | MI, |
unsigned | Idx, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 50 of file CSKYMCCodeEmitter.cpp.
References assert(), llvm::MCOperand::getImm(), Idx, llvm::MCOperand::isImm(), and MI.
|
inline |
Definition at line 88 of file CSKYMCCodeEmitter.h.
References assert(), llvm::MCOperand::getImm(), Idx, llvm::MCOperand::isImm(), and MI.
unsigned CSKYMCCodeEmitter::getMachineOpValue | ( | const MCInst & | MI, |
const MCOperand & | MO, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 235 of file CSKYMCCodeEmitter.cpp.
References llvm::MCRegisterInfo::getEncodingValue(), llvm::MCOperand::getImm(), llvm::MCOperand::getReg(), llvm::MCContext::getRegisterInfo(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), and llvm_unreachable.
unsigned CSKYMCCodeEmitter::getOImmOpValue | ( | const MCInst & | MI, |
unsigned | Idx, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 30 of file CSKYMCCodeEmitter.cpp.
References assert(), llvm::MCOperand::getImm(), Idx, llvm::MCOperand::isImm(), and MI.
unsigned CSKYMCCodeEmitter::getRegisterSeqOpValue | ( | const MCInst & | MI, |
unsigned | Op, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 265 of file CSKYMCCodeEmitter.cpp.
References llvm::MCRegisterInfo::getEncodingValue(), llvm::MCContext::getRegisterInfo(), and MI.
unsigned CSKYMCCodeEmitter::getRegSeqImmOpValue | ( | const MCInst & | MI, |
unsigned | Idx, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 249 of file CSKYMCCodeEmitter.cpp.
References assert(), llvm::MCRegisterInfo::getEncodingValue(), llvm::MCContext::getRegisterInfo(), Idx, and MI.
MCFixupKind CSKYMCCodeEmitter::getTargetFixup | ( | const MCExpr * | Expr | ) | const |
Definition at line 293 of file CSKYMCCodeEmitter.cpp.
References llvm::CSKY::fixup_csky_addr32, llvm::CSKY::fixup_csky_addr_hi16, llvm::CSKY::fixup_csky_addr_lo16, llvm::CSKY::fixup_csky_got32, llvm::CSKY::fixup_csky_got_imm18_scale4, llvm::CSKY::fixup_csky_gotoff, llvm::CSKY::fixup_csky_gotpc, llvm::CSKY::fixup_csky_plt32, llvm::CSKY::fixup_csky_plt_imm18_scale4, llvm::CSKYMCExpr::getKind(), llvm_unreachable, llvm::CSKYMCExpr::VK_CSKY_ADDR, llvm::CSKYMCExpr::VK_CSKY_ADDR_HI16, llvm::CSKYMCExpr::VK_CSKY_ADDR_LO16, llvm::CSKYMCExpr::VK_CSKY_GOT, llvm::CSKYMCExpr::VK_CSKY_GOT_IMM18_BY4, llvm::CSKYMCExpr::VK_CSKY_GOTOFF, llvm::CSKYMCExpr::VK_CSKY_GOTPC, llvm::CSKYMCExpr::VK_CSKY_PLT, and llvm::CSKYMCExpr::VK_CSKY_PLT_IMM18_BY4.
Referenced by getBareSymbolOpValue(), getBranchSymbolOpValue(), getCallSymbolOpValue(), getConstpoolSymbolOpValue(), getDataSymbolOpValue(), and getImmOpValue().