Beispiel #1
0
        public static uint _mfvc_impl(CpuThreadState cpuThreadState, VfpuControlRegistersEnum vfpuControlRegister)
        {
            Console.Error.WriteLine("Warning: _mfvc_impl");
            switch (vfpuControlRegister)
            {
            case VfpuControlRegistersEnum.VfpuPfxs: return(cpuThreadState.PrefixSource.Value);

            case VfpuControlRegistersEnum.VfpuPfxt: return(cpuThreadState.PrefixTarget.Value);

            case VfpuControlRegistersEnum.VfpuPfxd: return(cpuThreadState.PrefixDestination.Value);

            case VfpuControlRegistersEnum.VfpuCc: return(cpuThreadState.VfrCcValue);

            case VfpuControlRegistersEnum.VfpuRcx0:
                return((uint)MathFloat.ReinterpretFloatAsInt((float)new Random().NextDouble()));

            case VfpuControlRegistersEnum.VfpuRcx1:
            case VfpuControlRegistersEnum.VfpuRcx2:
            case VfpuControlRegistersEnum.VfpuRcx3:
            case VfpuControlRegistersEnum.VfpuRcx4:
            case VfpuControlRegistersEnum.VfpuRcx5:
            case VfpuControlRegistersEnum.VfpuRcx6:
            case VfpuControlRegistersEnum.VfpuRcx7:
                return((uint)MathFloat.ReinterpretFloatAsInt(1.0f));

            default:
                throw new NotImplementedException("_mfvc_impl: " + vfpuControlRegister);
            }
        }
 public static uint _mfvc_impl(VfpuControlRegistersEnum VfpuControlRegister)
 {
     switch (VfpuControlRegister)
     {
         default:
             throw (new NotImplementedException("_mfvc_impl: " + VfpuControlRegister));
     }
     //return 0;
 }
Beispiel #3
0
        public static void _mtvc_impl(CpuThreadState cpuThreadState, VfpuControlRegistersEnum vfpuControlRegister,
                                      uint value)
        {
            Console.Error.WriteLine("Warning: _mtvc_impl");
            switch (vfpuControlRegister)
            {
            case VfpuControlRegistersEnum.VfpuPfxs:
                cpuThreadState.PrefixSource.Value = value;
                return;

            case VfpuControlRegistersEnum.VfpuPfxt:
                cpuThreadState.PrefixTarget.Value = value;
                return;

            case VfpuControlRegistersEnum.VfpuPfxd:
                cpuThreadState.PrefixDestination.Value = value;
                return;

            case VfpuControlRegistersEnum.VfpuCc:
                cpuThreadState.VfrCcValue = value;
                return;

            case VfpuControlRegistersEnum.VfpuRcx0:
                new Random((int)value);
                return;

            case VfpuControlRegistersEnum.VfpuRcx1:
            case VfpuControlRegistersEnum.VfpuRcx2:
            case VfpuControlRegistersEnum.VfpuRcx3:
            case VfpuControlRegistersEnum.VfpuRcx4:
            case VfpuControlRegistersEnum.VfpuRcx5:
            case VfpuControlRegistersEnum.VfpuRcx6:
            case VfpuControlRegistersEnum.VfpuRcx7:
                //(uint)MathFloat.ReinterpretFloatAsInt(1.0f) = Value;
                return;

            default:
                throw new NotImplementedException("_mtvc_impl: " + vfpuControlRegister);
            }
        }
		public static uint _mfvc_impl(CpuThreadState CpuThreadState, VfpuControlRegistersEnum VfpuControlRegister)
		{
			throw(new NotImplementedException());
			//switch (VfpuControlRegister)
			//{
			//	case VfpuControlRegistersEnum.VFPU_PFXS: return CpuThreadState.PrefixSource.Value;
			//	case VfpuControlRegistersEnum.VFPU_PFXT: return CpuThreadState.PrefixTarget.Value;
			//	case VfpuControlRegistersEnum.VFPU_PFXD: return CpuThreadState.PrefixDestination.Value;
			//	case VfpuControlRegistersEnum.VFPU_CC: return CpuThreadState.VFR_CC_Value;
			//	case VfpuControlRegistersEnum.VFPU_RCX0: return (uint)MathFloat.ReinterpretFloatAsInt((float)(new Random().NextDouble()));
			//	case VfpuControlRegistersEnum.VFPU_RCX1:
			//	case VfpuControlRegistersEnum.VFPU_RCX2:
			//	case VfpuControlRegistersEnum.VFPU_RCX3:
			//	case VfpuControlRegistersEnum.VFPU_RCX4:
			//	case VfpuControlRegistersEnum.VFPU_RCX5:
			//	case VfpuControlRegistersEnum.VFPU_RCX6:
			//	case VfpuControlRegistersEnum.VFPU_RCX7:
			//		return (uint)MathFloat.ReinterpretFloatAsInt(1.0f);
			//	default:
			//		throw (new NotImplementedException("_mfvc_impl: " + VfpuControlRegister));
			//}
		}
Beispiel #5
0
 public static void _mtvc_impl(CpuThreadState CpuThreadState, VfpuControlRegistersEnum VfpuControlRegister, uint Value)
 {
     Console.Error.WriteLine("Warning: _mtvc_impl");
     switch (VfpuControlRegister)
     {
         case VfpuControlRegistersEnum.VFPU_PFXS: CpuThreadState.PrefixSource.Value = Value; return;
         case VfpuControlRegistersEnum.VFPU_PFXT: CpuThreadState.PrefixTarget.Value = Value; return;
         case VfpuControlRegistersEnum.VFPU_PFXD: CpuThreadState.PrefixDestination.Value = Value; return;
         case VfpuControlRegistersEnum.VFPU_CC: CpuThreadState.VFR_CC_Value = Value; return;
         case VfpuControlRegistersEnum.VFPU_RCX0: new Random((int)Value); return;
         case VfpuControlRegistersEnum.VFPU_RCX1:
         case VfpuControlRegistersEnum.VFPU_RCX2:
         case VfpuControlRegistersEnum.VFPU_RCX3:
         case VfpuControlRegistersEnum.VFPU_RCX4:
         case VfpuControlRegistersEnum.VFPU_RCX5:
         case VfpuControlRegistersEnum.VFPU_RCX6:
         case VfpuControlRegistersEnum.VFPU_RCX7:
             //(uint)MathFloat.ReinterpretFloatAsInt(1.0f) = Value;
             return;
         default:
             throw (new NotImplementedException("_mtvc_impl: " + VfpuControlRegister));
     }
 }
Beispiel #6
0
 public static uint _mfvc_impl(CpuThreadState CpuThreadState, VfpuControlRegistersEnum VfpuControlRegister)
 {
     Console.Error.WriteLine("Warning: _mfvc_impl");
     switch (VfpuControlRegister)
     {
         case VfpuControlRegistersEnum.VFPU_PFXS: return CpuThreadState.PrefixSource.Value;
         case VfpuControlRegistersEnum.VFPU_PFXT: return CpuThreadState.PrefixTarget.Value;
         case VfpuControlRegistersEnum.VFPU_PFXD: return CpuThreadState.PrefixDestination.Value;
         case VfpuControlRegistersEnum.VFPU_CC: return CpuThreadState.VFR_CC_Value;
         case VfpuControlRegistersEnum.VFPU_RCX0: return (uint)MathFloat.ReinterpretFloatAsInt((float)(new Random().NextDouble()));
         case VfpuControlRegistersEnum.VFPU_RCX1:
         case VfpuControlRegistersEnum.VFPU_RCX2:
         case VfpuControlRegistersEnum.VFPU_RCX3:
         case VfpuControlRegistersEnum.VFPU_RCX4:
         case VfpuControlRegistersEnum.VFPU_RCX5:
         case VfpuControlRegistersEnum.VFPU_RCX6:
         case VfpuControlRegistersEnum.VFPU_RCX7:
             return (uint)MathFloat.ReinterpretFloatAsInt(1.0f);
         default:
             throw (new NotImplementedException("_mfvc_impl: " + VfpuControlRegister));
     }
 }