LLVM 17.0.0git
|
#include "Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.h"
Additional Inherited Members | |
![]() | |
MCCodeEmitter () | |
Definition at line 25 of file PPCMCCodeEmitter.h.
|
inline |
Definition at line 31 of file PPCMCCodeEmitter.h.
|
delete |
|
overridedefault |
|
overridevirtual |
EncodeInstruction - Encode the given Inst
to bytes on the output stream OS
.
Implements llvm::MCCodeEmitter.
Definition at line 410 of file PPCMCCodeEmitter.cpp.
References llvm::support::big, E, getBinaryCodeForInstr(), getInstSizeInBytes(), llvm::support::little, llvm_unreachable, MI, OS, and Size.
unsigned PPCMCCodeEmitter::get_crbitm_encoding | ( | const MCInst & | MI, |
unsigned | OpNo, | ||
SmallVectorImpl< MCFixup > & | Fixups, | ||
const MCSubtargetInfo & | STI | ||
) | const |
Definition at line 363 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 85 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 72 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 60 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(), InstrInfo, llvm::MCOperand::isImm(), 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 293 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 210 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 150 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 195 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 178 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 164 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 322 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 312 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 302 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 108 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 120 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 135 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 143 of file PPCMCCodeEmitter.cpp.
References llvm::PPC::fixup_ppc_pcrel34, getImm34Encoding(), and MI.
Definition at line 438 of file PPCMCCodeEmitter.cpp.
References llvm::MCInstrInfo::get(), llvm::MCInstrDesc::getSize(), 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 388 of file PPCMCCodeEmitter.cpp.
References assert(), llvm::MCInstrInfo::get(), llvm::MCRegisterInfo::getEncodingValue(), llvm::MCOperand::getImm(), getOpIdxForMO(), llvm::MCOperand::getReg(), llvm::MCContext::getRegisterInfo(), llvm::PPCInstrInfo::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 351 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 331 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 99 of file PPCMCCodeEmitter.cpp.
References assert(), getMachineOpValue(), and MI.
Definition at line 444 of file PPCMCCodeEmitter.cpp.
|
delete |