root / target-microblaze / exec.h @ 64e58fe5
History | View | Annotate | Download (1.4 kB)
1 | 4acb54ba | Edgar E. Iglesias | /*
|
---|---|---|---|
2 | 4acb54ba | Edgar E. Iglesias | * Microblaze execution defines
|
3 | 4acb54ba | Edgar E. Iglesias | *
|
4 | 4acb54ba | Edgar E. Iglesias | * Copyright (c) 2009 Edgar E. Iglesias
|
5 | 4acb54ba | Edgar E. Iglesias | *
|
6 | 4acb54ba | Edgar E. Iglesias | * This library is free software; you can redistribute it and/or
|
7 | 4acb54ba | Edgar E. Iglesias | * modify it under the terms of the GNU Lesser General Public
|
8 | 4acb54ba | Edgar E. Iglesias | * License as published by the Free Software Foundation; either
|
9 | 4acb54ba | Edgar E. Iglesias | * version 2 of the License, or (at your option) any later version.
|
10 | 4acb54ba | Edgar E. Iglesias | *
|
11 | 4acb54ba | Edgar E. Iglesias | * This library is distributed in the hope that it will be useful,
|
12 | 4acb54ba | Edgar E. Iglesias | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 4acb54ba | Edgar E. Iglesias | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 4acb54ba | Edgar E. Iglesias | * General Public License for more details.
|
15 | 4acb54ba | Edgar E. Iglesias | *
|
16 | 4acb54ba | Edgar E. Iglesias | * 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 | 4acb54ba | Edgar E. Iglesias | */
|
19 | 4acb54ba | Edgar E. Iglesias | #include "dyngen-exec.h" |
20 | 4acb54ba | Edgar E. Iglesias | |
21 | 4acb54ba | Edgar E. Iglesias | register struct CPUMBState *env asm(AREG0); |
22 | 4acb54ba | Edgar E. Iglesias | |
23 | 4acb54ba | Edgar E. Iglesias | #include "cpu.h" |
24 | 4acb54ba | Edgar E. Iglesias | #include "exec-all.h" |
25 | 4acb54ba | Edgar E. Iglesias | |
26 | 4acb54ba | Edgar E. Iglesias | static inline void env_to_regs(void) |
27 | 4acb54ba | Edgar E. Iglesias | { |
28 | 4acb54ba | Edgar E. Iglesias | } |
29 | 4acb54ba | Edgar E. Iglesias | |
30 | 4acb54ba | Edgar E. Iglesias | static inline void regs_to_env(void) |
31 | 4acb54ba | Edgar E. Iglesias | { |
32 | 4acb54ba | Edgar E. Iglesias | } |
33 | 4acb54ba | Edgar E. Iglesias | |
34 | 4acb54ba | Edgar E. Iglesias | #if !defined(CONFIG_USER_ONLY)
|
35 | 4acb54ba | Edgar E. Iglesias | #include "softmmu_exec.h" |
36 | 4acb54ba | Edgar E. Iglesias | #endif
|
37 | 4acb54ba | Edgar E. Iglesias | |
38 | 4acb54ba | Edgar E. Iglesias | void cpu_mb_flush_flags(CPUMBState *env, int cc_op); |
39 | 4acb54ba | Edgar E. Iglesias | |
40 | 4acb54ba | Edgar E. Iglesias | static inline int cpu_has_work(CPUState *env) |
41 | 4acb54ba | Edgar E. Iglesias | { |
42 | 4acb54ba | Edgar E. Iglesias | return (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI));
|
43 | 4acb54ba | Edgar E. Iglesias | } |
44 | 4acb54ba | Edgar E. Iglesias | |
45 | 4acb54ba | Edgar E. Iglesias | static inline int cpu_halted(CPUState *env) { |
46 | 4acb54ba | Edgar E. Iglesias | if (!env->halted)
|
47 | 4acb54ba | Edgar E. Iglesias | return 0; |
48 | 4acb54ba | Edgar E. Iglesias | |
49 | 4acb54ba | Edgar E. Iglesias | /* IRQ, NMI and GURU execeptions wakes us up. */
|
50 | 4acb54ba | Edgar E. Iglesias | if (env->interrupt_request
|
51 | 4acb54ba | Edgar E. Iglesias | & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) { |
52 | 4acb54ba | Edgar E. Iglesias | env->halted = 0;
|
53 | 4acb54ba | Edgar E. Iglesias | return 0; |
54 | 4acb54ba | Edgar E. Iglesias | } |
55 | 4acb54ba | Edgar E. Iglesias | return EXCP_HALTED;
|
56 | 4acb54ba | Edgar E. Iglesias | } |