aboutsummaryrefslogtreecommitdiff
path: root/target/tricore
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-03-22 19:39:59 -0700
committerRichard Henderson <richard.henderson@linaro.org>2019-06-10 07:03:42 -0700
commit06eb2e29420deff180e777284fe6f99037e912cc (patch)
treef26e308658dcfa99cfd1f5650851813707f1f02e /target/tricore
parent06887771bda2a297f2fb669522166a97d67e2ad9 (diff)
downloadqemu-06eb2e29420deff180e777284fe6f99037e912cc.zip
qemu-06eb2e29420deff180e777284fe6f99037e912cc.tar.gz
qemu-06eb2e29420deff180e777284fe6f99037e912cc.tar.bz2
target/tricore: Use env_cpu
Cleanup in the boilerplate that each target must define. Replace tricore_env_get_cpu with env_archcpu. The combination CPU(tricore_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>
Diffstat (limited to 'target/tricore')
-rw-r--r--target/tricore/cpu.h5
-rw-r--r--target/tricore/op_helper.c2
2 files changed, 1 insertions, 6 deletions
diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h
index 4a2a955..6a40d37 100644
--- a/target/tricore/cpu.h
+++ b/target/tricore/cpu.h
@@ -208,11 +208,6 @@ struct TriCoreCPU {
CPUTriCoreState env;
};
-static inline TriCoreCPU *tricore_env_get_cpu(CPUTriCoreState *env)
-{
- return TRICORE_CPU(container_of(env, TriCoreCPU, env));
-}
-
#define ENV_OFFSET offsetof(TriCoreCPU, env)
hwaddr tricore_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c
index 601e92f..9476d10 100644
--- a/target/tricore/op_helper.c
+++ b/target/tricore/op_helper.c
@@ -29,7 +29,7 @@ static void QEMU_NORETURN
raise_exception_sync_internal(CPUTriCoreState *env, uint32_t class, int tin,
uintptr_t pc, uint32_t fcd_pc)
{
- CPUState *cs = CPU(tricore_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
/* in case we come from a helper-call we need to restore the PC */
cpu_restore_state(cs, pc, true);