MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / Execute

Method Execute

Source/DynaRec/Fragment.cpp:163–202  ·  view source on GitHub ↗

This is the second place where most of the CPU time is spent % cumulative self self total time seconds seconds calls s/call s/call name 5.33 25.96 3.49 557781 0.00 0.00 CFragment::Execute()

Source from the content-addressed store, hash-verified

161// time seconds seconds calls s/call s/call name
162// 5.33 25.96 3.49 557781 0.00 0.00 CFragment::Execute()
163void CFragment::Execute()
164{
165 #ifdef DAEDALUS_ENABLE_DYNAREC_PROFILE
166 DAEDALUS_PROFILE( "CFragment::Execute" );
167
168 SYNCH_POINT( DAED_SYNC_FRAGMENT_PC, gCPUState.CurrentPC + gCPUState.Delay, "Program Counter/Delay doesn't match on entry to fragment" );
169 DAEDALUS_ASSERT( gCPUState.Delay == NO_DELAY, "Why are we entering with a delay slot active?" );
170#endif
171#ifdef FRAGMENT_SIMULATE_EXECUTION
172
173 CFragment * p_fragment( this );
174
175 while( p_fragment != nullptr )
176 {
177 CFragment * next = p_fragment->Simulate();
178
179#ifdef DAEDALUS_ENABLE_ASSERTS
180 DAEDALUS_ASSERT( next == nullptr || gCPUState.Delay == NO_DELAY, "Why are we entering with a delay slot active?" );
181#endif
182 p_fragment = next;
183 }
184
185#else
186 const void * p( g_pu8RamBase_8000 );
187 u32 upper( 0x80000000 + gRamSize );
188
189 _EnterDynaRec( mEntryPoint.GetTarget(), &gCPUState, p, upper );
190#endif // FRAGMENT_SIMULATE_EXECUTION
191
192#ifdef DAEDALUS_DEBUG_DYNAREC
193 SYNCH_POINT( DAED_SYNC_FRAGMENT_PC, gCPUState.CurrentPC + gCPUState.Delay, "Program Counter/Delay doesn't match on exit from fragment" );
194#endif
195 //if(gCPUState.Delay != NO_DELAY)
196 //{
197 // SYNCH_POINT( DAED_SYNC_FRAGMENT_PC, gCPUState.TargetPC, "New Program Counter doesn't match on exit from fragment" );
198 //}
199
200 // We have to do this when we exit to make sure the cached read pointer is updated correctly
201 CPU_SetPC( gCPUState.CurrentPC );
202}
203//*************************************************************************************
204//
205//*************************************************************************************

Callers 1

Dynamo.cppFile · 0.80

Calls 4

_EnterDynaRecFunction · 0.85
CPU_SetPCFunction · 0.85
SimulateMethod · 0.80
GetTargetMethod · 0.80

Tested by

no test coverage detected