Exemple #1
0
 protected VfpuRuntimeRegister(CpuEmitter cpuEmitter, VReg vReg, VType vType, int vectorSize)
 {
     Pc          = cpuEmitter._pc;
     Instruction = cpuEmitter._instruction;
     VReg        = vReg;
     VType       = vType;
     VectorSize  = (vectorSize == 0) ? Instruction.OneTwo : vectorSize;
 }
			internal InternalFunctionCompiler(CpuProcessor CpuProcessor, MipsMethodEmitter MipsMethodEmiter, DynarecFunctionCompiler DynarecFunctionCompiler, IInstructionReader InstructionReader, Action<uint> _ExploreNewPcCallback, uint EntryPC, bool DoLog)
			{
				this._ExploreNewPcCallback = _ExploreNewPcCallback;
				this.CpuEmitter = new CpuEmitter(MipsMethodEmiter, InstructionReader, CpuProcessor);
				this.MipsMethodEmitter = MipsMethodEmiter;
				this.GlobalInstructionStats = CpuProcessor.GlobalInstructionStats;
				this.InstructionStats = MipsMethodEmiter.InstructionStats;
				this.NewInstruction = new Dictionary<string, bool>();
				this.DoLog = DoLog;

				this.CpuProcessor = CpuProcessor;
				this.DynarecFunctionCompiler = DynarecFunctionCompiler;
				this.InstructionReader = InstructionReader;
				this.EntryPC = EntryPC;
			}
            internal InternalFunctionCompiler(InjectContext InjectContext, MipsMethodEmitter MipsMethodEmitter, DynarecFunctionCompiler DynarecFunctionCompiler, IInstructionReader InstructionReader, Action<uint> _ExploreNewPcCallback, uint EntryPC, bool DoLog)
            {
                InjectContext.InjectDependencesTo(this);
                this._ExploreNewPcCallback = _ExploreNewPcCallback;
                this.MipsMethodEmitter = MipsMethodEmitter;
                this.CpuEmitter = new CpuEmitter(InjectContext, MipsMethodEmitter, InstructionReader);
                this.GlobalInstructionStats = CpuProcessor.GlobalInstructionStats;
                //this.InstructionStats = MipsMethodEmitter.InstructionStats;
                this.InstructionStats = new Dictionary<string, uint>();
                this.NewInstruction = new Dictionary<string, bool>();
                this.DoLog = DoLog;

                this.DynarecFunctionCompiler = DynarecFunctionCompiler;
                this.InstructionReader = InstructionReader;
                this.EntryPC = EntryPC;

                if (!PspMemory.IsAddressValid(EntryPC))
                {
                    throw (new InvalidOperationException(String.Format("Trying to get invalid function 0x{0:X8}", EntryPC)));
                }
            }
Exemple #4
0
 public VfpuMatrix(CpuEmitter cpuEmitter, VReg vReg, VType vType, int vectorSize)
     : base(cpuEmitter, vReg, vType, vectorSize)
 {
     _indices = VfpuUtils.GetIndicesMatrix(this.VectorSize, vReg.Reg);
 }
Exemple #5
0
 public VfpuVector(CpuEmitter cpuEmitter, VReg vReg, VType vType, int vectorSize)
     : base(cpuEmitter, vReg, vType, vectorSize)
 {
     _indices = VfpuUtils.GetIndicesVector(VectorSize, vReg.Reg);
 }
Exemple #6
0
 public VfpuCell(CpuEmitter cpuEmitter, VReg vReg, VType vType)
     : base(cpuEmitter, vReg, vType, 1)
 {
     _index = VfpuUtils.GetIndexCell(vReg.Reg);
 }