LLVM 20.0.0git
|
#include "Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.h"
Additional Inherited Members | |
Protected Member Functions inherited from llvm::MCCodeEmitter | |
MCCodeEmitter () | |
Definition at line 25 of file PPCMCCodeEmitter.h.
|
inline |
Definition at line 31 of file PPCMCCodeEmitter.h.
|
delete |
|
overridedefault |
|
overridevirtual |
Encode the given Inst
to bytes and append to CB
.
Implements llvm::MCCodeEmitter.
Definition at line 501 of file PPCMCCodeEmitter.cpp.
References llvm::big, getBinaryCodeForInstr(), getInstSizeInBytes(), llvm::little, llvm_unreachable, MI, and Size.
unsigned PPCMCCodeEmitter::get_crbitm_encoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 455 of file PPCMCCodeEmitter.cpp.
References assert(), llvm::MCRegisterInfo::getEncodingValue(), llvm::MCOperand::getReg(), llvm::MCContext::getRegisterInfo(), and MI.
unsigned PPCMCCodeEmitter::getAbsCondBrEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 177 of file PPCMCCodeEmitter.cpp.
References llvm::MCFixup::create(), llvm::PPC::fixup_ppc_brcond14abs, llvm::MCOperand::getExpr(), getMachineOpValue(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), and MI.
unsigned PPCMCCodeEmitter::getAbsDirectBrEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 164 of file PPCMCCodeEmitter.cpp.
References llvm::MCFixup::create(), llvm::PPC::fixup_ppc_br24abs, llvm::MCOperand::getExpr(), getMachineOpValue(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), and MI.
uint64_t llvm::PPCMCCodeEmitter::getBinaryCodeForInstr | ( | const MCInst & | MI, |
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Referenced by encodeInstruction().
unsigned PPCMCCodeEmitter::getCondBrEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 152 of file PPCMCCodeEmitter.cpp.
References llvm::MCFixup::create(), llvm::PPC::fixup_ppc_brcond14, llvm::MCOperand::getExpr(), getMachineOpValue(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), and MI.
unsigned PPCMCCodeEmitter::getDirectBrEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 41 of file PPCMCCodeEmitter.cpp.
References llvm::MCFixup::create(), llvm::PPC::fixup_ppc_br24, llvm::PPC::fixup_ppc_br24_notoc, llvm::MCOperand::getExpr(), getMachineOpValue(), llvm::MCOperand::isImm(), isNoTOCCallInstr(), llvm::MCOperand::isReg(), and MI.
Referenced by getTLSCallEncoding().
uint64_t PPCMCCodeEmitter::getDispRI34Encoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 385 of file PPCMCCodeEmitter.cpp.
References getMachineOpValue(), and MI.
uint64_t PPCMCCodeEmitter::getDispRI34PCRelEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 302 of file PPCMCCodeEmitter.cpp.
References llvm::MCBinaryExpr::Add, assert(), llvm::MCExpr::Binary, llvm::MCExpr::Constant, llvm::MCFixup::create(), llvm::PPC::fixup_ppc_pcrel34, llvm::MCOperand::getExpr(), llvm::MCExpr::getKind(), llvm::MCSymbolRefExpr::getKind(), llvm::MCBinaryExpr::getLHS(), getMachineOpValue(), llvm::MCBinaryExpr::getOpcode(), llvm::MCBinaryExpr::getRHS(), llvm::MCOperand::isExpr(), LHS, llvm_unreachable, MI, RHS, std::swap(), llvm::MCExpr::SymbolRef, llvm::MCSymbolRefExpr::VK_PCREL, llvm::MCSymbolRefExpr::VK_PPC_GOT_PCREL, llvm::MCSymbolRefExpr::VK_PPC_GOT_TLSGD_PCREL, llvm::MCSymbolRefExpr::VK_PPC_GOT_TLSLD_PCREL, and llvm::MCSymbolRefExpr::VK_PPC_GOT_TPREL_PCREL.
unsigned PPCMCCodeEmitter::getDispRIEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 242 of file PPCMCCodeEmitter.cpp.
References llvm::MCFixup::create(), llvm::PPC::fixup_ppc_half16, llvm::MCOperand::getExpr(), getMachineOpValue(), llvm::MCOperand::isImm(), and MI.
unsigned PPCMCCodeEmitter::getDispRIHashEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 287 of file PPCMCCodeEmitter.cpp.
References assert(), llvm::MCOperand::getImm(), llvm::MCOperand::isImm(), and MI.
unsigned PPCMCCodeEmitter::getDispRIX16Encoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 270 of file PPCMCCodeEmitter.cpp.
References assert(), llvm::MCFixup::create(), llvm::PPC::fixup_ppc_half16dq, llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), getMachineOpValue(), llvm::MCOperand::isImm(), and MI.
unsigned PPCMCCodeEmitter::getDispRIXEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 256 of file PPCMCCodeEmitter.cpp.
References llvm::MCFixup::create(), llvm::PPC::fixup_ppc_half16ds, llvm::MCOperand::getExpr(), getMachineOpValue(), llvm::MCOperand::isImm(), and MI.
unsigned PPCMCCodeEmitter::getDispSPE2Encoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 414 of file PPCMCCodeEmitter.cpp.
References assert(), getMachineOpValue(), llvm::MCOperand::isImm(), and MI.
unsigned PPCMCCodeEmitter::getDispSPE4Encoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 404 of file PPCMCCodeEmitter.cpp.
References assert(), getMachineOpValue(), llvm::MCOperand::isImm(), and MI.
unsigned PPCMCCodeEmitter::getDispSPE8Encoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 394 of file PPCMCCodeEmitter.cpp.
References assert(), getMachineOpValue(), llvm::MCOperand::isImm(), and MI.
unsigned PPCMCCodeEmitter::getImm16Encoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 200 of file PPCMCCodeEmitter.cpp.
References llvm::MCFixup::create(), llvm::PPC::fixup_ppc_half16, llvm::MCOperand::getExpr(), getMachineOpValue(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), and MI.
uint64_t PPCMCCodeEmitter::getImm34Encoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI, | ||
MCFixupKind | Fixup | ||
) | const |
Definition at line 212 of file PPCMCCodeEmitter.cpp.
References assert(), llvm::MCFixup::create(), Fixup, llvm::MCOperand::getExpr(), getMachineOpValue(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), and MI.
Referenced by getImm34EncodingNoPCRel(), and getImm34EncodingPCRel().
uint64_t PPCMCCodeEmitter::getImm34EncodingNoPCRel | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 227 of file PPCMCCodeEmitter.cpp.
References llvm::PPC::fixup_ppc_imm34, getImm34Encoding(), and MI.
uint64_t PPCMCCodeEmitter::getImm34EncodingPCRel | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 235 of file PPCMCCodeEmitter.cpp.
References llvm::PPC::fixup_ppc_pcrel34, getImm34Encoding(), and MI.
Definition at line 531 of file PPCMCCodeEmitter.cpp.
References llvm::MCInstrInfo::get(), and MI.
Referenced by encodeInstruction().
uint64_t PPCMCCodeEmitter::getMachineOpValue | ( | const MCInst & | MI, |
const MCOperand & | MO, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
getMachineOpValue - Return binary encoding of operand.
If the machine operand requires relocation, record the relocation and return zero.
Definition at line 480 of file PPCMCCodeEmitter.cpp.
References assert(), llvm::MCInstrInfo::get(), llvm::MCRegisterInfo::getEncodingValue(), llvm::MCOperand::getImm(), getOpIdxForMO(), llvm::MCOperand::getReg(), llvm::MCContext::getRegisterInfo(), llvm::PPC::getRegNumForOperand(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), and MI.
Referenced by getAbsCondBrEncoding(), getAbsDirectBrEncoding(), getCondBrEncoding(), getDirectBrEncoding(), getDispRI34Encoding(), getDispRI34PCRelEncoding(), getDispRIEncoding(), getDispRIX16Encoding(), getDispRIXEncoding(), getDispSPE2Encoding(), getDispSPE4Encoding(), getDispSPE8Encoding(), getImm16Encoding(), getImm34Encoding(), getTLSRegEncoding(), and getVSRpEvenEncoding().
unsigned PPCMCCodeEmitter::getTLSCallEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 443 of file PPCMCCodeEmitter.cpp.
References llvm::MCFixup::create(), llvm::PPC::fixup_ppc_nofixup, getDirectBrEncoding(), llvm::MCOperand::getExpr(), and MI.
unsigned PPCMCCodeEmitter::getTLSRegEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 423 of file PPCMCCodeEmitter.cpp.
References llvm::MCFixup::create(), llvm::PPC::fixup_ppc_nofixup, llvm::MCRegisterInfo::getEncodingValue(), llvm::MCOperand::getExpr(), llvm::MCSymbolRefExpr::getKind(), getMachineOpValue(), llvm::MCContext::getRegisterInfo(), llvm::MCSubtargetInfo::getTargetTriple(), llvm::MCOperand::isReg(), MI, and llvm::MCSymbolRefExpr::VK_PPC_TLS_PCREL.
unsigned PPCMCCodeEmitter::getVSRpEvenEncoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 191 of file PPCMCCodeEmitter.cpp.
References assert(), getMachineOpValue(), and MI.
Check if Opcode corresponds to a call instruction that should be marked with the NOTOC relocation.
Definition at line 60 of file PPCMCCodeEmitter.cpp.
References llvm::MCInstrInfo::get(), llvm::MCInstrDesc::isCall(), llvm_unreachable, and MI.
Referenced by getDirectBrEncoding().
Definition at line 537 of file PPCMCCodeEmitter.cpp.
References llvm::MCInstrInfo::get(), MI, llvm::PPCII::Prefixed, and llvm::MCInstrDesc::TSFlags.
|
delete |