aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-08-18 12:12:12 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-08-25 13:02:14 +0200
commit0cfd392d7b419cdbe5284b8227d95ab3daaea860 (patch)
tree3ed3497c00a0d79b4b2c85a413e786659e4e1262 /target
parent23a04dcdf6fa6b34933778b16ee8200027dc6e68 (diff)
target/mips: Store CP0_Config0 in DisasContext
Most TCG helpers only have access to a DisasContext pointer, not CPUMIPSState. Store a copy of CPUMIPSState::CP0_Config0 in DisasContext so we can access it from TCG helpers. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210818164321.2474534-5-f4bug@amsat.org>
Diffstat (limited to 'target')
-rw-r--r--target/mips/tcg/translate.c1
-rw-r--r--target/mips/tcg/translate.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index 40cb1fc950..ac97f5f6f0 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -15979,6 +15979,7 @@ static void mips_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
ctx->page_start = ctx->base.pc_first & TARGET_PAGE_MASK;
ctx->saved_pc = -1;
ctx->insn_flags = env->insn_flags;
+ ctx->CP0_Config0 = env->CP0_Config0;
ctx->CP0_Config1 = env->CP0_Config1;
ctx->CP0_Config2 = env->CP0_Config2;
ctx->CP0_Config3 = env->CP0_Config3;
diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h
index eac01a8118..4b4fa2c207 100644
--- a/target/mips/tcg/translate.h
+++ b/target/mips/tcg/translate.h
@@ -18,6 +18,7 @@ typedef struct DisasContext {
target_ulong page_start;
uint32_t opcode;
uint64_t insn_flags;
+ int32_t CP0_Config0;
int32_t CP0_Config1;
int32_t CP0_Config2;
int32_t CP0_Config3;