Stub a few services, add support for generating call stacks on the CPU
This commit is contained in:
parent
4906acdde9
commit
bd9b1e2c6b
20 changed files with 267 additions and 41 deletions
|
@ -8,8 +8,6 @@ namespace ChocolArm64.Instruction
|
|||
{
|
||||
static partial class AInstEmit
|
||||
{
|
||||
private const BindingFlags Binding = BindingFlags.NonPublic | BindingFlags.Instance;
|
||||
|
||||
public static void Brk(AILEmitterCtx Context)
|
||||
{
|
||||
EmitExceptionCall(Context, nameof(AThreadState.OnBreak));
|
||||
|
@ -30,9 +28,7 @@ namespace ChocolArm64.Instruction
|
|||
|
||||
Context.EmitLdc_I4(Op.Id);
|
||||
|
||||
MethodInfo MthdInfo = typeof(AThreadState).GetMethod(MthdName, Binding);
|
||||
|
||||
Context.EmitCall(MthdInfo);
|
||||
Context.EmitPrivateCall(typeof(AThreadState), MthdName);
|
||||
|
||||
//Check if the thread should still be running, if it isn't then we return 0
|
||||
//to force a return to the dispatcher and then exit the thread.
|
||||
|
@ -73,11 +69,7 @@ namespace ChocolArm64.Instruction
|
|||
Context.EmitLdc_I8(Op.Position);
|
||||
Context.EmitLdc_I4(Op.RawOpCode);
|
||||
|
||||
string MthdName = nameof(AThreadState.OnUndefined);
|
||||
|
||||
MethodInfo MthdInfo = typeof(AThreadState).GetMethod(MthdName, Binding);
|
||||
|
||||
Context.EmitCall(MthdInfo);
|
||||
Context.EmitPrivateCall(typeof(AThreadState), nameof(AThreadState.OnUndefined));
|
||||
|
||||
if (Context.CurrBlock.Next != null)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue