[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 46/48] target/ppc/mmu_common.c: Convert local variable to bool
From: |
BALATON Zoltan |
Subject: |
[PATCH v6 46/48] target/ppc/mmu_common.c: Convert local variable to bool |
Date: |
Sat, 11 May 2024 03:46:27 +0200 (CEST) |
In mmu6xx_get_physical_address() ds is used as bool, declare it as
such. Also use constant instead of hex value.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
target/ppc/mmu_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index e7431b904f..d15683e3e4 100644
--- a/target/ppc/mmu_common.c
+++ b/target/ppc/mmu_common.c
@@ -321,8 +321,8 @@ static int mmu6xx_get_physical_address(CPUPPCState *env,
mmu_ctx_t *ctx,
PowerPCCPU *cpu = env_archcpu(env);
hwaddr hash;
target_ulong vsid, sr, pgidx;
- int ds, target_page_bits;
- bool pr, nx;
+ int target_page_bits;
+ bool pr, ds, nx;
/* First try to find a BAT entry if there are any */
if (env->nb_BATs && get_bat_6xx_tlb(env, ctx, eaddr, access_type) == 0) {
@@ -335,7 +335,7 @@ static int mmu6xx_get_physical_address(CPUPPCState *env,
mmu_ctx_t *ctx,
sr = env->sr[eaddr >> 28];
ctx->key = (((sr & 0x20000000) && pr) ||
((sr & 0x40000000) && !pr)) ? 1 : 0;
- ds = sr & 0x80000000 ? 1 : 0;
+ ds = sr & SR32_T;
nx = sr & SR32_NX;
vsid = sr & 0x00FFFFFF;
target_page_bits = TARGET_PAGE_BITS;
--
2.30.9
- [PATCH v6 19/48] target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke206_get_physical_address(), (continued)
- [PATCH v6 19/48] target/ppc/mmu_common.c: Don't use mmu_ctx_t in mmubooke206_get_physical_address(), BALATON Zoltan, 2024/05/10
- [PATCH v6 20/48] target/ppc: Remove pp_check() and reuse ppc_hash32_pp_prot(), BALATON Zoltan, 2024/05/10
- [PATCH v6 47/48] target/ppc/mmu_common.c: Remove single use local variable, BALATON Zoltan, 2024/05/10
- [PATCH v6 48/48] target/ppc/mmu_common.c: Simplify a switch statement, BALATON Zoltan, 2024/05/10
- [PATCH v6 44/48] target/ppc/mmu_common.c: Remove hash field from mmu_ctx_t, BALATON Zoltan, 2024/05/10
- [PATCH v6 38/48] target/ppc/mmu_common.c: Remove single use local variable, BALATON Zoltan, 2024/05/10
- [PATCH v6 37/48] target/ppc/mmu_common.c: Remove single use local variable, BALATON Zoltan, 2024/05/10
- [PATCH v6 39/48] target/ppc/mmu_common.c: Remove another single use local, BALATON Zoltan, 2024/05/10
- [PATCH v6 40/48] target/ppc/mmu_common.c: Remove yet another single use local, BALATON Zoltan, 2024/05/10
- [PATCH v6 35/48] target/ppc: Move out BookE and related MMU functions from mmu_common.c, BALATON Zoltan, 2024/05/10
- [PATCH v6 46/48] target/ppc/mmu_common.c: Convert local variable to bool,
BALATON Zoltan <=
- [PATCH v6 45/48] target/ppc/mmu_common.c: Remove nx field from mmu_ctx_t, BALATON Zoltan, 2024/05/10