LLVM  8.0.1
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
llvm::orc::OrcX86_64_Base Class Reference

X86_64 code that's common to all ABIs. More...

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

Inheritance diagram for llvm::orc::OrcX86_64_Base:
Inheritance graph
[legend]
Collaboration diagram for llvm::orc::OrcX86_64_Base:
Collaboration graph
[legend]

Public Types

using IndirectStubsInfo = GenericIndirectStubsInfo< 8 >
 

Static Public Member Functions

static void writeTrampolines (uint8_t *TrampolineMem, void *ResolverAddr, unsigned NumTrampolines)
 Write the requsted number of trampolines into the given memory, which must be big enough to hold 1 pointer, plus NumTrampolines trampolines. More...
 
static Error emitIndirectStubsBlock (IndirectStubsInfo &StubsInfo, unsigned MinStubs, void *InitialPtrVal)
 Emit at least MinStubs worth of indirect call stubs, rounded out to the nearest page size. More...
 

Static Public Attributes

static const unsigned PointerSize = 8
 
static const unsigned TrampolineSize = 8
 

Detailed Description

X86_64 code that's common to all ABIs.

X86_64 supports lazy JITing.

Definition at line 151 of file OrcABISupport.h.

Member Typedef Documentation

◆ IndirectStubsInfo

Definition at line 156 of file OrcABISupport.h.

Member Function Documentation

◆ emitIndirectStubsBlock()

Error llvm::orc::OrcX86_64_Base::emitIndirectStubsBlock ( IndirectStubsInfo StubsInfo,
unsigned  MinStubs,
void *  InitialPtrVal 
)
static

Emit at least MinStubs worth of indirect call stubs, rounded out to the nearest page size.

E.g. Asking for 4 stubs on x86-64, where stubs are 8-bytes, with 4k pages will return a block of 512 stubs (4096 / 8 = 512). Asking for 513 will return a block of 1024 (2-pages worth).

Definition at line 207 of file OrcABISupport.cpp.

References llvm::sys::Memory::allocateMappedMemory(), llvm::errorCodeToError(), llvm::sys::Process::getPageSize(), I, llvm::sys::Memory::MF_EXEC, llvm::sys::Memory::MF_READ, llvm::sys::Memory::MF_WRITE, PageSize, llvm::sys::Memory::protectMappedMemory(), llvm::orc::GenericIndirectStubsInfo< StubSizeVal >::StubSize, and llvm::Error::success().

◆ writeTrampolines()

void llvm::orc::OrcX86_64_Base::writeTrampolines ( uint8_t *  TrampolineMem,
void *  ResolverAddr,
unsigned  NumTrampolines 
)
static

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

Definition at line 192 of file OrcABISupport.cpp.

References I, llvm::Intrinsic::memcpy, and llvm::orc::OrcAArch64::TrampolineSize.

Member Data Documentation

◆ PointerSize

const unsigned llvm::orc::OrcX86_64_Base::PointerSize = 8
static

Definition at line 153 of file OrcABISupport.h.

◆ TrampolineSize

const unsigned llvm::orc::OrcX86_64_Base::TrampolineSize = 8
static

Definition at line 154 of file OrcABISupport.h.


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