sys::Memory::MF_WRITE, EC));
assert(!EC && "Failed to allocate resolver block");
- TargetT::writeResolverCode(static_cast<uint8_t*>(ResolverBlock.base()),
- &reenter, this);
+ TargetT::writeResolverCode(static_cast<uint8_t *>(ResolverBlock.base()),
+ &reenter, this);
EC = sys::Memory::protectMappedMemory(ResolverBlock.getMemoryBlock(),
- sys::Memory::MF_READ |
- sys::Memory::MF_EXEC);
+ sys::Memory::MF_READ |
+ sys::Memory::MF_EXEC);
assert(!EC && "Failed to mprotect resolver block");
}
uint8_t *TrampolineMem = static_cast<uint8_t*>(TrampolineBlock.base());
TargetT::writeTrampolines(TrampolineMem, ResolverBlock.base(),
- NumTrampolines);
+ NumTrampolines);
for (unsigned I = 0; I < NumTrampolines; ++I)
this->AvailableTrampolines.push_back(
- static_cast<TargetAddress>(
- reinterpret_cast<uintptr_t>(
- TrampolineMem + (I * TargetT::TrampolineSize))));
+ static_cast<TargetAddress>(reinterpret_cast<uintptr_t>(
+ TrampolineMem + (I * TargetT::TrampolineSize))));
EC = sys::Memory::protectMappedMemory(TrampolineBlock.getMemoryBlock(),
- sys::Memory::MF_READ |
- sys::Memory::MF_EXEC);
+ sys::Memory::MF_READ |
+ sys::Memory::MF_EXEC);
assert(!EC && "Failed to mprotect trampoline block");
TrampolineBlocks.push_back(std::move(TrampolineBlock));
/// @brief Write the resolver code into the given memory. The user is be
/// responsible for allocating the memory and setting permissions.
static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry,
- void *CallbackMgr);
+ void *CallbackMgr);
/// @brief Write the requsted number of trampolines into the given memory,
/// which must be big enough to hold 1 pointer, plus NumTrampolines
/// trampolines.
static void writeTrampolines(uint8_t *TrampolineMem, void *ResolverAddr,
- unsigned NumTrampolines);
+ unsigned NumTrampolines);
/// @brief Provide information about stub blocks generated by the
/// makeIndirectStubsBlock function.