PPU LLVM: Reduce size of JIT-transition treampolines to 16
This commit is contained in:
@@ -147,6 +147,12 @@ static u8* add_jit_memory(usz size, usz align)
|
||||
return pointer;
|
||||
}
|
||||
|
||||
if (!size && align == 1)
|
||||
{
|
||||
// Return memory top address
|
||||
return pointer + (Ctr.load() & 0xffff'ffff);
|
||||
}
|
||||
|
||||
u64 olda, newa;
|
||||
|
||||
// Simple allocation by incrementing pointer to the next free data
|
||||
@@ -273,6 +279,18 @@ u8* jit_runtime::alloc(usz size, usz align, bool exec) noexcept
|
||||
}
|
||||
}
|
||||
|
||||
u8* jit_runtime::peek(bool exec) noexcept
|
||||
{
|
||||
if (exec)
|
||||
{
|
||||
return add_jit_memory<s_code_pos, 0x0, utils::protection::wx>(0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return add_jit_memory<s_data_pos, 0x40000000, utils::protection::rw>(0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void jit_runtime::initialize()
|
||||
{
|
||||
if (!s_code_init.empty() || !s_data_init.empty())
|
||||
|
||||
Reference in New Issue
Block a user