root / target-ppc / exec.h @ d445bde7
History | View | Annotate | Download (1.6 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 | 79aceca5 | bellard | * License along with this library; if not, write to the Free Software
|
18 | 79aceca5 | bellard | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19 | 79aceca5 | bellard | */
|
20 | 79aceca5 | bellard | #if !defined (__PPC_H__)
|
21 | 79aceca5 | bellard | #define __PPC_H__
|
22 | 79aceca5 | bellard | |
23 | fdabc366 | bellard | #include "config.h" |
24 | fdabc366 | bellard | |
25 | 79aceca5 | bellard | #include "dyngen-exec.h" |
26 | 79aceca5 | bellard | |
27 | 76a66253 | j_mayer | #include "cpu.h" |
28 | 76a66253 | j_mayer | #include "exec-all.h" |
29 | fdabc366 | bellard | |
30 | 1cdb9c3d | aurel32 | /* For normal operations, precise emulation should not be needed */
|
31 | 1cdb9c3d | aurel32 | //#define USE_PRECISE_EMULATION 1
|
32 | 196e3422 | aurel32 | #define USE_PRECISE_EMULATION 1 |
33 | 1cdb9c3d | aurel32 | |
34 | 79aceca5 | bellard | register struct CPUPPCState *env asm(AREG0); |
35 | 79aceca5 | bellard | |
36 | 9a64fbe4 | bellard | #if !defined(CONFIG_USER_ONLY)
|
37 | a9049a07 | bellard | #include "softmmu_exec.h" |
38 | 9a64fbe4 | bellard | #endif /* !defined(CONFIG_USER_ONLY) */ |
39 | 79aceca5 | bellard | |
40 | b068d6a7 | j_mayer | static always_inline void env_to_regs (void) |
41 | 0d1a29f9 | bellard | { |
42 | 0d1a29f9 | bellard | } |
43 | 0d1a29f9 | bellard | |
44 | b068d6a7 | j_mayer | static always_inline void regs_to_env (void) |
45 | 0d1a29f9 | bellard | { |
46 | 0d1a29f9 | bellard | } |
47 | 0d1a29f9 | bellard | |
48 | b068d6a7 | j_mayer | static always_inline int cpu_halted (CPUState *env) |
49 | 36081602 | j_mayer | { |
50 | bfed01fc | ths | if (!env->halted)
|
51 | bfed01fc | ths | return 0; |
52 | 0411a972 | j_mayer | if (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD)) {
|
53 | bfed01fc | ths | env->halted = 0;
|
54 | bfed01fc | ths | return 0; |
55 | bfed01fc | ths | } |
56 | bfed01fc | ths | return EXCP_HALTED;
|
57 | bfed01fc | ths | } |
58 | bfed01fc | ths | |
59 | 79aceca5 | bellard | #endif /* !defined (__PPC_H__) */ |