[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/46] target/ppc: Remove MSR_SA and MSR_AP from hflags
From: |
David Gibson |
Subject: |
[PULL 16/46] target/ppc: Remove MSR_SA and MSR_AP from hflags |
Date: |
Tue, 4 May 2021 15:52:42 +1000 |
From: Richard Henderson <richard.henderson@linaro.org>
Nothing within the translator -- or anywhere else for that
matter -- checks MSR_SA or MSR_AP on the 602. This may be
a mistake. However, for the moment, we need not record these
bits in hflags.
This allows us to simplify HFLAGS_VSX computation by moving
it to overlap with MSR_VSX.
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210323184340.619757-8-richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
target/ppc/cpu.h | 4 +---
target/ppc/helper_regs.c | 10 ++++------
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 3c28ddb331..2f72f83ee3 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -600,14 +600,12 @@ enum {
HFLAGS_DR = 4, /* MSR_DR */
HFLAGS_IR = 5, /* MSR_IR */
HFLAGS_SPE = 6, /* from MSR_SPE if cpu has SPE; avoid overlap w/ MSR_VR */
- HFLAGS_VSX = 7, /* from MSR_VSX if cpu has VSX; avoid overlap w/ MSR_AP */
HFLAGS_TM = 8, /* computed from MSR_TM */
HFLAGS_BE = 9, /* MSR_BE -- from elsewhere on embedded ppc */
HFLAGS_SE = 10, /* MSR_SE -- from elsewhere on embedded ppc */
HFLAGS_FP = 13, /* MSR_FP */
HFLAGS_PR = 14, /* MSR_PR */
- HFLAGS_SA = 22, /* MSR_SA */
- HFLAGS_AP = 23, /* MSR_AP */
+ HFLAGS_VSX = 23, /* MSR_VSX if cpu has VSX */
HFLAGS_VR = 25, /* MSR_VR if cpu has VRE */
};
diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
index f85bb14d1d..dd3cd770a3 100644
--- a/target/ppc/helper_regs.c
+++ b/target/ppc/helper_regs.c
@@ -99,11 +99,8 @@ void hreg_compute_hflags(CPUPPCState *env)
QEMU_BUILD_BUG_ON(MSR_DR != HFLAGS_DR);
QEMU_BUILD_BUG_ON(MSR_IR != HFLAGS_IR);
QEMU_BUILD_BUG_ON(MSR_FP != HFLAGS_FP);
- QEMU_BUILD_BUG_ON(MSR_SA != HFLAGS_SA);
- QEMU_BUILD_BUG_ON(MSR_AP != HFLAGS_AP);
msr_mask = ((1 << MSR_LE) | (1 << MSR_PR) |
- (1 << MSR_DR) | (1 << MSR_IR) |
- (1 << MSR_FP) | (1 << MSR_SA) | (1 << MSR_AP));
+ (1 << MSR_DR) | (1 << MSR_IR) | (1 << MSR_FP));
if (ppc_flags & POWERPC_FLAG_HID0_LE) {
/*
@@ -143,8 +140,9 @@ void hreg_compute_hflags(CPUPPCState *env)
QEMU_BUILD_BUG_ON(MSR_VR != HFLAGS_VR);
msr_mask |= 1 << MSR_VR;
}
- if ((ppc_flags & POWERPC_FLAG_VSX) && (msr & (1 << MSR_VSX))) {
- hflags |= 1 << HFLAGS_VSX;
+ if (ppc_flags & POWERPC_FLAG_VSX) {
+ QEMU_BUILD_BUG_ON(MSR_VSX != HFLAGS_VSX);
+ msr_mask |= 1 << MSR_VSX;
}
if ((ppc_flags & POWERPC_FLAG_TM) && (msr & (1ull << MSR_TM))) {
hflags |= 1 << HFLAGS_TM;
--
2.31.1
- [PULL 06/46] target/ppc: Retain hflags_nmsr only for migration, (continued)
- [PULL 06/46] target/ppc: Retain hflags_nmsr only for migration, David Gibson, 2021/05/04
- [PULL 07/46] target/ppc: Fix comment for MSR_FE{0,1}, David Gibson, 2021/05/04
- [PULL 09/46] hw/ppc/spapr_rtas: Update hflags after setting msr, David Gibson, 2021/05/04
- [PULL 10/46] target/ppc: Extract post_load_update_msr, David Gibson, 2021/05/04
- [PULL 11/46] target/ppc: Disconnect hflags from MSR, David Gibson, 2021/05/04
- [PULL 14/46] target/ppc: Create helper_scv, David Gibson, 2021/05/04
- [PULL 15/46] target/ppc: Put LPCR[GTSE] in hflags, David Gibson, 2021/05/04
- [PULL 12/46] target/ppc: Reduce env->hflags to uint32_t, David Gibson, 2021/05/04
- [PULL 17/46] target/ppc: Remove env->immu_idx and env->dmmu_idx, David Gibson, 2021/05/04
- [PULL 19/46] target/ppc: Validate hflags with CONFIG_DEBUG_TCG, David Gibson, 2021/05/04
- [PULL 16/46] target/ppc: Remove MSR_SA and MSR_AP from hflags,
David Gibson <=
- [PULL 13/46] target/ppc: Put dbcr0 single-step bits into hflags, David Gibson, 2021/05/04
- [PULL 18/46] linux-user/ppc: Fix msr updates for signal handling, David Gibson, 2021/05/04
- [PULL 20/46] vt82c686: QOM-ify superio related functionality, David Gibson, 2021/05/04
- [PULL 25/46] hw/ppc: Add emulation of Genesi/bPlan Pegasos II, David Gibson, 2021/05/04
- [PULL 24/46] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller, David Gibson, 2021/05/04
- [PULL 21/46] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO, David Gibson, 2021/05/04
- [PULL 22/46] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it, David Gibson, 2021/05/04
- [PULL 26/46] spapr: Rename RTAS_MAX_ADDR to FDT_MAX_ADDR, David Gibson, 2021/05/04
- [PULL 23/46] vt82c686: Add emulation of VT8231 south bridge, David Gibson, 2021/05/04
- [PULL 27/46] ppc/spapr: Add support for implement support for H_SCM_HEALTH, David Gibson, 2021/05/04