aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/translate.c
diff options
context:
space:
mode:
authorLeandro Lupori <leandro.lupori@eldorado.org.br>2022-10-25 17:24:23 -0300
committerDaniel Henrique Barboza <danielhb413@gmail.com>2022-10-28 13:15:23 -0300
commit8b3d1c49a9f0f315d2b292c1791430c0f382afa4 (patch)
tree8ca6f760753bd284b8024b28f7f9750da99322a8 /target/ppc/translate.c
parent286787f105c3216028841fd86c4e563af6b1b9e0 (diff)
downloadqemu-8b3d1c49a9f0f315d2b292c1791430c0f382afa4.zip
qemu-8b3d1c49a9f0f315d2b292c1791430c0f382afa4.tar.gz
qemu-8b3d1c49a9f0f315d2b292c1791430c0f382afa4.tar.bz2
target/ppc: Add new PMC HFLAGS
Add 2 new PMC related HFLAGS: - HFLAGS_PMCJCE - value of MMCR0 PMCjCE bit - HFLAGS_PMC_OTHER - set if a PMC other than PMC5-6 is enabled These flags allow further optimization of PMC5 update code, by allowing frequently tested conditions to be performed at translation time. Signed-off-by: Leandro Lupori <leandro.lupori@eldorado.org.br> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20221025202424.195984-3-leandro.lupori@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'target/ppc/translate.c')
-rw-r--r--target/ppc/translate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 29e4b72..8d79522 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -177,6 +177,8 @@ struct DisasContext {
bool hr;
bool mmcr0_pmcc0;
bool mmcr0_pmcc1;
+ bool mmcr0_pmcjce;
+ bool pmc_other;
bool pmu_insn_cnt;
ppc_spr_t *spr_cb; /* Needed to check rights for mfspr/mtspr */
int singlestep_enabled;
@@ -7512,6 +7514,8 @@ static void ppc_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
ctx->hr = (hflags >> HFLAGS_HR) & 1;
ctx->mmcr0_pmcc0 = (hflags >> HFLAGS_PMCC0) & 1;
ctx->mmcr0_pmcc1 = (hflags >> HFLAGS_PMCC1) & 1;
+ ctx->mmcr0_pmcjce = (hflags >> HFLAGS_PMCJCE) & 1;
+ ctx->pmc_other = (hflags >> HFLAGS_PMC_OTHER) & 1;
ctx->pmu_insn_cnt = (hflags >> HFLAGS_INSN_CNT) & 1;
ctx->singlestep_enabled = 0;