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

I386 support. More...

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

Static Public Member Functions

static void writeResolverCode (char *ResolverWorkingMem, ExecutorAddr ResolverTargetAddress, ExecutorAddr ReentryFnAddr, ExecutorAddr ReentryCtxAddr)
 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 NumStubs)
 Write NumStubs indirect stubs to working memory at StubsBlockWorkingMem.
 

Static Public Attributes

static constexpr unsigned PointerSize = 4
 
static constexpr unsigned TrampolineSize = 8
 
static constexpr unsigned StubSize = 8
 
static constexpr unsigned StubToPointerMaxDisplacement = 1 << 31
 
static constexpr unsigned ResolverCodeSize = 0x4a
 

Detailed Description

I386 support.

I386 supports lazy JITing.

Definition at line 198 of file OrcABISupport.h.

Member Function Documentation

◆ writeIndirectStubsBlock()

void llvm::orc::OrcI386::writeIndirectStubsBlock ( char StubsBlockWorkingMem,
ExecutorAddr  StubsBlockTargetAddress,
ExecutorAddr  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 474 of file OrcABISupport.cpp.

References assert(), llvm::orc::ExecutorAddr::getValue(), and I.

◆ writeResolverCode()

void llvm::orc::OrcI386::writeResolverCode ( char ResolverWorkingMem,
ExecutorAddr  ResolverTargetAddress,
ExecutorAddr  ReentryFnAddr,
ExecutorAddr  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 406 of file OrcABISupport.cpp.

References assert(), and llvm::orc::ExecutorAddr::getValue().

◆ writeTrampolines()

void llvm::orc::OrcI386::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 460 of file OrcABISupport.cpp.

References assert(), llvm::orc::ExecutorAddr::getValue(), I, and TrampolineSize.

Member Data Documentation

◆ PointerSize

constexpr unsigned llvm::orc::OrcI386::PointerSize = 4
staticconstexpr

Definition at line 200 of file OrcABISupport.h.

◆ ResolverCodeSize

constexpr unsigned llvm::orc::OrcI386::ResolverCodeSize = 0x4a
staticconstexpr

Definition at line 204 of file OrcABISupport.h.

◆ StubSize

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

Definition at line 202 of file OrcABISupport.h.

◆ StubToPointerMaxDisplacement

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

Definition at line 203 of file OrcABISupport.h.

◆ TrampolineSize

constexpr unsigned llvm::orc::OrcI386::TrampolineSize = 8
staticconstexpr

Definition at line 201 of file OrcABISupport.h.

Referenced by writeTrampolines().


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