mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-23 06:57:13 +02:00
Implement a new JIT for Arm devices
This commit is contained in:
parent
59a0c7cfd8
commit
cee2e2f600
127 changed files with 42538 additions and 25 deletions
|
@ -1,4 +1,4 @@
|
|||
using ARMeilleure.Memory;
|
||||
using ARMeilleure.Memory;
|
||||
using Ryujinx.Cpu;
|
||||
using Ryujinx.Graphics.Gpu;
|
||||
using Ryujinx.HLE.HOS.Kernel.Process;
|
||||
|
@ -85,6 +85,8 @@ namespace Ryujinx.HLE.HOS
|
|||
_memoryManager = null;
|
||||
_gpuContext.UnregisterProcess(_pid);
|
||||
}
|
||||
|
||||
_cpuContext.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Cpu;
|
||||
using Ryujinx.Cpu.AppleHv;
|
||||
using Ryujinx.Cpu.Jit;
|
||||
using Ryujinx.Cpu.LightningJit;
|
||||
using Ryujinx.Graphics.Gpu;
|
||||
using Ryujinx.HLE.HOS.Kernel;
|
||||
using Ryujinx.HLE.HOS.Kernel.Process;
|
||||
|
@ -46,7 +47,9 @@ namespace Ryujinx.HLE.HOS
|
|||
{
|
||||
IArmProcessContext processContext;
|
||||
|
||||
if (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64 && for64Bit && context.Device.Configuration.UseHypervisor)
|
||||
bool isArm64Host = RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
|
||||
|
||||
if (OperatingSystem.IsMacOS() && isArm64Host && for64Bit && context.Device.Configuration.UseHypervisor)
|
||||
{
|
||||
var cpuEngine = new HvEngine(_tickSource);
|
||||
var memoryManager = new HvMemoryManager(context.Memory, addressSpaceSize, invalidAccessHandler);
|
||||
|
@ -63,7 +66,9 @@ namespace Ryujinx.HLE.HOS
|
|||
mode = MemoryManagerMode.SoftwarePageTable;
|
||||
}
|
||||
|
||||
var cpuEngine = new JitEngine(_tickSource);
|
||||
ICpuEngine cpuEngine = isArm64Host && (mode == MemoryManagerMode.HostMapped || mode == MemoryManagerMode.HostMappedUnsafe)
|
||||
? new LightningJitEngine(_tickSource)
|
||||
: new JitEngine(_tickSource);
|
||||
|
||||
AddressSpace addressSpace = null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue