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

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

Collaboration diagram for llvm::orc::OrcRiscv64:
Collaboration graph
[legend]

Static Public Member Functions

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

Static Public Attributes

static constexpr unsigned PointerSize = 8
 
static constexpr unsigned TrampolineSize = 16
 
static constexpr unsigned StubSize = 16
 
static constexpr unsigned StubToPointerMaxDisplacement = 1 << 31
 
static constexpr unsigned ResolverCodeSize = 0x148
 

Detailed Description

Definition at line 336 of file OrcABISupport.h.

Member Function Documentation

◆ writeIndirectStubsBlock()

void llvm::orc::OrcRiscv64::writeIndirectStubsBlock ( char *  StubsBlockWorkingMem,
JITTargetAddress  StubsBlockTargetAddress,
JITTargetAddress  PointersBlockTargetAddress,
unsigned  NumStubs 
)
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 1033 of file OrcABISupport.cpp.

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

◆ writeResolverCode()

void llvm::orc::OrcRiscv64::writeResolverCode ( char *  ResolverWorkingMem,
JITTargetAddress  ResolverTargetAddress,
JITTargetAddress  ReentryFnAddr,
JITTargetAddress  ReentryCtxAddr 
)
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 910 of file OrcABISupport.cpp.

References memcpy().

◆ writeTrampolines()

void llvm::orc::OrcRiscv64::writeTrampolines ( char *  TrampolineBlockWorkingMem,
JITTargetAddress  TrampolineBlockTargetAddress,
JITTargetAddress  ResolverFnAddr,
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 1010 of file OrcABISupport.cpp.

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

Member Data Documentation

◆ PointerSize

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

Definition at line 338 of file OrcABISupport.h.

Referenced by writeIndirectStubsBlock().

◆ ResolverCodeSize

constexpr unsigned llvm::orc::OrcRiscv64::ResolverCodeSize = 0x148
staticconstexpr

Definition at line 342 of file OrcABISupport.h.

◆ StubSize

constexpr unsigned llvm::orc::OrcRiscv64::StubSize = 16
staticconstexpr

Definition at line 340 of file OrcABISupport.h.

Referenced by writeIndirectStubsBlock().

◆ StubToPointerMaxDisplacement

constexpr unsigned llvm::orc::OrcRiscv64::StubToPointerMaxDisplacement = 1 << 31
staticconstexpr

Definition at line 341 of file OrcABISupport.h.

◆ TrampolineSize

constexpr unsigned llvm::orc::OrcRiscv64::TrampolineSize = 16
staticconstexpr

Definition at line 339 of file OrcABISupport.h.

Referenced by writeTrampolines().


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