diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-05-15 16:11:04 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-06-26 18:25:17 +0000 |
commit | e67768d0f13c78144f17bcca8a64b9b812918198 (patch) | |
tree | 8f43dd971ebde9ad16e51a609f2f972e1a154642 /target-sparc/cpu.h | |
parent | fa3c9559dbb102340cd1e0b1428e192fed4b0ee3 (diff) | |
download | hqemu-e67768d0f13c78144f17bcca8a64b9b812918198.zip hqemu-e67768d0f13c78144f17bcca8a64b9b812918198.tar.gz |
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 <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r-- | target-sparc/cpu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index a220bf4..94321f8 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 |