target/ppc: Deindent ppc_jumbo_xlate()
Instead of putting a large block of code in an if, invert the condition and return early to be able to deindent the code block. Acked-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
47bededc29
commit
9e9ca54cdb
@ -1264,9 +1264,10 @@ static bool ppc_jumbo_xlate(PowerPCCPU *cpu, vaddr eaddr,
|
||||
*protp = ctx.prot;
|
||||
*psizep = TARGET_PAGE_BITS;
|
||||
return true;
|
||||
} else if (!guest_visible) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (guest_visible) {
|
||||
log_cpu_state_mask(CPU_LOG_MMU, cs, 0);
|
||||
if (type == ACCESS_CODE) {
|
||||
switch (ret) {
|
||||
@ -1438,15 +1439,13 @@ static bool ppc_jumbo_xlate(PowerPCCPU *cpu, vaddr eaddr,
|
||||
default:
|
||||
printf("DSI: invalid exception (%d)\n", ret);
|
||||
cs->exception_index = POWERPC_EXCP_PROGRAM;
|
||||
env->error_code =
|
||||
POWERPC_EXCP_INVAL | POWERPC_EXCP_INVAL_INVAL;
|
||||
env->error_code = POWERPC_EXCP_INVAL | POWERPC_EXCP_INVAL_INVAL;
|
||||
env->spr[SPR_DAR] = eaddr;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user