LLVM API Documentation
#include <MipsAsmBackend.h>
Public Member Functions | |
MipsAsmBackend (const Target &T, Triple::OSType _OSType, bool _isLittle, bool _is64Bit) | |
MCObjectWriter * | createObjectWriter (raw_ostream &OS) const override |
void | applyFixup (const MCFixup &Fixup, char *Data, unsigned DataSize, uint64_t Value, bool IsPCRel) const override |
const MCFixupKindInfo & | getFixupKindInfo (MCFixupKind Kind) const override |
getFixupKindInfo - Get information on a fixup kind. | |
unsigned | getNumFixupKinds () const override |
getNumFixupKinds - Get the number of target specific fixup kinds. | |
bool | writeNopData (uint64_t Count, MCObjectWriter *OW) const override |
void | processFixupValue (const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFixup &Fixup, const MCFragment *DF, const MCValue &Target, uint64_t &Value, bool &IsResolved) override |
Target Relaxation Interfaces | |
bool | mayNeedRelaxation (const MCInst &Inst) const override |
bool | fixupNeedsRelaxation (const MCFixup &Fixup, uint64_t Value, const MCRelaxableFragment *DF, const MCAsmLayout &Layout) const override |
void | relaxInstruction (const MCInst &Inst, MCInst &Res) const override |
Definition at line 29 of file MipsAsmBackend.h.
llvm::MipsAsmBackend::MipsAsmBackend | ( | const Target & | T, |
Triple::OSType | _OSType, | ||
bool | _isLittle, | ||
bool | _is64Bit | ||
) | [inline] |
Definition at line 35 of file MipsAsmBackend.h.
void MipsAsmBackend::applyFixup | ( | const MCFixup & | Fixup, |
char * | Data, | ||
unsigned | DataSize, | ||
uint64_t | Value, | ||
bool | IsPCRel | ||
) | const [override, virtual] |
ApplyFixup - Apply the Value
for given Fixup
into the provided data fragment, at the offset specified by the fixup and following the fixup kind as appropriate.
Implements llvm::MCAsmBackend.
Definition at line 166 of file MipsAsmBackend.cpp.
References adjustFixupValue(), calculateMMLEIndex(), llvm::Mips::fixup_Mips_16, llvm::Mips::fixup_Mips_64, llvm::FK_Data_2, llvm::FK_Data_4, llvm::FK_Data_8, getFixupKindInfo(), llvm::MCFixup::getKind(), llvm::MCFixup::getOffset(), needsMMLEByteOrder(), and llvm::MCFixupKindInfo::TargetSize.
MCObjectWriter * MipsAsmBackend::createObjectWriter | ( | raw_ostream & | OS | ) | const [override, virtual] |
createObjectWriter - Create a new MCObjectWriter instance for use by the assembler backend to emit the final object file.
Implements llvm::MCAsmBackend.
Definition at line 142 of file MipsAsmBackend.cpp.
References llvm::createMipsELFObjectWriter(), and llvm::MCELFObjectTargetWriter::getOSABI().
bool llvm::MipsAsmBackend::fixupNeedsRelaxation | ( | const MCFixup & | Fixup, |
uint64_t | Value, | ||
const MCRelaxableFragment * | DF, | ||
const MCAsmLayout & | Layout | ||
) | const [inline, override, virtual] |
fixupNeedsRelaxation - Target specific predicate for whether a given fixup requires the associated instruction to be relaxed.
Implements llvm::MCAsmBackend.
Definition at line 64 of file MipsAsmBackend.h.
References llvm_unreachable.
const MCFixupKindInfo & MipsAsmBackend::getFixupKindInfo | ( | MCFixupKind | Kind | ) | const [override, virtual] |
getFixupKindInfo - Get information on a fixup kind.
Reimplemented from llvm::MCAsmBackend.
Definition at line 223 of file MipsAsmBackend.cpp.
References llvm::FirstTargetFixupKind, llvm::MCFixupKindInfo::FKF_IsPCRel, getNumFixupKinds(), and llvm::AArch64::NumTargetFixupKinds.
Referenced by applyFixup().
unsigned llvm::MipsAsmBackend::getNumFixupKinds | ( | ) | const [inline, override, virtual] |
getNumFixupKinds - Get the number of target specific fixup kinds.
Implements llvm::MCAsmBackend.
Definition at line 47 of file MipsAsmBackend.h.
References llvm::AArch64::NumTargetFixupKinds.
Referenced by getFixupKindInfo().
bool llvm::MipsAsmBackend::mayNeedRelaxation | ( | const MCInst & | Inst | ) | const [inline, override, virtual] |
MayNeedRelaxation - Check whether the given instruction may need relaxation.
Inst | - The instruction to test. |
Implements llvm::MCAsmBackend.
Definition at line 58 of file MipsAsmBackend.h.
void MipsAsmBackend::processFixupValue | ( | const MCAssembler & | Asm, |
const MCAsmLayout & | Layout, | ||
const MCFixup & | Fixup, | ||
const MCFragment * | DF, | ||
const MCValue & | Target, | ||
uint64_t & | Value, | ||
bool & | IsResolved | ||
) | [override, virtual] |
processFixupValue - Target hook to process the literal value of a fixup if necessary.
Reimplemented from llvm::MCAsmBackend.
Definition at line 380 of file MipsAsmBackend.cpp.
References adjustFixupValue(), and llvm::MCAssembler::getContext().
void llvm::MipsAsmBackend::relaxInstruction | ( | const MCInst & | Inst, |
MCInst & | Res | ||
) | const [inline, override, virtual] |
RelaxInstruction - Relax the instruction in the given fragment to the next wider instruction.
Inst | - The instruction to relax, which may be the same as the output. | |
[out] | Res | On return, the relaxed instruction. |
Implements llvm::MCAsmBackend.
Definition at line 78 of file MipsAsmBackend.h.
bool MipsAsmBackend::writeNopData | ( | uint64_t | Count, |
MCObjectWriter * | OW | ||
) | const [override, virtual] |
WriteNopData - Write an (optimal) nop sequence of Count bytes to the given output. If the target cannot generate such a sequence, it should return an error.
Implements llvm::MCAsmBackend.
Definition at line 366 of file MipsAsmBackend.cpp.
References llvm::MCObjectWriter::Write32().