[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/7] target/arm: Handle writeback in VLDR/VSTR sysreg with no
From: |
Peter Maydell |
Subject: |
Re: [PATCH 4/7] target/arm: Handle writeback in VLDR/VSTR sysreg with no memory access |
Date: |
Fri, 18 Jun 2021 17:54:46 +0100 |
On Fri, 18 Jun 2021 at 17:15, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 6/18/21 7:10 AM, Peter Maydell wrote:
> > @@ -633,9 +665,11 @@ static void fp_sysreg_to_memory(DisasContext *s, void
> > *opaque, TCGv_i32 value)
> > gen_helper_v8m_stackcheck(cpu_env, addr);
> > }
> >
> > - gen_aa32_st_i32(s, value, addr, get_mem_index(s),
> > - MO_UL | MO_ALIGN | s->be_data);
> > - tcg_temp_free_i32(value);
> > + if (do_access) {
> > + gen_aa32_st_i32(s, value, addr, get_mem_index(s),
> > + MO_UL | MO_ALIGN | s->be_data);
> > + tcg_temp_free_i32(value);
> > + }
>
> So, this bit looked funny at first glance -- are we missing the free of
> value? But of
> course value == NULL when !do_access. Which made me wonder if it wouldn't be
> better to
> just use value == NULL and not add the extra argument?
That was how I thought I'd do it initially, but of course you
can't do that for the fp_memory_to_sysreg callbacks, and I
preferred to be consistent across the two.
-- PMM
- [PATCH 1/7] target/arm/translate-vfp.c: Whitespace fixes, (continued)
- [PATCH 1/7] target/arm/translate-vfp.c: Whitespace fixes, Peter Maydell, 2021/06/18
- [PATCH 5/7] target/arm: Factor FP context update code out into helper function, Peter Maydell, 2021/06/18
- [PATCH 3/7] target/arm: Don't NOCP fault for FPCXT_NS accesses, Peter Maydell, 2021/06/18
- [PATCH 6/7] target/arm: Split vfp_access_check() into A and M versions, Peter Maydell, 2021/06/18
- [PATCH 4/7] target/arm: Handle writeback in VLDR/VSTR sysreg with no memory access, Peter Maydell, 2021/06/18
- [PATCH 7/7] target/arm: Handle FPU check for FPCXT_NS insns via vfp_access_check_m(), Peter Maydell, 2021/06/18