mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +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:
@ -365,6 +365,21 @@ namespace {
|
||||
// Finally, remove this entry from TableBlocks.
|
||||
TableBlocks.erase(I);
|
||||
}
|
||||
|
||||
/// setMemoryWritable - When code generation is in progress,
|
||||
/// the code pages may need permissions changed.
|
||||
void setMemoryWritable(void)
|
||||
{
|
||||
for (unsigned i = 0, e = Blocks.size(); i != e; ++i)
|
||||
sys::Memory::setWritable(Blocks[i]);
|
||||
}
|
||||
/// setMemoryExecutable - When code generation is done and we're ready to
|
||||
/// start execution, the code pages may need permissions changed.
|
||||
void setMemoryExecutable(void)
|
||||
{
|
||||
for (unsigned i = 0, e = Blocks.size(); i != e; ++i)
|
||||
sys::Memory::setExecutable(Blocks[i]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user