[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: |
Edgar E. Iglesias |
Subject: |
Re: [PATCH v1 1/3] target/microblaze: Plug temp leaks for loads/stores |
Date: |
Fri, 8 Nov 2019 13:36:54 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Nov 07, 2019 at 03:19:20PM +0100, Richard Henderson wrote:
> 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);
Nice!
I'll send out a new version shortly.
Best regards,
Edgar
>
> Similarly in dec_store.
>
> The other changes in this patch around gen_helper_memalign are ok.
>
>
> r~