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>
This commit is contained in:
Blue Swirl 2011-05-15 16:11:04 +00:00
parent fa3c9559db
commit e67768d0f1
4 changed files with 256 additions and 242 deletions

View file

@ -13,8 +13,6 @@ register struct CPUSPARCState *env asm(AREG0);
#endif /* !defined(CONFIG_USER_ONLY) */
/* op_helper.c */
void do_interrupt(CPUState *env);
static inline int cpu_has_work(CPUState *env1)
{
return (env1->interrupt_request & CPU_INTERRUPT_HARD) &&