@@ -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);
@@ -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);
@@ -2800,7 +2800,7 @@ static inline void QEMU_NORETURN do_raise_exception_err(CPUTriCoreState *env,
int error_code,
uintptr_t pc)
{
- CPUState *cs = CPU(tricore_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
cs->exception_index = exception;
env->error_code = error_code;
/* now we have a real cpu fault */
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/tricore/cpu.h | 5 ----- target/tricore/op_helper.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) -- 2.17.1