aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/translate.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2022-01-04 07:55:34 +0100
committerCédric Le Goater <clg@kaod.org>2022-01-04 07:55:34 +0100
commitdd69d140cedc904f3491c17415f75d753c7f1be4 (patch)
tree58687f50b1400139bf5b7bf0683a1c238c8ccf8e /target/ppc/translate.c
parentc316203c1ee6f9a6c301a0a6767d27cbb6a65c46 (diff)
downloadqemu-dd69d140cedc904f3491c17415f75d753c7f1be4.zip
qemu-dd69d140cedc904f3491c17415f75d753c7f1be4.tar.gz
qemu-dd69d140cedc904f3491c17415f75d753c7f1be4.tar.bz2
ppc/ppc405: Introduce a store helper for SPR_40x_PID
The PID SPR of the 405 CPU contains the translation ID of the TLB which is a 8-bit field. Enforce the mask with a store helper. Cc: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20211222064025.1541490-8-clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20220103063441.3424853-9-clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'target/ppc/translate.c')
-rw-r--r--target/ppc/translate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index eb45f67..cb8ab4d 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -890,6 +890,14 @@ void spr_write_40x_tsr(DisasContext *ctx, int sprn, int gprn)
gen_helper_store_40x_tsr(cpu_env, cpu_gpr[gprn]);
}
+void spr_write_40x_pid(DisasContext *ctx, int sprn, int gprn)
+{
+ TCGv t0 = tcg_temp_new();
+ tcg_gen_andi_tl(t0, cpu_gpr[gprn], 0xFF);
+ gen_store_spr(SPR_40x_PID, t0);
+ tcg_temp_free(t0);
+}
+
void spr_write_booke_tcr(DisasContext *ctx, int sprn, int gprn)
{
gen_icount_io_start(ctx);