Statistics
| Branch: | Revision:

root / target-ppc / exec.h @ eaabeef2

History | View | Annotate | Download (1.3 kB)

1 79aceca5 bellard
/*
2 3fc6c082 bellard
 *  PowerPC emulation definitions for qemu.
3 5fafdf24 ths
 *
4 76a66253 j_mayer
 *  Copyright (c) 2003-2007 Jocelyn Mayer
5 79aceca5 bellard
 *
6 79aceca5 bellard
 * This library is free software; you can redistribute it and/or
7 79aceca5 bellard
 * modify it under the terms of the GNU Lesser General Public
8 79aceca5 bellard
 * License as published by the Free Software Foundation; either
9 79aceca5 bellard
 * version 2 of the License, or (at your option) any later version.
10 79aceca5 bellard
 *
11 79aceca5 bellard
 * This library is distributed in the hope that it will be useful,
12 79aceca5 bellard
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 79aceca5 bellard
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 79aceca5 bellard
 * Lesser General Public License for more details.
15 79aceca5 bellard
 *
16 79aceca5 bellard
 * You should have received a copy of the GNU Lesser General Public
17 8167ee88 Blue Swirl
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 79aceca5 bellard
 */
19 79aceca5 bellard
#if !defined (__PPC_H__)
20 79aceca5 bellard
#define __PPC_H__
21 79aceca5 bellard
22 fdabc366 bellard
#include "config.h"
23 fdabc366 bellard
24 79aceca5 bellard
#include "dyngen-exec.h"
25 79aceca5 bellard
26 76a66253 j_mayer
#include "cpu.h"
27 76a66253 j_mayer
#include "exec-all.h"
28 fdabc366 bellard
29 79aceca5 bellard
register struct CPUPPCState *env asm(AREG0);
30 79aceca5 bellard
31 9a64fbe4 bellard
#if !defined(CONFIG_USER_ONLY)
32 a9049a07 bellard
#include "softmmu_exec.h"
33 9a64fbe4 bellard
#endif /* !defined(CONFIG_USER_ONLY) */
34 79aceca5 bellard
35 636aa200 Blue Swirl
static inline int cpu_has_work(CPUState *env)
36 6a4955a8 aliguori
{
37 6a4955a8 aliguori
    return (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD));
38 6a4955a8 aliguori
}
39 6a4955a8 aliguori
40 6a4955a8 aliguori
41 10eb0cc0 Paolo Bonzini
static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
42 10eb0cc0 Paolo Bonzini
{
43 10eb0cc0 Paolo Bonzini
    env->nip = tb->pc;
44 10eb0cc0 Paolo Bonzini
}
45 10eb0cc0 Paolo Bonzini
46 79aceca5 bellard
#endif /* !defined (__PPC_H__) */