LLVM 20.0.0git
Static Public Member Functions | Static Public Attributes | List of all members
llvm::orc::OrcAArch64 Class Reference

#include "llvm/ExecutionEngine/Orc/OrcABISupport.h"

Static Public Member Functions

static void writeResolverCode (char *ResolverWorkingMem, ExecutorAddr ResolverTargetAddress, ExecutorAddr ReentryFnAddr, ExecutorAddr RentryCtxAddr)
 Write the resolver code into the given memory.
 
static void writeTrampolines (char *TrampolineBlockWorkingMem, ExecutorAddr TrampolineBlockTargetAddress, ExecutorAddr ResolverAddr, unsigned NumTrampolines)
 Write the requested number of trampolines into the given memory, which must be big enough to hold 1 pointer, plus NumTrampolines trampolines.
 
static void writeIndirectStubsBlock (char *StubsBlockWorkingMem, ExecutorAddr StubsBlockTargetAddress, ExecutorAddr PointersBlockTargetAddress, unsigned MinStubs)
 Write NumStubs indirect stubs to working memory at StubsBlockWorkingMem.
 

Static Public Attributes

static constexpr unsigned PointerSize = 8
 
static constexpr unsigned TrampolineSize = 12
 
static constexpr unsigned StubSize = 8
 
static constexpr unsigned StubToPointerMaxDisplacement = 1U << 27
 
static constexpr unsigned ResolverCodeSize = 0x120
 

Detailed Description

Definition at line 89 of file OrcABISupport.h.

Member Function Documentation

◆ writeIndirectStubsBlock()

void llvm::orc::OrcAArch64::writeIndirectStubsBlock ( char StubsBlockWorkingMem,
ExecutorAddr  StubsBlockTargetAddress,
ExecutorAddr  PointersBlockTargetAddress,
unsigned  MinStubs 
)
static

Write NumStubs indirect stubs to working memory at StubsBlockWorkingMem.

Stubs will be written as if linked at StubsBlockTargetAddress, with the Nth stub using the Nth pointer in memory starting at PointersBlockTargetAddress.

Definition at line 161 of file OrcABISupport.cpp.

References assert(), I, PointerSize, and StubSize.

◆ writeResolverCode()

void llvm::orc::OrcAArch64::writeResolverCode ( char ResolverWorkingMem,
ExecutorAddr  ResolverTargetAddress,
ExecutorAddr  ReentryFnAddr,
ExecutorAddr  RentryCtxAddr 
)
static

Write the resolver code into the given memory.

The user is responsible for allocating the memory and setting permissions.

ReentryFnAddr should be the address of a function whose signature matches void* (*)(void *TrampolineAddr, void *ReentryCtxAddr). The ReentryCtxAddr argument of writeResolverCode will be passed as the second argument to the function at ReentryFnAddr.

Definition at line 46 of file OrcABISupport.cpp.

◆ writeTrampolines()

void llvm::orc::OrcAArch64::writeTrampolines ( char TrampolineBlockWorkingMem,
ExecutorAddr  TrampolineBlockTargetAddress,
ExecutorAddr  ResolverAddr,
unsigned  NumTrampolines 
)
static

Write the requested number of trampolines into the given memory, which must be big enough to hold 1 pointer, plus NumTrampolines trampolines.

Definition at line 137 of file OrcABISupport.cpp.

References llvm::alignTo(), I, and TrampolineSize.

Member Data Documentation

◆ PointerSize

constexpr unsigned llvm::orc::OrcAArch64::PointerSize = 8
staticconstexpr

Definition at line 91 of file OrcABISupport.h.

Referenced by writeIndirectStubsBlock().

◆ ResolverCodeSize

constexpr unsigned llvm::orc::OrcAArch64::ResolverCodeSize = 0x120
staticconstexpr

Definition at line 95 of file OrcABISupport.h.

◆ StubSize

constexpr unsigned llvm::orc::OrcAArch64::StubSize = 8
staticconstexpr

Definition at line 93 of file OrcABISupport.h.

Referenced by writeIndirectStubsBlock().

◆ StubToPointerMaxDisplacement

constexpr unsigned llvm::orc::OrcAArch64::StubToPointerMaxDisplacement = 1U << 27
staticconstexpr

Definition at line 94 of file OrcABISupport.h.

◆ TrampolineSize

constexpr unsigned llvm::orc::OrcAArch64::TrampolineSize = 12
staticconstexpr

Definition at line 92 of file OrcABISupport.h.

Referenced by writeTrampolines().


The documentation for this class was generated from the following files: