Allow reflection for NativeInterface + statically reference GetFunctionAddress so it gets compiled

This commit is contained in:
Evan Husted
2025-03-01 19:56:00 -06:00
parent ccfcdd4219
commit c3083076ee
9 changed files with 89 additions and 70 deletions

View File

@@ -127,7 +127,7 @@ namespace ARMeilleure.Instructions
// Timer.
14 => opc switch
{
0 => typeof(NativeInterface).GetMethod(nameof(NativeInterface.GetCntpctEl0)),
0 => NativeInterface.Type.GetMethod(nameof(NativeInterface.GetCntpctEl0)),
_ => throw new NotImplementedException($"Unknown MRRC Opc1 0x{opc:X} at 0x{op.Address:X} (0x{op.RawOpCode:X})."),
},
_ => throw new NotImplementedException($"Unknown MRRC 0x{op.RawOpCode:X} at 0x{op.Address:X}."),