aboutsummaryrefslogtreecommitdiff
path: root/target/sh4/op_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-03-22 19:26:42 -0700
committerRichard Henderson <richard.henderson@linaro.org>2019-06-10 07:03:42 -0700
commitdad1c8ecc707a0f3fe6963b364477ce0a92670fa (patch)
treeab14bb9e590d7efdec204f5c237b3b32c1adad2f /target/sh4/op_helper.c
parentdc79e928698567b14e6638c4c9f1e43dc386f1d8 (diff)
target/sh4: Use env_cpu, env_archcpu
Cleanup in the boilerplate that each target must define. Replace sh_env_get_cpu with env_archcpu. The combination CPU(sh_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: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/sh4/op_helper.c')
-rw-r--r--target/sh4/op_helper.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c
index 932aa7a7c7..14c3db0f48 100644
--- a/target/sh4/op_helper.c
+++ b/target/sh4/op_helper.c
@@ -46,10 +46,7 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
void helper_ldtlb(CPUSH4State *env)
{
#ifdef CONFIG_USER_ONLY
- SuperHCPU *cpu = sh_env_get_cpu(env);
-
- /* XXXXX */
- cpu_abort(CPU(cpu), "Unhandled ldtlb");
+ cpu_abort(env_cpu(env), "Unhandled ldtlb");
#else
cpu_load_tlb(env);
#endif
@@ -58,7 +55,7 @@ void helper_ldtlb(CPUSH4State *env)
static inline void QEMU_NORETURN raise_exception(CPUSH4State *env, int index,
uintptr_t retaddr)
{
- CPUState *cs = CPU(sh_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
cs->exception_index = index;
cpu_loop_exit_restore(cs, retaddr);
@@ -91,7 +88,7 @@ void helper_debug(CPUSH4State *env)
void helper_sleep(CPUSH4State *env)
{
- CPUState *cs = CPU(sh_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
cs->halted = 1;
env->in_sleep = 1;