]> Git Repo - qemu.git/commitdiff
target/tricore: Use env_cpu
authorRichard Henderson <[email protected]>
Sat, 23 Mar 2019 02:39:59 +0000 (19:39 -0700)
committerRichard Henderson <[email protected]>
Mon, 10 Jun 2019 14:03:42 +0000 (07:03 -0700)
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 <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
target/tricore/cpu.h
target/tricore/op_helper.c

index 4a2a955cc552f29afd1de591d0f386b9ea80fdcf..6a40d373622e4392891c7ec4283bd98209b20f87 100644 (file)
@@ -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);
index 601e92f92a1f57f8d1a13c09e58967579a8c414a..9476d10d0065500d110edd25037a6bb8bb9f0e56 100644 (file)
@@ -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);
 
This page took 0.029877 seconds and 4 git commands to generate.