From 9ef94c8292beda825fa76e05ad2e561c6d571c95 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Tue, 11 Apr 2023 07:55:04 +0100 Subject: ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661) * ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition. Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile. * Remove unreachable code. * Add ulong conversion for offsets * Nit --- ARMeilleure/Instructions/NativeInterface.cs | 30 ----------------------------- 1 file changed, 30 deletions(-) (limited to 'ARMeilleure/Instructions/NativeInterface.cs') diff --git a/ARMeilleure/Instructions/NativeInterface.cs b/ARMeilleure/Instructions/NativeInterface.cs index 57964cc8..2c35387a 100644 --- a/ARMeilleure/Instructions/NativeInterface.cs +++ b/ARMeilleure/Instructions/NativeInterface.cs @@ -72,26 +72,6 @@ namespace ARMeilleure.Instructions return (ulong)GetContext().DczidEl0; } - public static ulong GetTpidrEl0() - { - return (ulong)GetContext().TpidrEl0; - } - - public static uint GetTpidrEl032() - { - return (uint)GetContext().TpidrEl0; - } - - public static ulong GetTpidrroEl0() - { - return (ulong)GetContext().TpidrroEl0; - } - - public static uint GetTpidr32() - { - return (uint)GetContext().TpidrroEl0; - } - public static ulong GetCntfrqEl0() { return GetContext().CntfrqEl0; @@ -106,16 +86,6 @@ namespace ARMeilleure.Instructions { return GetContext().CntvctEl0; } - - public static void SetTpidrEl0(ulong value) - { - GetContext().TpidrEl0 = (long)value; - } - - public static void SetTpidrEl032(uint value) - { - GetContext().TpidrEl0 = (long)value; - } #endregion #region "Read" -- cgit v1.2.3