0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx/Cpu/Instruction/AInstEmitException.cs
2018-02-04 20:08:20 -03:00

33 lines
No EOL
851 B
C#

using ChocolArm64.Decoder;
using ChocolArm64.State;
using ChocolArm64.Translation;
using System;
namespace ChocolArm64.Instruction
{
static partial class AInstEmit
{
public static void Svc(AILEmitterCtx Context)
{
AOpCodeException Op = (AOpCodeException)Context.CurrOp;
Context.EmitStoreState();
Context.EmitLdarg(ATranslatedSub.RegistersArgIdx);
Context.EmitLdc_I4(Op.Id);
Context.EmitCall(typeof(ARegisters), nameof(ARegisters.OnSvcCall));
if (Context.CurrBlock.Next != null)
{
Context.EmitLoadState(Context.CurrBlock.Next);
}
}
public static void Und(AILEmitterCtx Context)
{
throw new Exception("und inst! " + Context.CurrOp.Position.ToString("x8"));
}
}
}