2003-09-30 22:36:07 +02:00
|
|
|
#ifndef EXEC_SPARC_H
|
|
|
|
#define EXEC_SPARC_H 1
|
2005-07-02 16:31:34 +02:00
|
|
|
#include "config.h"
|
2007-03-19 15:47:40 +01:00
|
|
|
#include "dyngen-exec.h"
|
2003-09-30 22:36:07 +02:00
|
|
|
|
|
|
|
register struct CPUSPARCState *env asm(AREG0);
|
2005-07-02 16:31:34 +02:00
|
|
|
|
2004-09-30 23:55:55 +02:00
|
|
|
#define DT0 (env->dt0)
|
|
|
|
#define DT1 (env->dt1)
|
2007-11-25 19:40:20 +01:00
|
|
|
#define QT0 (env->qt0)
|
|
|
|
#define QT1 (env->qt1)
|
2003-09-30 22:36:07 +02:00
|
|
|
|
|
|
|
#include "cpu.h"
|
|
|
|
#include "exec-all.h"
|
|
|
|
|
2004-10-13 00:01:28 +02:00
|
|
|
static inline void env_to_regs(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void regs_to_env(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-08-29 22:50:21 +02:00
|
|
|
/* op_helper.c */
|
2008-05-27 19:35:30 +02:00
|
|
|
void do_interrupt(CPUState *env);
|
2005-02-08 00:10:53 +01:00
|
|
|
|
2009-04-24 20:03:20 +02:00
|
|
|
static inline int cpu_has_work(CPUState *env1)
|
|
|
|
{
|
|
|
|
return (env1->interrupt_request & CPU_INTERRUPT_HARD) &&
|
|
|
|
(env1->psret != 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-05-10 12:12:00 +02:00
|
|
|
static inline int cpu_halted(CPUState *env1) {
|
|
|
|
if (!env1->halted)
|
2007-06-03 19:44:37 +02:00
|
|
|
return 0;
|
2009-04-24 20:03:20 +02:00
|
|
|
if (cpu_has_work(env1)) {
|
2008-05-10 12:12:00 +02:00
|
|
|
env1->halted = 0;
|
2007-06-03 19:44:37 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return EXCP_HALTED;
|
|
|
|
}
|
|
|
|
|
2003-09-30 22:36:07 +02:00
|
|
|
#endif
|