qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] target/nios2: Use tcg_constant_*


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/3] target/nios2: Use tcg_constant_*
Date: Sun, 3 Oct 2021 01:36:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0

On 10/3/21 01:30, Philippe Mathieu-Daudé wrote:
> Replace uses of tcg_const_* with the allocate and free close together.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/nios2/translate.c | 14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)

> @@ -448,9 +445,8 @@ static void rdctl(DisasContext *dc, uint32_t code, 
> uint32_t flags)
>          if (likely(instr.c != R_ZERO)) {
>              tcg_gen_mov_tl(cpu_R[instr.c], cpu_R[instr.imm5 + CR_BASE]);
>  #ifdef DEBUG_MMU
> -            TCGv_i32 tmp = tcg_const_i32(instr.imm5 + CR_BASE);
> -            gen_helper_mmu_read_debug(cpu_R[instr.c], cpu_env, tmp);
> -            tcg_temp_free_i32(tmp);
> +            gen_helper_mmu_read_debug(cpu_R[instr.c], cpu_env,
> +                                      tcg_constant_i32(instr.imm5 + 
> CR_BASE));
>  #endif
>          }

I missed mmu_write() is also read-only, thus can use tcg_constant_*().



reply via email to

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