target/arm: Optimize cpu_mmu_index
commitfb901c905dc34254f3edfbee86143460594c564b
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 5 Mar 2020 16:09:20 +0000 (5 16:09 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 5 Mar 2020 16:09:20 +0000 (5 16:09 +0000)
tree5deaaf33420fbf48eb48df794fdf04854954f89e
parent3e270f67f0f05277021763af119a6ce195f8ed51
target/arm: Optimize cpu_mmu_index

We now cache the core mmu_idx in env->hflags.  Rather than recompute
from scratch, extract the field.  All of the uses of cpu_mmu_index
within target/arm are within helpers, and env->hflags is always stable
within a translation block from whence helpers are called.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200302175829.2183-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.h
target/arm/helper.c