18 #ifndef LLVM_EXECUTIONENGINE_ORC_ORCABISUPPORT_H 19 #define LLVM_EXECUTIONENGINE_ORC_ORCABISUPPORT_H 53 unsigned NumTrampolines) {
68 unsigned MinStubs,
void *InitialPtrVal) {
70 "host support class");
82 : NumStubs(NumStubs), StubsMem(
std::move(StubsMem)) {}
84 : NumStubs(
Other.NumStubs), StubsMem(
std::move(
Other.StubsMem)) {
89 NumStubs =
Other.NumStubs;
91 StubsMem = std::move(
Other.StubsMem);
101 return static_cast<char *
>(StubsMem.base()) + Idx * StubSize;
107 char *PtrsBase =
static_cast<char *
>(StubsMem.base()) + NumStubs * StubSize;
108 return reinterpret_cast<void **
>(PtrsBase) + Idx;
112 unsigned NumStubs = 0;
136 unsigned NumTrampolines);
145 unsigned MinStubs,
void *InitialPtrVal);
162 unsigned NumTrampolines);
171 unsigned MinStubs,
void *InitialPtrVal);
229 unsigned NumTrampolines);
238 unsigned MinStubs,
void *InitialPtrVal);
256 static void writeTrampolines(uint8_t *TrampolineMem,
void *ResolverAddr,
unsigned NumTrampolines);
302 static void writeTrampolines(uint8_t *TrampolineMem,
void *ResolverAddr,
unsigned NumTrampolines);
315 #endif // LLVM_EXECUTIONENGINE_ORC_ORCABISUPPORT_H static const unsigned TrampolineSize
static const unsigned ResolverCodeSize
JITTargetAddress(*)(void *CallbackMgr, void *TrampolineId) JITReentryFn
static const unsigned PointerSize
This class represents lattice values for constants.
X86_64 code that's common to all ABIs.
GenericIndirectStubsInfo(unsigned NumStubs, sys::OwningMemoryBlock StubsMem)
unsigned getNumStubs() const
Provide information about stub blocks generated by the makeIndirectStubsBlock function.
JITTargetAddress(*)(void *CallbackMgr, void *TrampolineId) JITReentryFn
static Error emitIndirectStubsBlock(IndirectStubsInfo &StubsInfo, unsigned MinStubs, void *InitialPtrVal)
static void writeTrampolines(uint8_t *TrampolineMem, void *ResolverAddr, unsigned NumTrampolines)
X86_64 support for SysV ABI (Linux, MacOSX).
uint64_t JITTargetAddress
Represents an address in the target process's address space.
static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry, void *CallbackMgr, bool isBigEndian)
Write the resolver code into the given memory.
static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry, void *CallbackMgr)
JITTargetAddress(*)(void *CallbackMgr, void *TrampolineId) JITReentryFn
GenericIndirectStubsInfo(GenericIndirectStubsInfo &&Other)
void ** getPtr(unsigned Idx) const
Get a pointer to the implementation-pointer at the given index, which must be in the range 0 ...
X86_64 support for Win32.
unsigned getNumStubs() const
Number of stubs in this block.
static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry, void *CallbackMgr)
GenericIndirectStubsInfo & operator=(GenericIndirectStubsInfo &&Other)
JITTargetAddress(*)(void *CallbackMgr, void *TrampolineId) JITReentryFn
JITTargetAddress(*)(void *CallbackMgr, void *TrampolineId) JITReentryFn
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry, void *CallbackMgr)
JITTargetAddress(*)(void *CallbackMgr, void *TrampolineId) JITReentryFn
Owning version of MemoryBlock.
static const unsigned StubSize
void * getStub(unsigned Idx) const
Get a pointer to the stub at the given index, which must be in the range 0 .
void * getStub(unsigned Idx) const
JITTargetAddress(*)(void *CallbackMgr, void *TrampolineId) JITReentryFn
void ** getPtr(unsigned Idx) const
Lightweight error class with error context and mandatory checking.