target/ppc: Simplify checking for real mode in get_physical_address_wtlb()
In get_physical_address_wtlb() the real_mode flag depends on either the MSR[IR] or MSR[DR] bit depending on access_type. Extract just the needed bit in a more straight forward way instead of doing unnecessary computation. Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
This commit is contained in:
parent
750fbe3342
commit
fef517cd8a
@ -1184,8 +1184,10 @@ int get_physical_address_wtlb(CPUPPCState *env, mmu_ctx_t *ctx,
|
||||
int mmu_idx)
|
||||
{
|
||||
int ret = -1;
|
||||
bool real_mode = (type == ACCESS_CODE && !FIELD_EX64(env->msr, MSR, IR)) ||
|
||||
(type != ACCESS_CODE && !FIELD_EX64(env->msr, MSR, DR));
|
||||
bool real_mode;
|
||||
|
||||
real_mode = (type == ACCESS_CODE) ? !FIELD_EX64(env->msr, MSR, IR)
|
||||
: !FIELD_EX64(env->msr, MSR, DR);
|
||||
|
||||
switch (env->mmu_model) {
|
||||
case POWERPC_MMU_SOFT_6xx:
|
||||
|
Loading…
Reference in New Issue
Block a user