mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
target/lm32: Use env_cpu, env_archcpu
Cleanup in the boilerplate that each target must define. Replace lm32_env_get_cpu with env_archcpu. The combination CPU(lm32_env_get_cpu) should have used ENV_GET_CPU to begin; use env_cpu now. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
6aa9e42f27
commit
6dd40a906d
4 changed files with 10 additions and 22 deletions
|
@ -16,7 +16,7 @@
|
|||
#if !defined(CONFIG_USER_ONLY)
|
||||
void raise_exception(CPULM32State *env, int index)
|
||||
{
|
||||
CPUState *cs = CPU(lm32_env_get_cpu(env));
|
||||
CPUState *cs = env_cpu(env);
|
||||
|
||||
cs->exception_index = index;
|
||||
cpu_loop_exit(cs);
|
||||
|
@ -29,7 +29,7 @@ void HELPER(raise_exception)(CPULM32State *env, uint32_t index)
|
|||
|
||||
void HELPER(hlt)(CPULM32State *env)
|
||||
{
|
||||
CPUState *cs = CPU(lm32_env_get_cpu(env));
|
||||
CPUState *cs = env_cpu(env);
|
||||
|
||||
cs->halted = 1;
|
||||
cs->exception_index = EXCP_HLT;
|
||||
|
@ -39,7 +39,7 @@ void HELPER(hlt)(CPULM32State *env)
|
|||
void HELPER(ill)(CPULM32State *env)
|
||||
{
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
CPUState *cs = CPU(lm32_env_get_cpu(env));
|
||||
CPUState *cs = env_cpu(env);
|
||||
fprintf(stderr, "VM paused due to illegal instruction. "
|
||||
"Connect a debugger or switch to the monitor console "
|
||||
"to find out more.\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue