class MCFixup
Declaration
class MCFixup { /* full declaration omitted */ };
Description
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).
Declared at: llvm/include/llvm/MC/MCFixup.h:77
Method Overview
- public static llvm::MCFixup create(uint32_t Offset, const llvm::MCExpr * Value, llvm::MCFixupKind Kind, llvm::SMLoc Loc = llvm::SMLoc())
- public static llvm::MCFixup createAddFor(const llvm::MCFixup & Fixup)
- public static llvm::MCFixup createSubFor(const llvm::MCFixup & Fixup)
- public static llvm::MCFixupKind getAddKindForKind(llvm::MCFixupKind Kind)
- public llvm::MCFixupKind getKind() const
- public static llvm::MCFixupKind getKindForSize(unsigned int Size, bool IsPCRel)
- public static llvm::MCFixupKind getKindForSizeInBits(unsigned int Size, bool IsPCRel)
- public llvm::SMLoc getLoc() const
- public uint32_t getOffset() const
- public static llvm::MCFixupKind getSubKindForKind(llvm::MCFixupKind Kind)
- public unsigned int getTargetKind() const
- public const llvm::MCExpr * getValue() const
- public void setOffset(uint32_t Value)
Methods
¶static llvm::MCFixup create(
uint32_t Offset,
const llvm::MCExpr* Value,
llvm::MCFixupKind Kind,
llvm::SMLoc Loc = llvm::SMLoc())
static llvm::MCFixup create(
uint32_t Offset,
const llvm::MCExpr* Value,
llvm::MCFixupKind Kind,
llvm::SMLoc Loc = llvm::SMLoc())
Declared at: llvm/include/llvm/MC/MCFixup.h:93
Parameters
- uint32_t Offset
- const llvm::MCExpr* Value
- llvm::MCFixupKind Kind
- llvm::SMLoc Loc = llvm::SMLoc()
¶static llvm::MCFixup createAddFor(
const llvm::MCFixup& Fixup)
static llvm::MCFixup createAddFor(
const llvm::MCFixup& Fixup)
Description
Return a fixup corresponding to the add half of a add/sub fixup pair for the given Fixup.
Declared at: llvm/include/llvm/MC/MCFixup.h:106
Parameters
- const llvm::MCFixup& Fixup
¶static llvm::MCFixup createSubFor(
const llvm::MCFixup& Fixup)
static llvm::MCFixup createSubFor(
const llvm::MCFixup& Fixup)
Description
Return a fixup corresponding to the sub half of a add/sub fixup pair for the given Fixup.
Declared at: llvm/include/llvm/MC/MCFixup.h:117
Parameters
- const llvm::MCFixup& Fixup
¶static llvm::MCFixupKind getAddKindForKind(
llvm::MCFixupKind Kind)
static llvm::MCFixupKind getAddKindForKind(
llvm::MCFixupKind Kind)
Description
Return the generic fixup kind for an addition with a given size. It is an error to pass an unsupported size.
Declared at: llvm/include/llvm/MC/MCFixup.h:173
Parameters
- llvm::MCFixupKind Kind
¶llvm::MCFixupKind getKind() const
llvm::MCFixupKind getKind() const
Declared at: llvm/include/llvm/MC/MCFixup.h:126
¶static llvm::MCFixupKind getKindForSize(
unsigned int Size,
bool IsPCRel)
static llvm::MCFixupKind getKindForSize(
unsigned int Size,
bool IsPCRel)
Description
Return the generic fixup kind for a value with the given size. It is an error to pass an unsupported size.
Declared at: llvm/include/llvm/MC/MCFixup.h:137
Parameters
- unsigned int Size
- bool IsPCRel
¶static llvm::MCFixupKind getKindForSizeInBits(
unsigned int Size,
bool IsPCRel)
static llvm::MCFixupKind getKindForSizeInBits(
unsigned int Size,
bool IsPCRel)
Description
Return the generic fixup kind for a value with the given size in bits. It is an error to pass an unsupported size.
Declared at: llvm/include/llvm/MC/MCFixup.h:153
Parameters
- unsigned int Size
- bool IsPCRel
¶llvm::SMLoc getLoc() const
llvm::SMLoc getLoc() const
Declared at: llvm/include/llvm/MC/MCFixup.h:197
¶uint32_t getOffset() const
uint32_t getOffset() const
Declared at: llvm/include/llvm/MC/MCFixup.h:130
¶static llvm::MCFixupKind getSubKindForKind(
llvm::MCFixupKind Kind)
static llvm::MCFixupKind getSubKindForKind(
llvm::MCFixupKind Kind)
Description
Return the generic fixup kind for an subtraction with a given size. It is an error to pass an unsupported size.
Declared at: llvm/include/llvm/MC/MCFixup.h:186
Parameters
- llvm::MCFixupKind Kind
¶unsigned int getTargetKind() const
unsigned int getTargetKind() const
Declared at: llvm/include/llvm/MC/MCFixup.h:128
¶const llvm::MCExpr* getValue() const
const llvm::MCExpr* getValue() const
Declared at: llvm/include/llvm/MC/MCFixup.h:133
¶void setOffset(uint32_t Value)
void setOffset(uint32_t Value)
Declared at: llvm/include/llvm/MC/MCFixup.h:131
Parameters
- uint32_t Value