Esempio n. 1
0
        public static void Bx(ArmEmitterContext context)
        {
            IOpCode32BReg op = (IOpCode32BReg)context.CurrOp;

            context.StoreToContext();

            EmitBxWritePc(context, GetIntA32(context, op.Rm));
        }
Esempio n. 2
0
        public static void Bx(ILEmitterCtx context)
        {
            IOpCode32BReg op = (IOpCode32BReg)context.CurrOp;

            context.EmitStoreContext();

            EmitLoadFromRegister(context, op.Rm);

            EmitBxWritePc(context);
        }
Esempio n. 3
0
        public static void Blxr(ArmEmitterContext context)
        {
            IOpCode32BReg op = (IOpCode32BReg)context.CurrOp;

            uint pc = op.GetPc();

            Operand addr   = context.Copy(GetIntA32(context, op.Rm));
            Operand bitOne = context.BitwiseAnd(addr, Const(1));

            bool isThumb = IsThumb(context.CurrOp);

            uint currentPc = isThumb
                ? pc | 1
                : pc - 4;

            SetIntA32(context, GetBankedRegisterAlias(context.Mode, RegisterAlias.Aarch32Lr), Const(currentPc));

            SetFlag(context, PState.TFlag, bitOne);

            EmitVirtualCall(context, addr);
        }
Esempio n. 4
0
        public static void Blxr(ArmEmitterContext context)
        {
            IOpCode32BReg op = (IOpCode32BReg)context.CurrOp;

            uint pc = op.GetPc();

            Operand addr   = GetIntA32(context, op.Rm);
            Operand bitOne = context.BitwiseAnd(addr, Const(1));

            addr = context.BitwiseOr(addr, Const((int)CallFlag)); // Set call flag.

            bool isThumb = IsThumb(context.CurrOp);

            uint currentPc = isThumb
                ? pc | 1
                : pc - 4;

            SetIntA32(context, GetBankedRegisterAlias(context.Mode, RegisterAlias.Aarch32Lr), Const(currentPc));

            SetFlag(context, PState.TFlag, bitOne);

            context.Return(addr); // Call.
        }