コード例 #1
0
 internal void DataOpHandleSetFlagsAWC_NonCMP(uint opcode, uint Rd, AWCResult awcResult)
 {
     if (Rd == GeneralPurposeRegisters.PCRegisterIndex)
     {
         CPSR.RestoreCPUMode();
     }
     else
     {
         DataOpHandleSetFlagsAWC_CMP(opcode, Rd, awcResult);
     }
 }
コード例 #2
0
        internal InstructionFunc GenerateAWCDataOp(DataOpEvaluateOperand2Func EvaluateOperand2, DataOpAWCOperation AWCOp, DataOpSaveResultFunc SaveResult, DataOpHandleSetFlagsAWCFunc SetFlags)
        {
            return(delegate(uint opcode)
            {
                uint Rd = ((opcode & rd_mask) >> 12);
                uint Rn = ((opcode & rn_mask) >> 16);
                uint a = get_reg(Rn);

                bool shift_carry = false;
                uint b = EvaluateOperand2(opcode, ref shift_carry);

                AWCResult awcResult = AWCOp(a, b);
                SaveResult(Rd, awcResult.result);
                SetFlags(opcode, Rd, awcResult);
                return 1;
            });
        }
コード例 #3
0
 internal void DataOpHandleSetFlagsAWC_CMP(uint opcode, uint Rd, AWCResult awcResult)
 {
     //The CPSR is set the same way for all AWC-based instructions (the only difference
     //is the input to AWC).
     CPSR.set_NZCV((awcResult.result & 0x80000000) != 0, awcResult.result == 0, awcResult.carry_out, awcResult.overflow);
 }
コード例 #4
0
 internal void DataOpHandleSetFlagsAWC_NOP(uint opcode, uint Rd, AWCResult awcResult)
 {
 }