[Top][All Lists]

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

Re: [PATCH v2 2/2] target/riscv: Call check_access() before tcg_temp_new

From: Richard Henderson
Subject: Re: [PATCH v2 2/2] target/riscv: Call check_access() before tcg_temp_new()
Date: Tue, 23 Feb 2021 16:31:13 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 2/22/21 10:49 AM, Alex Richardson wrote:
> ---
>  target/riscv/insn_trans/trans_rvh.c.inc | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)

Any particular reason?

At first I thought this was a macro with a hidden return, but it isn't.  I
would understand a cleanup like

    if (check_access(ctx)) {
       TCGv t0 = tcg_temp_new();
       TCGv t1 = tcg_temp_new();

where we do not generate the rest of the code if we raised an exception.
Alternately, if the nesting seems ugly,

    if (!check_access(ctx)) {
        return true;
    return true;


reply via email to

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