|
LLVM 24.0.0git
|
Classes | |
| struct | PCRelEncoding |
Enumerations | |
| enum | EdgeKind_mips : Edge::Kind { Pointer32 = Edge::FirstRelocation , Pointer64 , PagePointer32 , PagePointer64 , Delta32 , Delta64 , NegDelta32 , Abs16 , Hi16 , Lo16 , Higher16 , Highest16 , Jump26 , PC16 , PC32 , PC18S3 , PC19S2 , PC21S2 , PC26S2 , PCHi16 , PCLo16 , GPDispHi16 , GPDispLo16 , GPRel16 , GPRel32 , GPRel64 , GOTOffset16 , GOTOffsetHi16 , GOTOffsetLo16 , GOTPageOffset16 , DTPRelHi16 , DTPRelLo16 , DTPRel32 , DTPRel64 , NegGPRelHi16 , NegGPRelLo16 , RequestGOTAndTransformToOffset16 , RequestGOTPageAndTransformToOffset16 , RequestGOTAndTransformToOffsetHi16 , RequestGOTAndTransformToOffsetLo16 , RequestTLSGDAndTransformToOffset16 , RequestTLSLDMAndTransformToOffset16 } |
| MIPS fixup and table-request edge kinds. More... | |
Functions | |
| LLVM_ABI const char * | getEdgeKindName (Edge::Kind K) |
| LLVM_ABI bool | isR6 (const LinkGraph &G) |
| Returns true if G uses the MIPS release-6 ISA. | |
| LLVM_ABI Edge::Kind | getPointerEdgeKind (const LinkGraph &G) |
| Returns Pointer32 or Pointer64, according to G's pointer ABI. | |
| uint16_t | getLo16 (uint64_t Value) |
| uint16_t | getHi16 (uint64_t Value) |
| uint16_t | getHigher16 (uint64_t Value) |
| uint16_t | getHighest16 (uint64_t Value) |
| uint64_t | getGOTPage (uint64_t Value) |
| PCRelEncoding | getPCRelEncoding (Edge::Kind Kind) |
| bool | needsGP (Edge::Kind K) |
| void | writeMaskedInstruction32 (char *Fixup, uint32_t Mask, uint32_t Value, endianness Endianness) |
| void | writeImmediate16 (char *Fixup, uint16_t Value, endianness Endianness) |
| void | writeImmediate26 (char *Fixup, uint32_t Value, endianness Endianness) |
| Error | applyFixup (LinkGraph &G, Block &B, const Edge &E, const Symbol *GPSymbol, const Symbol *TLSBaseSymbol) |
| Apply fixup expression for edge to block content. | |
| LLVM_ABI ArrayRef< char > | getPointerBlockContent (const LinkGraph &G) |
| Returns zero-filled pointer contents in the graph's pointer width. | |
| LLVM_ABI Symbol & | createAnonymousPointer (LinkGraph &G, Section &PointerSection, Symbol *InitialTarget=nullptr, Edge::AddendT InitialAddend=0) |
| Creates an anonymous pointer, optionally initialized to InitialTarget. | |
| LLVM_ABI Symbol & | createAnonymousPointerJumpStub (LinkGraph &G, Section &StubSection, Symbol &PointerSymbol) |
| Creates a stub that materializes PointerSymbol, loads its value into $t9, and jumps to $t9. | |
Variables | |
| constexpr unsigned | InstructionSize = sizeof(uint32_t) |
| constexpr unsigned | GOTPageBits = 16 |
| constexpr uint64_t | GOTPageSize = UINT64_C(1) << GOTPageBits |
| constexpr uint64_t | GOTPageMask = GOTPageSize - 1 |
| constexpr uint64_t | GOTPageBias = GOTPageSize / 2 |
| constexpr unsigned | JumpRegionBits = 28 |
| constexpr uint64_t | JumpRegionMask = ~maskTrailingOnes<uint64_t>(JumpRegionBits) |
| constexpr uint32_t | InstructionImm16Mask = 0x0000ffffU |
| constexpr uint32_t | InstructionImm26Mask = 0x03ffffffU |
| static const char | NullPointerContent [sizeof(uint64_t)] = {} |
| enum llvm::jitlink::mips::EdgeKind_mips : Edge::Kind |
MIPS fixup and table-request edge kinds.
| Enumerator | |
|---|---|
| Pointer32 | Fixup <- Target + Addend, checked as an unsigned 32-bit pointer. |
| Pointer64 | Fixup <- Target + Addend : uint64. |
| PagePointer32 | Pointer containing the rounded 64-KiB page of Target + Addend. |
| PagePointer64 | |
| Delta32 | Fixup <- Target - Fixup + Addend : int32. |
| Delta64 | Fixup <- Target - Fixup + Addend : int64. |
| NegDelta32 | Fixup <- Fixup - Target + Addend : int32 (used by .eh_frame). |
| Abs16 | Fixup[15:0] <- Target + Addend : int16. |
| Hi16 | Fixup[15:0] <- (Target + Addend + 0x8000) >> 16. |
| Lo16 | Fixup[15:0] <- Target + Addend. |
| Higher16 | Fixup[15:0] <- (Target + Addend + 0x80008000) >> 32. |
| Highest16 | Fixup[15:0] <- (Target + Addend + 0x800080008000) >> 48. |
| Jump26 | J/JAL target. The target must be aligned and in the same 256-MiB region. |
| PC16 | Fixup[15:0] <- (Target - Fixup + Addend) >> 2 : int16. |
| PC32 | Fixup <- Target - Fixup + Addend : int32. |
| PC18S3 | Release-6 compact branch immediate fields. |
| PC19S2 | |
| PC21S2 | |
| PC26S2 | |
| PCHi16 | Paired PC-relative high and low halves. |
| PCLo16 | |
| GPDispHi16 | _gp_disp high/low expressions. The O32 low half uses Fixup - 4 as P. |
| GPDispLo16 | |
| GPRel16 | Fixup <- Target + Addend - _gp. |
| GPRel32 | |
| GPRel64 | |
| GOTOffset16 | Fixup <- address of GOT entry - _gp. |
| GOTOffsetHi16 | |
| GOTOffsetLo16 | |
| GOTPageOffset16 | Low offset complementary to a rounded 64-KiB GOT page entry. |
| DTPRelHi16 | Fixup <- Target + Addend - start-of-ORC-TLS-template. |
| DTPRelLo16 | |
| DTPRel32 | |
| DTPRel64 | |
| NegGPRelHi16 | Compound N32/N64 neg(gp_rel(Target + Addend)) fixups. |
| NegGPRelLo16 | |
| RequestGOTAndTransformToOffset16 | Create an exact-address GOT entry and rewrite to GOTOffset16. |
| RequestGOTPageAndTransformToOffset16 | Create a rounded 64-KiB page GOT entry and rewrite to GOTOffset16. |
| RequestGOTAndTransformToOffsetHi16 | Create an exact-address GOT entry and rewrite to its high/low GP offset. |
| RequestGOTAndTransformToOffsetLo16 | |
| RequestTLSGDAndTransformToOffset16 | Create a two-word general/local-dynamic TLS descriptor. |
| RequestTLSLDMAndTransformToOffset16 | |
|
inline |
Apply fixup expression for edge to block content.
GPSymbol and TLSBaseSymbol supply the bases for GP-relative and DTP-relative edges. They may be null when the edge does not require the respective base.
Definition at line 204 of file mips.h.
References A(), Abs16, llvm::alignDown(), assert(), B(), llvm::jitlink::mips::PCRelEncoding::Bits, Delta32, Delta64, DTPRel32, DTPRel64, DTPRelHi16, DTPRelLo16, E(), Fixup, G, llvm::jitlink::Symbol::getAddress(), getGOTPage(), getHi16(), getHigher16(), getHighest16(), getLo16(), getPCRelEncoding(), llvm::orc::ExecutorAddr::getValue(), GOTOffset16, GOTOffsetHi16, GOTOffsetLo16, GOTPageOffset16, GPDispHi16, GPDispLo16, GPRel16, GPRel32, GPRel64, Hi16, Higher16, Highest16, InstructionSize, llvm::isIntN(), Jump26, JumpRegionMask, Lo16, llvm::make_error(), llvm::jitlink::makeAlignmentError(), llvm::jitlink::makeTargetOutOfRangeError(), llvm::maskTrailingOnes(), needsGP(), NegDelta32, NegGPRelHi16, NegGPRelLo16, P, PagePointer32, PagePointer64, PC16, PC18S3, PC19S2, PC21S2, PC26S2, PC32, llvm::jitlink::mips::PCRelEncoding::PCAlignment, PCHi16, PCLo16, Pointer32, Pointer64, llvm::jitlink::mips::PCRelEncoding::Shift, llvm::Error::success(), uint64_t, llvm::support::endian::write16(), llvm::support::endian::write32(), llvm::support::endian::write64(), writeImmediate16(), writeImmediate26(), and writeMaskedInstruction32().
| Symbol & llvm::jitlink::mips::createAnonymousPointer | ( | LinkGraph & | G, |
| Section & | PointerSection, | ||
| Symbol * | InitialTarget = nullptr, | ||
| Edge::AddendT | InitialAddend = 0 ) |
Creates an anonymous pointer, optionally initialized to InitialTarget.
Definition at line 173 of file mips.cpp.
References B(), G, getPointerBlockContent(), and getPointerEdgeKind().
Referenced by llvm::jitlink::getAnonymousPointerCreator().
| Symbol & llvm::jitlink::mips::createAnonymousPointerJumpStub | ( | LinkGraph & | G, |
| Section & | StubSection, | ||
| Symbol & | PointerSymbol ) |
Creates a stub that materializes PointerSymbol, loads its value into $t9, and jumps to $t9.
Release-6 graphs use the release-6 indirect-jump encoding.
Definition at line 183 of file mips.cpp.
References B(), llvm::enumerate(), F, G, InstructionSize, isR6(), and llvm::support::endian::write32().
Referenced by llvm::jitlink::getPointerJumpStubCreator().
Definition at line 104 of file mips.cpp.
References Abs16, Delta32, Delta64, DTPRel32, DTPRel64, DTPRelHi16, DTPRelLo16, llvm::jitlink::getGenericEdgeKindName(), GOTOffset16, GOTOffsetHi16, GOTOffsetLo16, GOTPageOffset16, GPDispHi16, GPDispLo16, GPRel16, GPRel32, GPRel64, Hi16, Higher16, Highest16, Jump26, KIND_NAME, Lo16, NegDelta32, NegGPRelHi16, NegGPRelLo16, PagePointer32, PagePointer64, PC16, PC18S3, PC19S2, PC21S2, PC26S2, PC32, PCHi16, PCLo16, Pointer32, Pointer64, RequestGOTAndTransformToOffset16, RequestGOTAndTransformToOffsetHi16, RequestGOTAndTransformToOffsetLo16, RequestGOTPageAndTransformToOffset16, RequestTLSGDAndTransformToOffset16, and RequestTLSLDMAndTransformToOffset16.
Definition at line 136 of file mips.h.
References GOTPageBias, GOTPageMask, and uint64_t.
Referenced by applyFixup().
Definition at line 121 of file mips.h.
References GOTPageBias, and uint64_t.
Referenced by applyFixup().
Definition at line 125 of file mips.h.
References GOTPageBias, and uint64_t.
Referenced by applyFixup().
Definition at line 130 of file mips.h.
References GOTPageBias, and uint64_t.
Referenced by applyFixup().
|
inline |
Definition at line 146 of file mips.h.
References llvm_unreachable, PC16, PC18S3, PC19S2, PC21S2, and PC26S2.
Referenced by applyFixup().
Returns zero-filled pointer contents in the graph's pointer width.
Definition at line 169 of file mips.cpp.
References G, and NullPointerContent.
Referenced by createAnonymousPointer().
Returns true if G uses the MIPS release-6 ISA.
Definition at line 159 of file mips.cpp.
References G, and llvm::is_contained().
Referenced by createAnonymousPointerJumpStub().
|
inline |
Definition at line 163 of file mips.h.
References GOTOffset16, GOTOffsetHi16, GOTOffsetLo16, GPDispHi16, GPDispLo16, GPRel16, GPRel32, GPRel64, NegGPRelHi16, and NegGPRelLo16.
Referenced by applyFixup().
|
inline |
Definition at line 191 of file mips.h.
References Fixup, InstructionImm16Mask, and writeMaskedInstruction32().
Referenced by applyFixup().
|
inline |
Definition at line 196 of file mips.h.
References Fixup, InstructionImm26Mask, and writeMaskedInstruction32().
Referenced by applyFixup().
|
inline |
Definition at line 184 of file mips.h.
References Fixup, llvm::support::endian::read32(), and llvm::support::endian::write32().
Referenced by applyFixup(), writeImmediate16(), and writeImmediate26().
|
constexpr |
Definition at line 115 of file mips.h.
Referenced by getGOTPage(), getHi16(), getHigher16(), and getHighest16().
|
constexpr |
Definition at line 114 of file mips.h.
Referenced by getGOTPage().
|
constexpr |
|
constexpr |
Definition at line 181 of file mips.h.
Referenced by writeImmediate16().
|
constexpr |
Definition at line 182 of file mips.h.
Referenced by writeImmediate26().
Definition at line 111 of file mips.h.
Referenced by applyFixup(), and createAnonymousPointerJumpStub().
|
constexpr |
Definition at line 117 of file mips.h.
Referenced by applyFixup().