On Fri, 18 Jun 2021 at 17:15, Richard Henderson <richard.hender...@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