qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 21/33] target/nios2: Use tcg_constant_tl


From: Peter Maydell
Subject: Re: [PATCH v4 21/33] target/nios2: Use tcg_constant_tl
Date: Tue, 8 Mar 2022 11:00:05 +0000

On Tue, 8 Mar 2022 at 07:20, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Replace current uses of tcg_const_tl, and remove the frees.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---

> @@ -675,8 +663,8 @@ static void divu(DisasContext *dc, uint32_t code, 
> uint32_t flags)
>
>      TCGv t0 = tcg_temp_new();
>      TCGv t1 = tcg_temp_new();
> -    TCGv t2 = tcg_const_tl(0);
> -    TCGv t3 = tcg_const_tl(1);
> +    TCGv t2 = tcg_constant_tl(0);
> +    TCGv t3 = tcg_constant_tl(1);

Maybe just use tcg_constant_tl(0) and (1) in-place at
the only two uses of t2, t3 rather than retaining the TCGv
local variables ?

>
>      tcg_gen_ext32u_tl(t0, load_gpr(dc, instr.a));
>      tcg_gen_ext32u_tl(t1, load_gpr(dc, instr.b));
> @@ -684,8 +672,6 @@ static void divu(DisasContext *dc, uint32_t code, 
> uint32_t flags)
>      tcg_gen_divu_tl(cpu_R[instr.c], t0, t1);
>      tcg_gen_ext32s_tl(cpu_R[instr.c], cpu_R[instr.c]);
>
> -    tcg_temp_free(t3);
> -    tcg_temp_free(t2);
>      tcg_temp_free(t1);
>      tcg_temp_free(t0);
>  }

Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM



reply via email to

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