target/ppc: Move calculation of a value closer to its usage in booke tlb checks
authorBALATON Zoltan <balaton@eik.bme.hu>
Sun, 12 May 2024 23:27:35 +0000 (01:27 +0200)
committerNicholas Piggin <npiggin@gmail.com>
Thu, 23 May 2024 23:41:15 +0000 (09:41 +1000)
commit3f520078deba9b5aaf5f5896c5b836341f5fc652
tree4936882eb6554f8ed8cc8a7e6deb7e4d6a26db2e
parent2b92822acc3e8cb7ce22c75a115b53219f0458b9
target/ppc: Move calculation of a value closer to its usage in booke tlb checks

In mmubooke_check_tlb() and mmubooke206_check_tlb() prot2 is
calculated first but only used after an unrelated check that can
return before tha value is used. Move the calculation after the check,
closer to where it is used, to keep them together and avoid computing
it when not needed.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
target/ppc/mmu_common.c