mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 17:18:53 +00:00
Cached Interpreter 2.0
It now supports variable-sized data payloads and memory range freeing. It's a little faster, too.
This commit is contained in:
parent
5f4f974b48
commit
f79520a906
11 changed files with 479 additions and 252 deletions
|
@ -17,7 +17,7 @@ namespace Common
|
|||
// having to prefix them with gen-> or something similar.
|
||||
// Example implementation:
|
||||
// class JIT : public CodeBlock<ARMXEmitter> {}
|
||||
template <class T>
|
||||
template <class T, bool executable = true>
|
||||
class CodeBlock : public T
|
||||
{
|
||||
private:
|
||||
|
@ -53,7 +53,10 @@ public:
|
|||
{
|
||||
region_size = size;
|
||||
total_region_size = size;
|
||||
region = static_cast<u8*>(Common::AllocateExecutableMemory(total_region_size));
|
||||
if constexpr (executable)
|
||||
region = static_cast<u8*>(Common::AllocateExecutableMemory(total_region_size));
|
||||
else
|
||||
region = static_cast<u8*>(Common::AllocateMemoryPages(total_region_size));
|
||||
T::SetCodePtr(region, region + size);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue