LLVM API Documentation
#include <MCFixup.h>
Public Member Functions | |
MCFixupKind | getKind () const |
uint32_t | getOffset () const |
void | setOffset (uint32_t Value) |
const MCExpr * | getValue () const |
SMLoc | getLoc () const |
Static Public Member Functions | |
static MCFixup | Create (uint32_t Offset, const MCExpr *Value, MCFixupKind Kind, SMLoc Loc=SMLoc()) |
static MCFixupKind | getKindForSize (unsigned Size, bool isPCRel) |
MCFixup - Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction) which requires assemble- or run- time patching.
Fixups are used any time the target instruction encoder needs to represent some value in an instruction which is not yet concrete. The encoder will encode the instruction assuming the value is 0, and emit a fixup which communicates to the assembler backend how it should rewrite the encoded value.
During the process of relaxation, the assembler will apply fixups as symbolic values become concrete. When relaxation is complete, any remaining fixups become relocations in the object file (or errors, if the fixup cannot be encoded on the target).
static MCFixup llvm::MCFixup::Create | ( | uint32_t | Offset, |
const MCExpr * | Value, | ||
MCFixupKind | Kind, | ||
SMLoc | Loc = SMLoc() |
||
) | [inline, static] |
Definition at line 78 of file MCFixup.h.
References llvm::MaxTargetFixupKind.
Referenced by llvm::MCWinCOFFStreamer::EmitCOFFSecRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSectionIndex(), llvm::MCObjectStreamer::EmitGPRel32Value(), llvm::MCObjectStreamer::EmitGPRel64Value(), llvm::MCObjectStreamer::EmitValueImpl(), and getBranchTargetOpValue().
MCFixupKind llvm::MCFixup::getKind | ( | ) | const [inline] |
Definition at line 89 of file MCFixup.h.
Referenced by adjustFixupValue(), llvm::MipsAsmBackend::applyFixup(), llvm::PPCMCExpr::EvaluateAsRelocatableImpl(), getFixupOffset(), and llvm::operator<<().
static MCFixupKind llvm::MCFixup::getKindForSize | ( | unsigned | Size, |
bool | isPCRel | ||
) | [inline, static] |
getKindForSize - Return the generic fixup kind for a value with the given size. It is an error to pass an unsupported size.
Definition at line 98 of file MCFixup.h.
References llvm::FK_Data_1, llvm::FK_Data_2, llvm::FK_Data_4, llvm::FK_Data_8, llvm::FK_PCRel_1, llvm::FK_PCRel_2, llvm::FK_PCRel_4, llvm::FK_PCRel_8, and llvm_unreachable.
Referenced by llvm::MCObjectStreamer::EmitValueImpl(), and getImmFixupKind().
SMLoc llvm::MCFixup::getLoc | ( | ) | const [inline] |
Definition at line 108 of file MCFixup.h.
Referenced by adjustFixupValue().
uint32_t llvm::MCFixup::getOffset | ( | ) | const [inline] |
Definition at line 91 of file MCFixup.h.
Referenced by llvm::MipsAsmBackend::applyFixup(), getFixupOffset(), and llvm::operator<<().
const MCExpr* llvm::MCFixup::getValue | ( | ) | const [inline] |
Definition at line 94 of file MCFixup.h.
Referenced by adjustFixupValue(), getAccessVariant(), and llvm::operator<<().
void llvm::MCFixup::setOffset | ( | uint32_t | Value | ) | [inline] |