From eee639d6ba544fa5dd9352426d55e91bc54e157d Mon Sep 17 00:00:00 2001 From: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> Date: Thu, 31 Oct 2019 19:09:03 +0100 Subject: .NET Core 3.0 is here! (#784) * .NET Core 3.0 is here! * Remove IMemoryManager.cs and its references. * Add T Math/F.FusedMultiplyAdd(T, T, T). Nits. * Nit. * Update appveyor.yml * Revert "Resolve Visual Studio build issues" This reverts commit 1772128ce0fc058e6280001aace3a77a7a96897b. * Update SvcTable.cs --- .../HOS/Kernel/SupervisorCall/SvcHandler.cs | 4 ++-- Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs | 24 +++++++++++----------- Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'Ryujinx.HLE/HOS/Kernel/SupervisorCall') diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs index 7509ae04..e3a4b375 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcHandler.cs @@ -19,14 +19,14 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall public void SvcCall(object sender, InstExceptionEventArgs e) { - Action svcFunc = SvcTable.GetSvcFunc(e.Id); + Action svcFunc = SvcTable.GetSvcFunc(e.Id); if (svcFunc == null) { throw new NotImplementedException($"SVC 0x{e.Id:X4} is not implemented."); } - IExecutionContext context = (IExecutionContext)sender; + ExecutionContext context = (ExecutionContext)sender; svcFunc(this, context); } diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs index b740253f..9ec0931a 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcTable.cs @@ -14,7 +14,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall private static Dictionary _svcFuncs64; - private static Action[] _svcTable64; + private static Action[] _svcTable64; static SvcTable() { @@ -77,10 +77,10 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall { 0x78, nameof(SvcHandler.UnmapProcessCodeMemory64) } }; - _svcTable64 = new Action[0x80]; + _svcTable64 = new Action[0x80]; } - public static Action GetSvcFunc(int svcId) + public static Action GetSvcFunc(int svcId) { if (_svcTable64[svcId] != null) { @@ -95,9 +95,9 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall return null; } - private static Action GenerateMethod(string svcName) + private static Action GenerateMethod(string svcName) { - Type[] argTypes = new Type[] { typeof(SvcHandler), typeof(IExecutionContext) }; + Type[] argTypes = new Type[] { typeof(SvcHandler), typeof(ExecutionContext) }; DynamicMethod method = new DynamicMethod(svcName, null, argTypes); @@ -188,7 +188,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall generator.Emit(OpCodes.Ldarg_1); generator.Emit(OpCodes.Ldc_I4, byRefArgsCount + index); - MethodInfo info = typeof(IExecutionContext).GetMethod(nameof(IExecutionContext.GetX)); + MethodInfo info = typeof(ExecutionContext).GetMethod(nameof(ExecutionContext.GetX)); generator.Emit(OpCodes.Call, info); @@ -234,7 +234,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall generator.Emit(OpCodes.Ldarg_1); generator.Emit(OpCodes.Ldc_I4, index); - MethodInfo info = typeof(IExecutionContext).GetMethod(nameof(IExecutionContext.GetX)); + MethodInfo info = typeof(ExecutionContext).GetMethod(nameof(ExecutionContext.GetX)); generator.Emit(OpCodes.Call, info); @@ -250,7 +250,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall generator.Emit(OpCodes.Ldarg_1); generator.Emit(OpCodes.Ldc_I4, byRefArgsCount + index); - MethodInfo info = typeof(IExecutionContext).GetMethod(nameof(IExecutionContext.GetX)); + MethodInfo info = typeof(ExecutionContext).GetMethod(nameof(ExecutionContext.GetX)); generator.Emit(OpCodes.Call, info); @@ -288,7 +288,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall ConvertToFieldType(retType); - MethodInfo info = typeof(IExecutionContext).GetMethod(nameof(IExecutionContext.SetX)); + MethodInfo info = typeof(ExecutionContext).GetMethod(nameof(ExecutionContext.SetX)); generator.Emit(OpCodes.Call, info); } @@ -301,7 +301,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall ConvertToFieldType(locals[index].LocalType); - MethodInfo info = typeof(IExecutionContext).GetMethod(nameof(IExecutionContext.SetX)); + MethodInfo info = typeof(ExecutionContext).GetMethod(nameof(ExecutionContext.SetX)); generator.Emit(OpCodes.Call, info); } @@ -313,14 +313,14 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall generator.Emit(OpCodes.Ldc_I4, outRegIndex++); generator.Emit(OpCodes.Ldc_I8, 0L); - MethodInfo info = typeof(IExecutionContext).GetMethod(nameof(IExecutionContext.SetX)); + MethodInfo info = typeof(ExecutionContext).GetMethod(nameof(ExecutionContext.SetX)); generator.Emit(OpCodes.Call, info); } generator.Emit(OpCodes.Ret); - return (Action)method.CreateDelegate(typeof(Action)); + return (Action)method.CreateDelegate(typeof(Action)); } private static void CheckIfTypeIsSupported(Type type, string svcName) diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs index e49da023..0908de10 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SvcThread.cs @@ -348,7 +348,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall return KernelResult.InvalidThread; } - IMemoryManager memory = currentProcess.CpuMemory; + MemoryManager memory = currentProcess.CpuMemory; memory.WriteUInt64((long)address + 0x0, thread.Context.GetX(0)); memory.WriteUInt64((long)address + 0x8, thread.Context.GetX(1)); @@ -427,7 +427,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall return KernelResult.Success; } - private static int GetPsr(IExecutionContext context) + private static int GetPsr(ExecutionContext context) { return (context.GetPstateFlag(PState.NFlag) ? (1 << 31) : 0) | (context.GetPstateFlag(PState.ZFlag) ? (1 << 30) : 0) | -- cgit v1.2.3