mirror of https://github.com/xemu-project/xemu.git
target/ppc/mmu_common.c: Convert local variable to bool
In mmu6xx_get_physical_address() ds is used as bool, declare it as such. Also use named constant instead of hex value. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
This commit is contained in:
parent
691cf34f21
commit
aaf5845b87
|
@ -321,8 +321,8 @@ static int mmu6xx_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,
|
||||||
PowerPCCPU *cpu = env_archcpu(env);
|
PowerPCCPU *cpu = env_archcpu(env);
|
||||||
hwaddr hash;
|
hwaddr hash;
|
||||||
target_ulong vsid, sr, pgidx;
|
target_ulong vsid, sr, pgidx;
|
||||||
int ds, target_page_bits;
|
int target_page_bits;
|
||||||
bool pr, nx;
|
bool pr, ds, nx;
|
||||||
|
|
||||||
/* First try to find a BAT entry if there are any */
|
/* 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) {
|
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];
|
sr = env->sr[eaddr >> 28];
|
||||||
ctx->key = (((sr & 0x20000000) && pr) ||
|
ctx->key = (((sr & 0x20000000) && pr) ||
|
||||||
((sr & 0x40000000) && !pr)) ? 1 : 0;
|
((sr & 0x40000000) && !pr)) ? 1 : 0;
|
||||||
ds = sr & 0x80000000 ? 1 : 0;
|
ds = sr & SR32_T;
|
||||||
nx = sr & SR32_NX;
|
nx = sr & SR32_NX;
|
||||||
vsid = sr & SR32_VSID;
|
vsid = sr & SR32_VSID;
|
||||||
target_page_bits = TARGET_PAGE_BITS;
|
target_page_bits = TARGET_PAGE_BITS;
|
||||||
|
|
Loading…
Reference in New Issue