2003-09-30 20:36:07 +00:00
|
|
|
#ifndef EXEC_SPARC_H
|
|
|
|
#define EXEC_SPARC_H 1
|
2005-07-02 14:31:34 +00:00
|
|
|
#include "config.h"
|
2007-03-19 14:47:40 +00:00
|
|
|
#include "dyngen-exec.h"
|
2003-09-30 20:36:07 +00:00
|
|
|
|
|
|
|
register struct CPUSPARCState *env asm(AREG0);
|
2005-07-02 14:31:34 +00:00
|
|
|
|
2003-09-30 20:36:07 +00:00
|
|
|
#include "cpu.h"
|
|
|
|
#include "exec-all.h"
|
|
|
|
|
2010-05-03 11:29:44 +04:00
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
|
|
|
#include "softmmu_exec.h"
|
|
|
|
#endif /* !defined(CONFIG_USER_ONLY) */
|
|
|
|
|
2008-08-29 20:50:21 +00:00
|
|
|
/* op_helper.c */
|
2008-05-27 17:35:30 +00:00
|
|
|
void do_interrupt(CPUState *env);
|
2005-02-07 23:10:53 +00:00
|
|
|
|
2009-04-24 18:03:20 +00:00
|
|
|
static inline int cpu_has_work(CPUState *env1)
|
|
|
|
{
|
|
|
|
return (env1->interrupt_request & CPU_INTERRUPT_HARD) &&
|
2009-07-12 12:35:31 +04:00
|
|
|
cpu_interrupts_enabled(env1);
|
2009-04-24 18:03:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-05-10 10:12:00 +00:00
|
|
|
static inline int cpu_halted(CPUState *env1) {
|
|
|
|
if (!env1->halted)
|
2007-06-03 17:44:37 +00:00
|
|
|
return 0;
|
2009-04-24 18:03:20 +00:00
|
|
|
if (cpu_has_work(env1)) {
|
2008-05-10 10:12:00 +00:00
|
|
|
env1->halted = 0;
|
2007-06-03 17:44:37 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return EXCP_HALTED;
|
|
|
|
}
|
|
|
|
|
2010-06-29 09:58:50 +02:00
|
|
|
static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
|
|
|
|
{
|
|
|
|
env->pc = tb->pc;
|
|
|
|
env->npc = tb->cs_base;
|
|
|
|
}
|
|
|
|
|
2003-09-30 20:36:07 +00:00
|
|
|
#endif
|