Core/Memory: Give every emulated thread it's own TLS area.

The TLS area for thread T with id Ti is located at TLS_AREA_VADDR + (Ti - 1) * 0x200.
This allows some games like Mario Kart 7 to continue further.
This commit is contained in:
Subv
2015-05-10 18:35:37 -05:00
parent ba0bfe7d82
commit 000876858d
8 changed files with 31 additions and 11 deletions

View File

@ -99,8 +99,9 @@ public:
* @param stack_top Pointer to the top of the stack
* @param entry_point Entry point for execution
* @param arg User argument for thread
* @param tls_address Address of the Thread Local Storage for the thread
*/
virtual void ResetContext(Core::ThreadContext& context, u32 stack_top, u32 entry_point, u32 arg) = 0;
virtual void ResetContext(Core::ThreadContext& context, u32 stack_top, u32 entry_point, u32 arg, u32 tls_address) = 0;
/**
* Saves the current CPU context