[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] target/s390x: Move DisasFields into DisasContext
From: |
Thomas Huth |
Subject: |
Re: [PATCH 4/5] target/s390x: Move DisasFields into DisasContext |
Date: |
Fri, 24 Jan 2020 10:39:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
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 <address@hidden>
> ---
> target/s390x/translate.c | 22 +++++++++---------
> target/s390x/translate_vx.inc.c | 40 ++++++++++++++++-----------------
> 2 files changed, 30 insertions(+), 32 deletions(-)
Reviewed-by: Thomas Huth <address@hidden>
- [PATCH 0/5] target/s390x: Do not leak stack address in translate_one, Richard Henderson, 2020/01/23
- [PATCH 1/5] target/s390x: Move struct DisasFields definition earlier, Richard Henderson, 2020/01/23
- [PATCH 2/5] target/s390x: Remove DisasFields argument from callbacks, Richard Henderson, 2020/01/23
- [PATCH 5/5] target/s390x: Remove DisasFields argument from extract_insn, Richard Henderson, 2020/01/23
- [PATCH 4/5] target/s390x: Move DisasFields into DisasContext, Richard Henderson, 2020/01/23
- Re: [PATCH 4/5] target/s390x: Move DisasFields into DisasContext,
Thomas Huth <=
- [PATCH 3/5] target/s390x: Pass DisasContext to get_field and have_field, Richard Henderson, 2020/01/23
- Re: [PATCH 0/5] target/s390x: Do not leak stack address in translate_one, Thomas Huth, 2020/01/24
- Re: [PATCH 0/5] target/s390x: Do not leak stack address in translate_one, Cornelia Huck, 2020/01/24