MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / execI

Function execI

pcsx2/Interpreter.cpp:153–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153static void execI()
154{
155 // execI is called for every instruction so it must remains as light as possible.
156 // If you enable the next define, Interpreter will be much slower (around
157 // ~4fps on 3.9GHz Haswell vs ~8fps (even 10fps on dev build))
158 // Extra note: due to some cycle count issue PCSX2's internal debugger is
159 // not yet usable with the interpreter
160//#define EXTRA_DEBUG
161#if defined(EXTRA_DEBUG) || defined(PCSX2_DEVBUILD)
162 // check if any breakpoints or memchecks are triggered by this instruction
163 if (isBreakpointNeeded(cpuRegs.pc))
164 intBreakpoint(false);
165
166 intCheckMemcheck();
167
168 CBreakPoints::CommitClearSkipFirst(BREAKPOINT_EE);
169#endif
170
171 const u32 pc = cpuRegs.pc;
172 // We need to increase the pc before executing the memRead32. An exception could appears
173 // and it expects the PC counter to be pre-incremented
174 cpuRegs.pc += 4;
175
176 // interprete instruction
177 cpuRegs.code = memRead32( pc );
178
179 const OPCODE& opcode = GetCurrentInstruction();
180#if 0
181 static long int runs = 0;
182 //use this to find out what opcodes your game uses. very slow! (rama)
183 runs++;
184 //leave some time to startup the testgame
185 if (runs > 1599999999)
186 {
187 //find all opcodes beginning with "L"
188 if (opcode.Name[0] == 'L')
189 {
190 Console.WriteLn ("Load %s", opcode.Name);
191 }
192 }
193#endif
194
195#if 0
196 static long int print_me = 0;
197 // Based on cycle
198 // if ( cpuRegs.cycle > 0x4f24d714 )
199 // Or dump from a particular PC (useful to debug handler/syscall)
200 if (pc == 0x80000000)
201 {
202 print_me = 2000;
203 }
204 if (print_me)
205 {
206 print_me--;
207 disOut.clear();
208 disR5900Fasm(disOut, cpuRegs.code, pc);
209 CPU_LOG( disOut.c_str() );
210 }

Callers 3

_doBranch_sharedFunction · 0.70
intExecuteFunction · 0.70
intStepFunction · 0.70

Calls 7

isBreakpointNeededFunction · 0.85
intBreakpointFunction · 0.85
intCheckMemcheckFunction · 0.85
disR5900FasmFunction · 0.85
WriteLnMethod · 0.45
clearMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected