mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
On Darwin ARM, memory needs special handling to do JIT. This patch expands
this handling to work properly for modifying stub functions, relocations back to entry points after JIT compilation, etc.. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57013 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -58,14 +58,3 @@ void llvm::sys::Memory::InvalidateInstructionCache(const void *Addr,
|
||||
#endif // end PPC
|
||||
|
||||
}
|
||||
|
||||
bool llvm::sys::Memory::SetRXPrivilege(const void *Addr, size_t Size) {
|
||||
#if defined(__APPLE__) && defined(__arm__)
|
||||
kern_return_t kr = vm_protect(mach_task_self(), (vm_address_t)Addr,
|
||||
(vm_size_t)Size, 0,
|
||||
VM_PROT_READ | VM_PROT_EXECUTE | VM_PROT_COPY);
|
||||
return KERN_SUCCESS == kr;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user