Improve IRDumper (#1135)
* Improve IRDumper * Make Symbols.Add(ulong, ulong, ulong, string) thread safe * Use a StringBuilder for MemoryOperand * Add #if M_DEBUG guards * Fix JMP_TABLE typo * Fix using in Symbols * Use Conditional("M_DEBUG") instead Address gdkchan's feedback * Use a struct instead of 4-tuple Address gdkchan's feedback * Place symbols in comments instead Address gdkchan's feedback * Use StringBuilder throughout * Handle offsetted symbols * Fix naming convention of Builder * Avoid ArgumentException * Remove unnecessary using * Use switch expression instead * Turn into a class * Clean up * Remove unnecessary using
This commit is contained in:
parent
53369e79bd
commit
180ad8605d
4 changed files with 333 additions and 128 deletions
|
@ -1,3 +1,4 @@
|
|||
using ARMeilleure.Diagnostics;
|
||||
using ARMeilleure.IntermediateRepresentation;
|
||||
using ARMeilleure.State;
|
||||
using System;
|
||||
|
@ -85,6 +86,8 @@ namespace ARMeilleure.Translation
|
|||
|
||||
IntPtr ptr = Marshal.GetFunctionPointerForDelegate<Delegate>(func);
|
||||
|
||||
Symbols.Add((ulong)ptr.ToInt64(), func.Method.Name);
|
||||
|
||||
OperandType returnType = GetOperandType(func.Method.ReturnType);
|
||||
|
||||
return Call(Const(ptr.ToInt64()), returnType, callArgs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue