aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Translation/TranslatedFunction.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-01-23 19:37:53 -0300
committerGitHub <noreply@github.com>2023-01-23 22:37:53 +0000
commita1a4771ac1de95f2410c7fb8dfaf4a5986e5ebc6 (patch)
treeb79abb40024184b18b2ff821490de4ad5e7b9683 /ARMeilleure/Translation/TranslatedFunction.cs
parent2fd819613ffcede43562b333602d17fa79c9751d (diff)
Remove use of GetFunctionPointerForDelegate to get JIT cache function pointer (#4337)
* Remove use of GetFunctionPointerForDelegate to get JIT cache function pointer * Rename FuncPtr to FuncPointer
Diffstat (limited to 'ARMeilleure/Translation/TranslatedFunction.cs')
-rw-r--r--ARMeilleure/Translation/TranslatedFunction.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/ARMeilleure/Translation/TranslatedFunction.cs b/ARMeilleure/Translation/TranslatedFunction.cs
index 04dd769c..71eec08a 100644
--- a/ARMeilleure/Translation/TranslatedFunction.cs
+++ b/ARMeilleure/Translation/TranslatedFunction.cs
@@ -1,6 +1,5 @@
using ARMeilleure.Common;
using System;
-using System.Runtime.InteropServices;
namespace ARMeilleure.Translation
{
@@ -8,18 +7,18 @@ namespace ARMeilleure.Translation
{
private readonly GuestFunction _func; // Ensure that this delegate will not be garbage collected.
+ public IntPtr FuncPointer { get; }
public Counter<uint> CallCounter { get; }
public ulong GuestSize { get; }
public bool HighCq { get; }
- public IntPtr FuncPtr { get; }
- public TranslatedFunction(GuestFunction func, Counter<uint> callCounter, ulong guestSize, bool highCq)
+ public TranslatedFunction(GuestFunction func, IntPtr funcPointer, Counter<uint> callCounter, ulong guestSize, bool highCq)
{
_func = func;
+ FuncPointer = funcPointer;
CallCounter = callCounter;
GuestSize = guestSize;
HighCq = highCq;
- FuncPtr = Marshal.GetFunctionPointerForDelegate(func);
}
public ulong Execute(State.ExecutionContext context)