PCSX2 Documentation/PCSX2 EE Recompiler: Difference between revisions

Line 114: Line 114:


=== Dispatcher ===
=== Dispatcher ===
PCSX2 contains various dispatchers for the EE recompiler but also for others recompiler. Dispatchers are small ASM code generated by hand. They serve 2 purposes:
# Wrapper to call a C++ function from the recompiler
# Add some glues between recompiler block
==== DispatcherReg ====
* Generated by '''_DynGen_DispatcherReg'''
* High-Level Description
# Compute the address of BASEBLOCK related to the current PC. It is equivalent to "'''bb = PC_GETBLOCK(cpuRegs.pc)'''"
# Jump to the related function pointer. It is equivalent to "'''bb->m_pFnptr()'''"
==== JITCompile ====
* Generated by '''_DynGen_JITCompile'''
==== JITCompileInBlock ====
* Generated by '''_DynGen_JITCompileInBlock'''
==== EnterRecompiledCode ====
* Generated by '''_DynGen_EnterRecompiledCode'''
==== DispatchBlockDiscard ====
* Generated by  '''_DynGen_DispatchBlockDiscard'''
==== DispatchPageReset ====
* Generated by  '''_DynGen_DispatchPageReset'''
==== _DynGen_DispatcherReg ====
* Generated by  '''_DynGen_DispatcherReg'''
==== EventTest ====
* xCALL( recEventTest ) (TODO clean the code to add a function)


=== Compilation ===
=== Compilation ===
ninja
56

edits