LLVM 20.0.0git
Classes | Enumerations | Functions | Variables
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)
 
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

const char NullPointerContent [8]
 
const char PointerJumpStubContent_big [20]
 
const char PointerJumpStubContent_little [20]
 
const char PointerJumpStubNoTOCContent_big [32]
 
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 23 of file ppc64.h.

◆ PLTCallStubKind

Enumerator
LongBranch 
LongBranchSaveR2 
LongBranchNoTOC 

Definition at line 67 of file ppc64.h.

Function Documentation

◆ applyFixup()

template<llvm::endianness Endianness>
Error llvm::jitlink::ppc64::applyFixup ( LinkGraph G,
Block B,
const Edge E,
const Symbol TOCSymbol 
)
inline

◆ 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()

const char * llvm::jitlink::ppc64::getEdgeKindName ( Edge::Kind  K)

◆ ha()

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

Definition at line 264 of file ppc64.h.

Referenced by relocateHalf16().

◆ hi()

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

Definition at line 266 of file ppc64.h.

Referenced by relocateHalf16().

◆ high()

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

Definition at line 267 of file ppc64.h.

Referenced by relocateHalf16().

◆ higha()

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

Definition at line 268 of file ppc64.h.

Referenced by relocateHalf16().

◆ higher()

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

Definition at line 271 of file ppc64.h.

Referenced by relocateHalf16().

◆ highera()

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

Definition at line 272 of file ppc64.h.

Referenced by relocateHalf16().

◆ highest()

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

Definition at line 275 of file ppc64.h.

Referenced by relocateHalf16().

◆ highesta()

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

Definition at line 276 of file ppc64.h.

Referenced by relocateHalf16().

◆ lo()

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

Definition at line 265 of file ppc64.h.

Referenced by relocateHalf16().

◆ pickStub()

template<llvm::endianness Endianness>
PLTCallStubInfo llvm::jitlink::ppc64::pickStub ( PLTCallStubKind  StubKind)
inline

◆ readPrefixedInstruction()

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

Definition at line 285 of file ppc64.h.

References llvm::little.

◆ relocateHalf16()

template<llvm::endianness Endianness>
Error llvm::jitlink::ppc64::relocateHalf16 ( char FixupPtr,
int64_t  Value,
Edge::Kind  K 
)
inline

◆ writePrefixedInstruction()

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

Definition at line 292 of file ppc64.h.

References llvm::little.

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().