From e67768d0f13c78144f17bcca8a64b9b812918198 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sun, 15 May 2011 16:11:04 +0000 Subject: sparc: move do_interrupt to helper.c do_interrupt() was mixing CPUState pointer passed from caller and global env (AREG0). Fix by moving the function to helper.c. Introduce a helper for calling change_pstate() safely from outside of execution context. Signed-off-by: Blue Swirl --- target-sparc/cpu.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'target-sparc/cpu.h') diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index a220bf497d..94321f8392 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -476,6 +476,7 @@ target_ulong cpu_get_ccr(CPUState *env1); void cpu_put_ccr(CPUState *env1, target_ulong val); target_ulong cpu_get_cwp64(CPUState *env1); void cpu_put_cwp64(CPUState *env1, int cwp); +void cpu_change_pstate(CPUState *env1, uint32_t new_pstate); #endif int cpu_cwp_inc(CPUState *env1, int cwp); int cpu_cwp_dec(CPUState *env1, int cwp); @@ -658,4 +659,7 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, #endif } +/* helper.c */ +void do_interrupt(CPUState *env); + #endif -- cgit v1.2.1