qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 05/14] target/arm: Pass unpriv bool to get_a64_user_mem_index


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 05/14] target/arm: Pass unpriv bool to get_a64_user_mem_index()
Date: Fri, 8 Sep 2023 16:19:11 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

On 7/9/23 18: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.maydell@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: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]