|
LLVM
10.0.0
|
#include "llvm/ExecutionEngine/Orc/OrcABISupport.h"
Public Types | |
| using | IndirectStubsInfo = GenericIndirectStubsInfo< 16 > |
| using | JITReentryFn = JITTargetAddress(*)(void *CallbackMgr, void *TrampolineId) |
Static Public Member Functions | |
| static void | writeTrampolines (uint8_t *TrampolineMem, void *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. More... | |
| static void | writeResolverCode (uint8_t *ResolveMem, JITReentryFn Reentry, void *CallbackMgr, bool isBigEndian) |
| Write the resolver code into the given memory. 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 = 4 |
| static const unsigned | TrampolineSize = 20 |
| static const unsigned | ResolverCodeSize = 0xfc |
Definition at line 243 of file OrcABISupport.h.
Definition at line 248 of file OrcABISupport.h.
| using llvm::orc::OrcMips32_Base::JITReentryFn = JITTargetAddress (*)(void *CallbackMgr, void *TrampolineId) |
Definition at line 251 of file OrcABISupport.h.
|
static |
Emit at least MinStubs worth of indirect call stubs, rounded out to the nearest page size.
E.g. Asking for 4 stubs on Mips32, 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 658 of file OrcABISupport.cpp.
References llvm::sys::Memory::allocateMappedMemory(), llvm::errorCodeToError(), llvm::sys::Process::getPageSizeEstimate(), 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().
|
static |
Write the resolver code into the given memory.
The user is responsible for allocating the memory and setting permissions.
Definition at line 539 of file OrcABISupport.cpp.
Referenced by llvm::orc::OrcMips32Le::writeResolverCode(), and llvm::orc::OrcMips32Be::writeResolverCode().
|
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 641 of file OrcABISupport.cpp.
References I.
Definition at line 245 of file OrcABISupport.h.
Definition at line 247 of file OrcABISupport.h.
Definition at line 246 of file OrcABISupport.h.
1.8.13