aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Cpu/CpuContext.cs
blob: 275fcc68d0486c3d8d5c46d2069b76c2085503d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using ARMeilleure.State;
using ARMeilleure.Translation;

namespace Ryujinx.Cpu
{
    public class CpuContext
    {
        private readonly Translator _translator;

        public CpuContext(MemoryManager memory)
        {
            _translator = new Translator(new JitMemoryAllocator(), memory);
        }

        public static ExecutionContext CreateExecutionContext() => new ExecutionContext(new JitMemoryAllocator());

        public void Execute(ExecutionContext context, ulong address) => _translator.Execute(context, address);
    }
}