コード例 #1
0
ファイル: InstEmitException.cs プロジェクト: venhow/Ryujinx
        private static void EmitExceptionCall(ArmEmitterContext context, string name)
        {
            OpCodeException op = (OpCodeException)context.CurrOp;

            context.StoreToContext();

            context.Call(typeof(NativeInterface).GetMethod(name), Const(op.Address), Const(op.Id));

            context.LoadFromContext();
        }
コード例 #2
0
        public static void Brk(ArmEmitterContext context)
        {
            OpCodeException op = (OpCodeException)context.CurrOp;

            string name = nameof(NativeInterface.Break);

            context.StoreToContext();

            context.Call(typeof(NativeInterface).GetMethod(name), Const(op.Address), Const(op.Id));

            context.LoadFromContext();

            context.Return(Const(op.Address));
        }
コード例 #3
0
        public static void Svc(ArmEmitterContext context)
        {
            OpCodeException op = (OpCodeException)context.CurrOp;

            string name = nameof(NativeInterface.SupervisorCall);

            context.StoreToContext();

            context.Call(typeof(NativeInterface).GetMethod(name), Const(op.Address), Const(op.Id));

            context.LoadFromContext();

            Translator.EmitSynchronization(context);
        }
コード例 #4
0
        private static void EmitExceptionCall(ArmEmitterContext context, _Void_U64_S32 func)
        {
            OpCodeException op = (OpCodeException)context.CurrOp;

            context.StoreToContext();

            context.Call(func, Const(op.Address), Const(op.Id));

            context.LoadFromContext();

            if (context.CurrBlock.Next == null)
            {
                EmitTailContinue(context, Const(op.Address + 4));
            }
        }