diff options
Diffstat (limited to 'target-lm32')
| -rw-r--r-- | target-lm32/cpu.h | 13 | ||||
| -rw-r--r-- | target-lm32/exec.h | 12 | ||||
| -rw-r--r-- | target-lm32/helper.c | 1 | ||||
| -rw-r--r-- | target-lm32/op_helper.c | 6 | ||||
| -rw-r--r-- | target-lm32/translate.c | 1 |
5 files changed, 16 insertions, 17 deletions
diff --git a/target-lm32/cpu.h b/target-lm32/cpu.h index 8e2d26b995..876b5be2bd 100644 --- a/target-lm32/cpu.h +++ b/target-lm32/cpu.h @@ -241,4 +241,17 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, *cs_base = 0; *flags = 0; } + +static inline bool cpu_has_work(CPUState *env) +{ + return env->interrupt_request & CPU_INTERRUPT_HARD; +} + +#include "exec-all.h" + +static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb) +{ + env->pc = tb->pc; +} + #endif diff --git a/target-lm32/exec.h b/target-lm32/exec.h index 348b723f29..2a227b2953 100644 --- a/target-lm32/exec.h +++ b/target-lm32/exec.h @@ -22,12 +22,6 @@ register struct CPULM32State *env asm(AREG0); #include "cpu.h" -#include "exec-all.h" - -static inline int cpu_has_work(CPUState *env) -{ - return env->interrupt_request & CPU_INTERRUPT_HARD; -} static inline int cpu_halted(CPUState *env) { @@ -42,9 +36,3 @@ static inline int cpu_halted(CPUState *env) } return EXCP_HALTED; } - -static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb) -{ - env->pc = tb->pc; -} - diff --git a/target-lm32/helper.c b/target-lm32/helper.c index 4f3e7e0fcb..e79428d8e0 100644 --- a/target-lm32/helper.c +++ b/target-lm32/helper.c @@ -23,7 +23,6 @@ #include "config.h" #include "cpu.h" -#include "exec-all.h" #include "host-utils.h" int cpu_lm32_handle_mmu_fault(CPUState *env, target_ulong address, int rw, diff --git a/target-lm32/op_helper.c b/target-lm32/op_helper.c index c72b1df47b..a34cecd295 100644 --- a/target-lm32/op_helper.c +++ b/target-lm32/op_helper.c @@ -20,14 +20,14 @@ void helper_raise_exception(uint32_t index) { env->exception_index = index; - cpu_loop_exit(); + cpu_loop_exit(env); } void helper_hlt(void) { env->halted = 1; env->exception_index = EXCP_HLT; - cpu_loop_exit(); + cpu_loop_exit(env); } void helper_wcsr_im(uint32_t im) @@ -98,7 +98,7 @@ void tlb_fill(target_ulong addr, int is_write, int mmu_idx, void *retaddr) cpu_restore_state(tb, env, pc); } } - cpu_loop_exit(); + cpu_loop_exit(env); } env = saved_env; } diff --git a/target-lm32/translate.c b/target-lm32/translate.c index 5e197258eb..0be105d018 100644 --- a/target-lm32/translate.c +++ b/target-lm32/translate.c @@ -25,7 +25,6 @@ #include <assert.h> #include "cpu.h" -#include "exec-all.h" #include "disas.h" #include "helper.h" #include "tcg-op.h" |