mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
06887771bd
commit
06eb2e2942
2 changed files with 1 additions and 6 deletions
|
@ -208,11 +208,6 @@ struct TriCoreCPU {
|
||||||
CPUTriCoreState env;
|
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)
|
#define ENV_OFFSET offsetof(TriCoreCPU, env)
|
||||||
|
|
||||||
hwaddr tricore_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
|
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,
|
raise_exception_sync_internal(CPUTriCoreState *env, uint32_t class, int tin,
|
||||||
uintptr_t pc, uint32_t fcd_pc)
|
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 */
|
/* in case we come from a helper-call we need to restore the PC */
|
||||||
cpu_restore_state(cs, pc, true);
|
cpu_restore_state(cs, pc, true);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue