Пример #1
0
        public static Operand GetIntA32(ArmEmitterContext context, int regIndex)
        {
            if (regIndex == RegisterAlias.Aarch32Pc)
            {
                OpCode32 op = (OpCode32)context.CurrOp;

                return(Const((int)op.GetPc()));
            }
            else
            {
                return(GetIntOrSP(context, GetRegisterAlias(context.Mode, regIndex)));
            }
        }
Пример #2
0
        public static Operand GetIntA32AlignedPC(ArmEmitterContext context, int regIndex)
        {
            if (regIndex == RegisterAlias.Aarch32Pc)
            {
                OpCode32 op = (OpCode32)context.CurrOp;

                return(Const((int)(op.GetPc() & 0xfffffffc)));
            }
            else
            {
                return(Register(GetRegisterAlias(context.Mode, regIndex), RegisterType.Integer, OperandType.I32));
            }
        }
Пример #3
0
        public static void EmitLoadFromRegister(ILEmitterCtx context, int register)
        {
            if (register == RegisterAlias.Aarch32Pc)
            {
                OpCode32 op = (OpCode32)context.CurrOp;

                context.EmitLdc_I4((int)op.GetPc());
            }
            else
            {
                context.EmitLdint(GetRegisterAlias(context.Mode, register));
            }
        }