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
This commit is contained in:
Thog 2020-01-13 03:04:28 +01:00 committed by jduncanator
parent 5facc0c07f
commit 892df335e6
8 changed files with 167 additions and 119 deletions

View file

@ -20,15 +20,15 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
public void SvcCall(object sender, InstExceptionEventArgs e)
{
Action<SvcHandler, ExecutionContext> svcFunc = SvcTable.GetSvcFunc(e.Id);
ExecutionContext context = (ExecutionContext)sender;
Action<SvcHandler, ExecutionContext> 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();