root / target-m68k / exec.h @ 9ea37780
History | View | Annotate | Download (1.5 kB)
1 | e6e5906b | pbrook | /*
|
---|---|---|---|
2 | e6e5906b | pbrook | * m68k execution defines
|
3 | 5fafdf24 | ths | *
|
4 | e6e5906b | pbrook | * Copyright (c) 2005-2006 CodeSourcery
|
5 | e6e5906b | pbrook | * Written by Paul Brook
|
6 | e6e5906b | pbrook | *
|
7 | e6e5906b | pbrook | * This library is free software; you can redistribute it and/or
|
8 | e6e5906b | pbrook | * modify it under the terms of the GNU Lesser General Public
|
9 | e6e5906b | pbrook | * License as published by the Free Software Foundation; either
|
10 | e6e5906b | pbrook | * version 2 of the License, or (at your option) any later version.
|
11 | e6e5906b | pbrook | *
|
12 | e6e5906b | pbrook | * This library is distributed in the hope that it will be useful,
|
13 | e6e5906b | pbrook | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 | e6e5906b | pbrook | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
15 | e6e5906b | pbrook | * General Public License for more details.
|
16 | e6e5906b | pbrook | *
|
17 | e6e5906b | pbrook | * You should have received a copy of the GNU Lesser General Public
|
18 | 8167ee88 | Blue Swirl | * License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
19 | e6e5906b | pbrook | */
|
20 | e6e5906b | pbrook | #include "dyngen-exec.h" |
21 | e6e5906b | pbrook | |
22 | e6e5906b | pbrook | register struct CPUM68KState *env asm(AREG0); |
23 | e6e5906b | pbrook | /* This is only used for tb lookup. */
|
24 | e6e5906b | pbrook | register uint32_t T0 asm(AREG1); |
25 | e6e5906b | pbrook | /* ??? We don't use T1, but common code expects it to exist */
|
26 | e6e5906b | pbrook | #define T1 env->t1
|
27 | e6e5906b | pbrook | |
28 | e6e5906b | pbrook | #include "cpu.h" |
29 | e6e5906b | pbrook | #include "exec-all.h" |
30 | e6e5906b | pbrook | |
31 | e6e5906b | pbrook | static inline void env_to_regs(void) |
32 | e6e5906b | pbrook | { |
33 | e6e5906b | pbrook | } |
34 | e6e5906b | pbrook | |
35 | e6e5906b | pbrook | static inline void regs_to_env(void) |
36 | e6e5906b | pbrook | { |
37 | e6e5906b | pbrook | } |
38 | e6e5906b | pbrook | |
39 | 0633879f | pbrook | #if !defined(CONFIG_USER_ONLY)
|
40 | 0633879f | pbrook | #include "softmmu_exec.h" |
41 | 0633879f | pbrook | #endif
|
42 | e6e5906b | pbrook | |
43 | 6a4955a8 | aliguori | static inline int cpu_has_work(CPUState *env) |
44 | 6a4955a8 | aliguori | { |
45 | 6a4955a8 | aliguori | return (env->interrupt_request & (CPU_INTERRUPT_HARD));
|
46 | 6a4955a8 | aliguori | } |
47 | 6a4955a8 | aliguori | |
48 | bfed01fc | ths | static inline int cpu_halted(CPUState *env) { |
49 | bfed01fc | ths | if (!env->halted)
|
50 | bfed01fc | ths | return 0; |
51 | 6a4955a8 | aliguori | if (cpu_has_work(env)) {
|
52 | bfed01fc | ths | env->halted = 0;
|
53 | bfed01fc | ths | return 0; |
54 | bfed01fc | ths | } |
55 | bfed01fc | ths | return EXCP_HALTED;
|
56 | bfed01fc | ths | } |