diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-03-22 16:07:18 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-06-10 07:03:34 -0700 |
commit | 29a0af618ddd21f55df5753c3e16b0625f534b3c (patch) | |
tree | 18b00b62ec94b2c90d4f0594b1bbc8c992a3b777 /target/sh4 | |
parent | 2161a612b4e1d388046320bc464adefd6bba01a0 (diff) | |
download | qemu-29a0af618ddd21f55df5753c3e16b0625f534b3c.zip |
cpu: Replace ENV_GET_CPU with env_cpu
Now that we have both ArchCPU and CPUArchState, we can define
this generically instead of via macro in each target's cpu.h.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/sh4')
-rw-r--r-- | target/sh4/cpu.h | 2 | ||||
-rw-r--r-- | target/sh4/op_helper.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 1bdc997290..8b17e6d63e 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -212,8 +212,6 @@ static inline SuperHCPU *sh_env_get_cpu(CPUSH4State *env) return container_of(env, SuperHCPU, env); } -#define ENV_GET_CPU(e) CPU(sh_env_get_cpu(e)) - #define ENV_OFFSET offsetof(SuperHCPU, env) void superh_cpu_do_interrupt(CPUState *cpu); diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index bd5d782b50..932aa7a7c7 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -107,7 +107,7 @@ void helper_trapa(CPUSH4State *env, uint32_t tra) void helper_exclusive(CPUSH4State *env) { /* We do not want cpu_restore_state to run. */ - cpu_loop_exit_atomic(ENV_GET_CPU(env), 0); + cpu_loop_exit_atomic(env_cpu(env), 0); } void helper_movcal(CPUSH4State *env, uint32_t address, uint32_t value) |