On 24/01/2020 00.22, Richard Henderson wrote: > I believe that the separate allocation of DisasFields from DisasContext > was meant to limit the places from which we could access fields. But > that plan did not go unchanged, and since DisasContext contains a pointer > to fields, the substructure is accessible everywhere. > > By allocating the substructure with DisasContext, we improve the locality > of the accesses by avoiding one level of pointer chasing. In addition, > we avoid a dangling pointer to stack allocated memory, diagnosed by static > checkers. > > Launchpad: https://bugs.launchpad.net/bugs/1661815 > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > target/s390x/translate.c | 22 +++++++++--------- > target/s390x/translate_vx.inc.c | 40 ++++++++++++++++----------------- > 2 files changed, 30 insertions(+), 32 deletions(-)
Reviewed-by: Thomas Huth <th...@redhat.com>