]> git.proxmox.com Git - qemu.git/blame - target-unicore32/exec.h
Move cpu_has_work and cpu_pc_from_tb to cpu.h
[qemu.git] / target-unicore32 / exec.h
CommitLineData
6e64da3c
GX
1/*
2 * UniCore32 execution defines
3 *
4 * Copyright (C) 2010-2011 GUAN Xue-tao
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __UC32_EXEC_H__
11#define __UC32_EXEC_H__
12
13#include "config.h"
14#include "dyngen-exec.h"
15
16register struct CPUState_UniCore32 *env asm(AREG0);
17
18#include "cpu.h"
19#include "exec-all.h"
20
21static inline void env_to_regs(void)
22{
23}
24
25static inline void regs_to_env(void)
26{
27}
28
6e64da3c
GX
29static inline int cpu_halted(CPUState *env)
30{
31 if (!env->halted) {
32 return 0;
33 }
34 /* An interrupt wakes the CPU even if the I and R ASR bits are
35 set. We use EXITTB to silently wake CPU without causing an
36 actual interrupt. */
37 if (cpu_has_work(env)) {
38 env->halted = 0;
39 return 0;
40 }
41 return EXCP_HALTED;
42}
43
44#endif /* __UC32_EXEC_H__ */