LLVM 22.0.0git
llvm::jitlink::ppc64 Namespace Reference

Classes

struct  PLTCallStubInfo
struct  PLTCallStubReloc
class  PLTTableManager
class  TOCTableManager

Enumerations

enum  EdgeKind_ppc64 : Edge::Kind {
  Pointer64 = Edge::FirstRelocation , Pointer32 , Pointer16 , Pointer16DS ,
  Pointer16HA , Pointer16HI , Pointer16HIGH , Pointer16HIGHA ,
  Pointer16HIGHER , Pointer16HIGHERA , Pointer16HIGHEST , Pointer16HIGHESTA ,
  Pointer16LO , Pointer16LODS , Pointer14 , Delta64 ,
  Delta34 , Delta32 , NegDelta32 , Delta16 ,
  Delta16HA , Delta16HI , Delta16LO , TOC ,
  TOCDelta16 , TOCDelta16DS , TOCDelta16HA , TOCDelta16HI ,
  TOCDelta16LO , TOCDelta16LODS , RequestGOTAndTransformToDelta34 , CallBranchDelta ,
  CallBranchDeltaRestoreTOC , RequestCall , RequestCallNoTOC , RequestTLSDescInGOTAndTransformToTOCDelta16HA ,
  RequestTLSDescInGOTAndTransformToTOCDelta16LO , RequestTLSDescInGOTAndTransformToDelta34
}
 Represents ppc64 fixups and other ppc64-specific edge kinds. More...
enum  PLTCallStubKind { LongBranch , LongBranchSaveR2 , LongBranchNoTOC }

Functions

template<llvm::endianness Endianness>
PLTCallStubInfo pickStub (PLTCallStubKind StubKind)
SymbolcreateAnonymousPointer (LinkGraph &G, Section &PointerSection, Symbol *InitialTarget=nullptr, uint64_t InitialAddend=0)
template<llvm::endianness Endianness>
SymbolcreateAnonymousPointerJumpStub (LinkGraph &G, Section &StubSection, Symbol &PointerSymbol, PLTCallStubKind StubKind)
LLVM_ABI const chargetEdgeKindName (Edge::Kind K)
 Returns a string name for the given ppc64 edge.
static uint16_t ha (uint64_t x)
static uint64_t lo (uint64_t x)
static uint16_t hi (uint64_t x)
static uint64_t high (uint64_t x)
static uint64_t higha (uint64_t x)
static uint64_t higher (uint64_t x)
static uint64_t highera (uint64_t x)
static uint16_t highest (uint64_t x)
static uint16_t highesta (uint64_t x)
template<llvm::endianness Endianness>
static uint64_t readPrefixedInstruction (const char *Loc)
template<llvm::endianness Endianness>
static void writePrefixedInstruction (char *Loc, uint64_t Inst)
template<llvm::endianness Endianness>
Error relocateHalf16 (char *FixupPtr, int64_t Value, Edge::Kind K)
template<llvm::endianness Endianness>
Error applyFixup (LinkGraph &G, Block &B, const Edge &E, const Symbol *TOCSymbol)
 Apply fixup expression for edge to block content.

Variables

LLVM_ABI const char NullPointerContent [8]
LLVM_ABI const char PointerJumpStubContent_big [20]
LLVM_ABI const char PointerJumpStubContent_little [20]
LLVM_ABI const char PointerJumpStubNoTOCContent_big [32]
LLVM_ABI const char PointerJumpStubNoTOCContent_little [32]

Enumeration Type Documentation

◆ EdgeKind_ppc64

Represents ppc64 fixups and other ppc64-specific edge kinds.

Enumerator
Pointer64 
Pointer32 
Pointer16 
Pointer16DS 
Pointer16HA 
Pointer16HI 
Pointer16HIGH 
Pointer16HIGHA 
Pointer16HIGHER 
Pointer16HIGHERA 
Pointer16HIGHEST 
Pointer16HIGHESTA 
Pointer16LO 
Pointer16LODS 
Pointer14 
Delta64 
Delta34 
Delta32 
NegDelta32 
Delta16 
Delta16HA 
Delta16HI 
Delta16LO 
TOC 
TOCDelta16 
TOCDelta16DS 
TOCDelta16HA 
TOCDelta16HI 
TOCDelta16LO 
TOCDelta16LODS 
RequestGOTAndTransformToDelta34 
CallBranchDelta 
CallBranchDeltaRestoreTOC 
RequestCall 
RequestCallNoTOC 
RequestTLSDescInGOTAndTransformToTOCDelta16HA 
RequestTLSDescInGOTAndTransformToTOCDelta16LO 
RequestTLSDescInGOTAndTransformToDelta34 

Definition at line 24 of file ppc64.h.

◆ PLTCallStubKind

Enumerator
LongBranch 
LongBranchSaveR2 
LongBranchNoTOC 

Definition at line 68 of file ppc64.h.

Function Documentation

◆ applyFixup()

◆ createAnonymousPointer()

Symbol & llvm::jitlink::ppc64::createAnonymousPointer ( LinkGraph & G,
Section & PointerSection,
Symbol * InitialTarget = nullptr,
uint64_t InitialAddend = 0 )
inline

◆ createAnonymousPointerJumpStub()

template<llvm::endianness Endianness>
Symbol & llvm::jitlink::ppc64::createAnonymousPointerJumpStub ( LinkGraph & G,
Section & StubSection,
Symbol & PointerSymbol,
PLTCallStubKind StubKind )
inline

◆ getEdgeKindName()

◆ ha()

uint16_t llvm::jitlink::ppc64::ha ( uint64_t x)
inlinestatic

Definition at line 265 of file ppc64.h.

Referenced by relocateHalf16().

◆ hi()

uint16_t llvm::jitlink::ppc64::hi ( uint64_t x)
inlinestatic

Definition at line 267 of file ppc64.h.

Referenced by relocateHalf16().

◆ high()

uint64_t llvm::jitlink::ppc64::high ( uint64_t x)
inlinestatic

Definition at line 268 of file ppc64.h.

Referenced by relocateHalf16().

◆ higha()

uint64_t llvm::jitlink::ppc64::higha ( uint64_t x)
inlinestatic

Definition at line 269 of file ppc64.h.

Referenced by relocateHalf16().

◆ higher()

uint64_t llvm::jitlink::ppc64::higher ( uint64_t x)
inlinestatic

Definition at line 272 of file ppc64.h.

Referenced by relocateHalf16().

◆ highera()

uint64_t llvm::jitlink::ppc64::highera ( uint64_t x)
inlinestatic

Definition at line 273 of file ppc64.h.

Referenced by relocateHalf16().

◆ highest()

uint16_t llvm::jitlink::ppc64::highest ( uint64_t x)
inlinestatic

Definition at line 276 of file ppc64.h.

Referenced by relocateHalf16().

◆ highesta()

uint16_t llvm::jitlink::ppc64::highesta ( uint64_t x)
inlinestatic

Definition at line 277 of file ppc64.h.

Referenced by relocateHalf16().

◆ lo()

uint64_t llvm::jitlink::ppc64::lo ( uint64_t x)
inlinestatic

Definition at line 266 of file ppc64.h.

Referenced by relocateHalf16().

◆ pickStub()

◆ readPrefixedInstruction()

template<llvm::endianness Endianness>
uint64_t llvm::jitlink::ppc64::readPrefixedInstruction ( const char * Loc)
inlinestatic

Definition at line 286 of file ppc64.h.

References llvm::little, and llvm::support::endian::read64().

Referenced by applyFixup().

◆ relocateHalf16()

◆ writePrefixedInstruction()

template<llvm::endianness Endianness>
void llvm::jitlink::ppc64::writePrefixedInstruction ( char * Loc,
uint64_t Inst )
inlinestatic

Definition at line 293 of file ppc64.h.

References llvm::little, and llvm::support::endian::write64().

Referenced by applyFixup().

Variable Documentation

◆ NullPointerContent

const char llvm::jitlink::ppc64::NullPointerContent
Initial value:
= {0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00}

Definition at line 19 of file ppc64.cpp.

Referenced by createAnonymousPointer().

◆ PointerJumpStubContent_big

const char llvm::jitlink::ppc64::PointerJumpStubContent_big
Initial value:
= {
(char)0xf8, 0x41, 0x00, 0x18,
0x3d, (char)0x82, 0x00, 0x00,
(char)0xe9, (char)0x8c, 0x00, 0x00,
0x7d, (char)0x89, 0x03, (char)0xa6,
0x4e, (char)0x80, 0x04, 0x20,
}

Definition at line 30 of file ppc64.cpp.

Referenced by pickStub().

◆ PointerJumpStubContent_little

const char llvm::jitlink::ppc64::PointerJumpStubContent_little
Initial value:
= {
0x18, 0x00, 0x41, (char)0xf8,
0x00, 0x00, (char)0x82, 0x3d,
0x00, 0x00, (char)0x8c, (char)0xe9,
(char)0xa6, 0x03, (char)0x89, 0x7d,
0x20, 0x04, (char)0x80, 0x4e,
}

Definition at line 22 of file ppc64.cpp.

Referenced by pickStub().

◆ PointerJumpStubNoTOCContent_big

const char llvm::jitlink::ppc64::PointerJumpStubNoTOCContent_big
Initial value:
= {
0x7d, (char)0x88, 0x02, (char)0xa6,
0x42, (char)0x9f, 0x00, 0x05,
0x7d, 0x68, 0x02, (char)0xa6,
0x7d, (char)0x88, 0x03, (char)0xa6,
0x3d, (char)0x8b, 0x00, 0x00,
(char)0xe9, (char)0x8c, 0x00, 0x00,
0x7d, (char)0x89, 0x03, (char)0xa6,
0x4e, (char)0x80, 0x04, 0x20,
}

Definition at line 50 of file ppc64.cpp.

Referenced by pickStub().

◆ PointerJumpStubNoTOCContent_little

const char llvm::jitlink::ppc64::PointerJumpStubNoTOCContent_little
Initial value:
= {
(char)0xa6, 0x02, (char)0x88, 0x7d,
0x05, (char)0x00, (char)0x9f, 0x42,
(char)0xa6, 0x02, 0x68, 0x7d,
(char)0xa6, 0x03, (char)0x88, 0x7d,
0x00, 0x00, (char)0x8b, 0x3d,
0x00, 0x00, (char)0x8c, (char)0xe9,
(char)0xa6, 0x03, (char)0x89, 0x7d,
0x20, 0x04, (char)0x80, 0x4e,
}

Definition at line 39 of file ppc64.cpp.

Referenced by pickStub().