[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
- [PATCH v4 10/33] target/nios2: Clean up nios2_cpu_dump_state, (continued)
- [PATCH v4 10/33] target/nios2: Clean up nios2_cpu_dump_state, Richard Henderson, 2022/03/08
- [PATCH v4 19/33] target/nios2: Implement CR_STATUS.RSIE, Richard Henderson, 2022/03/08
- [PATCH v4 20/33] target/nios2: Remove CPU_INTERRUPT_NMI, Richard Henderson, 2022/03/08
- [PATCH v4 25/33] target/nios2: Implement rdprs, wrprs, Richard Henderson, 2022/03/08
- [PATCH v4 23/33] target/nios2: Drop CR_STATUS_EH from tb->flags, Richard Henderson, 2022/03/08
- [PATCH v4 21/33] target/nios2: Use tcg_constant_tl, Richard Henderson, 2022/03/08
- Re: [PATCH v4 21/33] target/nios2: Use tcg_constant_tl,
Peter Maydell <=
- [PATCH v4 28/33] target/nios2: Clean up nios2_cpu_do_interrupt, Richard Henderson, 2022/03/08
- [PATCH v4 11/33] target/nios2: Use hw/registerfields.h for CR_STATUS fields, Richard Henderson, 2022/03/08
- [PATCH v4 14/33] target/nios2: Use hw/registerfields.h for CR_TLBACC fields, Richard Henderson, 2022/03/08
- [PATCH v4 26/33] target/nios2: Update helper_eret for shadow registers, Richard Henderson, 2022/03/08
- [PATCH v4 22/33] target/nios2: Introduce dest_gpr, Richard Henderson, 2022/03/08