[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/35] target/moxie: Use env_cpu, env_archcpu
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 17/35] target/moxie: Use env_cpu, env_archcpu |
Date: |
Sat, 23 Mar 2019 12:09:07 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
target/moxie/cpu.h | 5 -----
target/moxie/helper.c | 6 +++---
target/moxie/translate.c | 2 +-
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h
index c050d6e15d..71e7cf0f08 100644
--- a/target/moxie/cpu.h
+++ b/target/moxie/cpu.h
@@ -90,11 +90,6 @@ typedef struct MoxieCPU {
CPUMoxieState env;
} MoxieCPU;
-static inline MoxieCPU *moxie_env_get_cpu(CPUMoxieState *env)
-{
- return container_of(env, MoxieCPU, env);
-}
-
#define ENV_OFFSET offsetof(MoxieCPU, env)
void moxie_cpu_do_interrupt(CPUState *cs);
diff --git a/target/moxie/helper.c b/target/moxie/helper.c
index f3d8ee7d6b..a22870228c 100644
--- a/target/moxie/helper.c
+++ b/target/moxie/helper.c
@@ -42,7 +42,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int size,
void helper_raise_exception(CPUMoxieState *env, int ex)
{
- CPUState *cs = CPU(moxie_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
cs->exception_index = ex;
/* Stash the exception type. */
@@ -79,7 +79,7 @@ uint32_t helper_udiv(CPUMoxieState *env, uint32_t a, uint32_t
b)
void helper_debug(CPUMoxieState *env)
{
- CPUState *cs = CPU(moxie_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
cs->exception_index = EXCP_DEBUG;
cpu_loop_exit(cs);
@@ -89,7 +89,7 @@ void helper_debug(CPUMoxieState *env)
void moxie_cpu_do_interrupt(CPUState *cs)
{
- CPUState *cs = CPU(moxie_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
cs->exception_index = -1;
}
diff --git a/target/moxie/translate.c b/target/moxie/translate.c
index 68ca223e22..bb25a3dee7 100644
--- a/target/moxie/translate.c
+++ b/target/moxie/translate.c
@@ -816,7 +816,7 @@ static int decode_opc(MoxieCPU *cpu, DisasContext *ctx)
void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
{
CPUMoxieState *env = cs->env_ptr;
- MoxieCPU *cpu = moxie_env_get_cpu(env);
+ MoxieCPU *cpu = env_archcpu(env);
DisasContext ctx;
target_ulong pc_start;
int num_insns, max_insns;
--
2.17.1
- [Qemu-devel] [PATCH 29/35] cpu: Move ENV_OFFSET to exec/gen-icount.h, (continued)
- [Qemu-devel] [PATCH 29/35] cpu: Move ENV_OFFSET to exec/gen-icount.h, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 25/35] target/tilegx: Use env_cpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 33/35] cpu: Remove CPU_COMMON, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 31/35] cpu: Move icount_decr to CPUNegativeOffsetState, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 27/35] target/unicore32: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 35/35] tcg/arm: Use LDRD to load tlb mask+table, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 28/35] target/xtensa: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 20/35] target/ppc: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 34/35] tcg/aarch64: Use LDP to load tlb mask+table, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 22/35] target/s390x: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 17/35] target/moxie: Use env_cpu, env_archcpu,
Richard Henderson <=
- [Qemu-devel] [PATCH 19/35] target/openrisc: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 18/35] target/nios2: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 24/35] target/sparc: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 23/35] target/sh4: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 21/35] target/riscv: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 26/35] target/tricore: Use env_cpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 14/35] target/m68k: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 15/35] target/microblaze: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 13/35] target/lm32: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23
- [Qemu-devel] [PATCH 12/35] target/i386: Use env_cpu, env_archcpu, Richard Henderson, 2019/03/23