コード例 #1
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(InstEmit32Helper.GetRegisterAlias(context.Mode, register));
            }
        }
コード例 #2
0
 public static void EmitAluLoadRm(ILEmitterCtx context)
 {
     if (context.CurrOp is IOpCodeAluRs64 op)
     {
         context.EmitLdintzr(op.Rm);
     }
     else if (context.CurrOp is OpCode32AluRsImm op32)
     {
         InstEmit32Helper.EmitLoadFromRegister(context, op32.Rm);
     }
     else
     {
         throw new InvalidOperationException();
     }
 }
コード例 #3
0
 public static void EmitAluLoadRn(ILEmitterCtx context)
 {
     if (context.CurrOp is IOpCodeAlu64 op)
     {
         if (op.DataOp == DataOp.Logical || op is IOpCodeAluRs64)
         {
             context.EmitLdintzr(op.Rn);
         }
         else
         {
             context.EmitLdint(op.Rn);
         }
     }
     else if (context.CurrOp is IOpCode32Alu op32)
     {
         InstEmit32Helper.EmitLoadFromRegister(context, op32.Rn);
     }
     else
     {
         throw new InvalidOperationException();
     }
 }