Statistics
| Branch: | Revision:

root / target-sparc / exec.h @ a88790a1

History | View | Annotate | Download (812 Bytes)

1 7a3f1944 bellard
#ifndef EXEC_SPARC_H
2 7a3f1944 bellard
#define EXEC_SPARC_H 1
3 3475187d bellard
#include "config.h"
4 8294eba1 ths
#include "dyngen-exec.h"
5 7a3f1944 bellard
6 7a3f1944 bellard
register struct CPUSPARCState *env asm(AREG0);
7 3475187d bellard
8 7a3f1944 bellard
#include "cpu.h"
9 7a3f1944 bellard
#include "exec-all.h"
10 7a3f1944 bellard
11 2065061e Igor V. Kovalenko
#if !defined(CONFIG_USER_ONLY)
12 2065061e Igor V. Kovalenko
#include "softmmu_exec.h"
13 2065061e Igor V. Kovalenko
#endif /* !defined(CONFIG_USER_ONLY) */
14 2065061e Igor V. Kovalenko
15 91736d37 blueswir1
/* op_helper.c */
16 f2bc7e7f blueswir1
void do_interrupt(CPUState *env);
17 9d893301 bellard
18 6a4955a8 aliguori
static inline int cpu_has_work(CPUState *env1)
19 6a4955a8 aliguori
{
20 6a4955a8 aliguori
    return (env1->interrupt_request & CPU_INTERRUPT_HARD) &&
21 5210977a Igor Kovalenko
           cpu_interrupts_enabled(env1);
22 6a4955a8 aliguori
}
23 6a4955a8 aliguori
24 6a4955a8 aliguori
25 22548760 blueswir1
static inline int cpu_halted(CPUState *env1) {
26 22548760 blueswir1
    if (!env1->halted)
27 bfed01fc ths
        return 0;
28 6a4955a8 aliguori
    if (cpu_has_work(env1)) {
29 22548760 blueswir1
        env1->halted = 0;
30 bfed01fc ths
        return 0;
31 bfed01fc ths
    }
32 bfed01fc ths
    return EXCP_HALTED;
33 bfed01fc ths
}
34 bfed01fc ths
35 10eb0cc0 Paolo Bonzini
static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
36 10eb0cc0 Paolo Bonzini
{
37 10eb0cc0 Paolo Bonzini
    env->pc = tb->pc;
38 10eb0cc0 Paolo Bonzini
    env->npc = tb->cs_base;
39 10eb0cc0 Paolo Bonzini
}
40 10eb0cc0 Paolo Bonzini
41 7a3f1944 bellard
#endif