target/s390x: Move DisasFields into DisasContext
commit344a7f656e8d211cdd6e248a0644612f386ef8ea
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 23 Jan 2020 23:22:47 +0000 (23 13:22 -1000)
committerCornelia Huck <cohuck@redhat.com>
Mon, 27 Jan 2020 11:13:10 +0000 (27 12:13 +0100)
tree9708695f34e8e6ce32b88f0b9da8776a163b6e60
parentc30988d15bd6454b2e38f2e67d850f6450130da3
target/s390x: Move DisasFields into DisasContext

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.henderson@linaro.org>
Message-Id: <20200123232248.1800-5-richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/s390x/translate.c
target/s390x/translate_vx.inc.c