[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [qemu-s390x] [PATCH v3 8/9] target/s390x: Skip wout, co
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-devel] [qemu-s390x] [PATCH v3 8/9] target/s390x: Skip wout, cout helpers if op helper does not return |
Date: |
Thu, 11 Oct 2018 10:06:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 03/10/2018 21:39, Richard Henderson wrote:
> When op raises an exception, it may not have initialized the output
> temps that would be written back by wout or cout.
>
> Cc: address@hidden
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> target/s390x/translate.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/target/s390x/translate.c b/target/s390x/translate.c
> index 7363aabf3a..7fad3ad8e9 100644
> --- a/target/s390x/translate.c
> +++ b/target/s390x/translate.c
> @@ -6164,11 +6164,13 @@ static DisasJumpType translate_one(CPUS390XState
> *env, DisasContext *s)
> if (insn->help_op) {
> ret = insn->help_op(s, &o);
> }
> - if (insn->help_wout) {
> - insn->help_wout(s, &f, &o);
> - }
> - if (insn->help_cout) {
> - insn->help_cout(s, &o);
> + if (ret != DISAS_NORETURN) {
> + if (insn->help_wout) {
> + insn->help_wout(s, &f, &o);
> + }
> + if (insn->help_cout) {
> + insn->help_cout(s, &o);
> + }
> }
>
> /* Free any temporaries created by the helpers. */
>
What about things like LPSW/LPWSE ? They certainly don't imply that we
had an exception.
(these two don't use wout/cout, so it is still fine, but I would prefer
a comment somewhere because otherwise it is really easy to miss that
DISAS_NORETURN makes us skip these handlers)
Apart from that
Reviewed-by: David Hildenbrand <address@hidden>
--
Thanks,
David / dhildenb
- [Qemu-devel] [PATCH v3 0/9] tcg: Reorg 128-bit atomic operations, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 2/9] target/i386: Convert to HAVE_CMPXCHG128, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 4/9] target/arm: Check HAVE_CMPXCHG128 at translate time, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 9/9] target/s390x: Check HAVE_ATOMIC128 and HAVE_CMPXCHG128 at translate, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 1/9] tcg: Split CONFIG_ATOMIC128, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 8/9] target/s390x: Skip wout, cout helpers if op helper does not return, Richard Henderson, 2018/10/03
- Re: [Qemu-devel] [qemu-s390x] [PATCH v3 8/9] target/s390x: Skip wout, cout helpers if op helper does not return,
David Hildenbrand <=
- [Qemu-devel] [PATCH v3 6/9] target/s390x: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 7/9] target/s390x: Split do_cdsg, do_lpq, do_stpq, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 5/9] target/ppc: Convert to HAVE_CMPXCHG128 and HAVE_ATOMIC128, Richard Henderson, 2018/10/03
- [Qemu-devel] [PATCH v3 3/9] target/arm: Convert to HAVE_CMPXCHG128, Richard Henderson, 2018/10/03
- Re: [Qemu-devel] [PATCH v3 0/9] tcg: Reorg 128-bit atomic operations, Emilio G. Cota, 2018/10/09