mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	Move ThreadContext to core/core.h and deal with the fallout
This commit is contained in:
		
							parent
							
								
									d46f650036
								
							
						
					
					
						commit
						7b3452c730
					
				
					 18 changed files with 53 additions and 32 deletions
				
			
		| 
						 | 
				
			
			@ -9,6 +9,7 @@
 | 
			
		|||
#include "core/arm/dyncom/arm_dyncom.h"
 | 
			
		||||
#include "core/arm/dyncom/arm_dyncom_interpreter.h"
 | 
			
		||||
 | 
			
		||||
#include "core/core.h"
 | 
			
		||||
#include "core/core_timing.h"
 | 
			
		||||
 | 
			
		||||
const static cpu_config_t s_arm11_cpu_info = {
 | 
			
		||||
| 
						 | 
				
			
			@ -94,7 +95,7 @@ void ARM_DynCom::ExecuteInstructions(int num_instructions) {
 | 
			
		|||
    AddTicks(ticks_executed);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ARM_DynCom::SaveContext(ThreadContext& ctx) {
 | 
			
		||||
void ARM_DynCom::SaveContext(Core::ThreadContext& ctx) {
 | 
			
		||||
    memcpy(ctx.cpu_registers, state->Reg, sizeof(ctx.cpu_registers));
 | 
			
		||||
    memcpy(ctx.fpu_registers, state->ExtReg, sizeof(ctx.fpu_registers));
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -110,7 +111,7 @@ void ARM_DynCom::SaveContext(ThreadContext& ctx) {
 | 
			
		|||
    ctx.mode = state->NextInstr;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ARM_DynCom::LoadContext(const ThreadContext& ctx) {
 | 
			
		||||
void ARM_DynCom::LoadContext(const Core::ThreadContext& ctx) {
 | 
			
		||||
    memcpy(state->Reg, ctx.cpu_registers, sizeof(ctx.cpu_registers));
 | 
			
		||||
    memcpy(state->ExtReg, ctx.fpu_registers, sizeof(ctx.fpu_registers));
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,13 +71,13 @@ public:
 | 
			
		|||
     * Saves the current CPU context
 | 
			
		||||
     * @param ctx Thread context to save
 | 
			
		||||
     */
 | 
			
		||||
    void SaveContext(ThreadContext& ctx) override;
 | 
			
		||||
    void SaveContext(Core::ThreadContext& ctx) override;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Loads a CPU context
 | 
			
		||||
     * @param ctx Thread context to load
 | 
			
		||||
     */
 | 
			
		||||
    void LoadContext(const ThreadContext& ctx) override;
 | 
			
		||||
    void LoadContext(const Core::ThreadContext& ctx) override;
 | 
			
		||||
 | 
			
		||||
    /// Prepare core for thread reschedule (if needed to correctly handle state)
 | 
			
		||||
    void PrepareReschedule() override;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue