On 9/7/23 09:03, Peter Maydell wrote:
In every place that we call the get_a64_user_mem_index() function
we do it like this:
  memidx = a->unpriv ? get_a64_user_mem_index(s) : get_mem_index(s);
Refactor so the caller passes in the bool that says whether they
want the 'unpriv' or 'normal' mem_index rather than having to
do the ?: themselves.

Signed-off-by: Peter Maydell<peter.mayd...@linaro.org>
---
I'm about to add another use of this function which would
otherwise also end up doing this same ?: expression...
---
  target/arm/tcg/translate-a64.c | 20 ++++++++++++++------
  1 file changed, 14 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to