[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 28/39] target/tricore: Use env_cpu
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v4 28/39] target/tricore: Use env_cpu |
Date: |
Tue, 4 Jun 2019 15:33:40 -0500 |
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 <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/tricore/cpu.h | 5 -----
target/tricore/op_helper.c | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h
index 4a2a955cc5..6a40d37362 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 601e92f92a..9476d10d00 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);
--
2.17.1
- [Qemu-devel] [PATCH v4 19/39] target/moxie: Use env_cpu, env_archcpu, (continued)
- [Qemu-devel] [PATCH v4 19/39] target/moxie: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 18/39] target/mips: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 20/39] target/nios2: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 21/39] target/openrisc: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 23/39] target/riscv: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 25/39] target/sh4: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 22/39] target/ppc: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 24/39] target/s390x: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 26/39] target/sparc: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 27/39] target/tilegx: Use env_cpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 28/39] target/tricore: Use env_cpu,
Richard Henderson <=
- [Qemu-devel] [PATCH v4 29/39] target/unicore32: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 30/39] target/xtensa: Use env_cpu, env_archcpu, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 32/39] cpu: Introduce cpu_set_cpustate_pointers, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 31/39] cpu: Move ENV_OFFSET to exec/gen-icount.h, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 33/39] cpu: Introduce CPUNegativeOffsetState, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 34/39] cpu: Move icount_decr to CPUNegativeOffsetState, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 36/39] cpu: Remove CPU_COMMON, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 35/39] cpu: Move the softmmu tlb to CPUNegativeOffsetState, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 39/39] tcg/arm: Remove mostly unreachable tlb special case, Richard Henderson, 2019/06/04
- [Qemu-devel] [PATCH v4 38/39] tcg/arm: Use LDRD to load tlb mask+table, Richard Henderson, 2019/06/04