[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 1/3] target/microblaze: Plug temp leaks for loads/stores
From: |
Richard Henderson |
Subject: |
Re: [PATCH v1 1/3] target/microblaze: Plug temp leaks for loads/stores |
Date: |
Thu, 7 Nov 2019 15:19:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 11/6/19 3:14 PM, Edgar E. Iglesias wrote:
> @@ -967,12 +967,14 @@ static void dec_load(DisasContext *dc)
> 10 -> 10
> 11 -> 00 */
> TCGv low = tcg_temp_new();
> + TCGv t3 = tcg_const_tl(3);
>
> tcg_gen_andi_tl(low, addr, 3);
> - tcg_gen_sub_tl(low, tcg_const_tl(3), low);
> + tcg_gen_sub_tl(low, t3, low);
> tcg_gen_andi_tl(addr, addr, ~3);
> tcg_gen_or_tl(addr, addr, low);
> tcg_temp_free(low);
> + tcg_temp_free(t3);
> break;
While Luc correctly notes that tcg_gen_subfi_tl() may be used here, I will note
(1) there's a typo in the comment (not 2->2, but 2->1), and (2) that this whole
section can be done with
tcg_gen_xori_tl(addr, addr, 3);
Similarly in dec_store.
The other changes in this patch around gen_helper_memalign are ok.
r~