From 892df335e6f633a5bcc2ce265749e15365ea2549 Mon Sep 17 00:00:00 2001 From: Thog Date: Mon, 13 Jan 2020 03:04:28 +0100 Subject: Rework SVC handling (#883) * Rework SVC handling Prepare for 32 bits support. * QueryMemory64 x1 is an output * Pregenerate all SVC handler Also clean up + 32 bits code path * Address gdk's comments * Simplify local setter loop * Address jd's comments --- Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs') diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs index 0bf5e5fa..d5698e2b 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs @@ -20,15 +20,15 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall public void SvcCall(object sender, InstExceptionEventArgs e) { - Action svcFunc = SvcTable.GetSvcFunc(e.Id); + ExecutionContext context = (ExecutionContext)sender; + + Action svcFunc = context.IsAarch32 ? SvcTable.SvcTable32[e.Id] : SvcTable.SvcTable64[e.Id]; if (svcFunc == null) { throw new NotImplementedException($"SVC 0x{e.Id:X4} is not implemented."); } - ExecutionContext context = (ExecutionContext)sender; - svcFunc(this, context); PostSvcHandler(); -- cgit v1.2.3