diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-05-01 22:44:16 -0700 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2024-05-29 12:41:56 +0200 |
commit | be0fcbc462bb97605cc5d37b5f13a3a28c1417ac (patch) | |
tree | c13a4d1c2965f9fb15ecf9e6e47601a89166fdd2 | |
parent | a47d08ee0d45f98284806b2ddeda83bb33a2b351 (diff) | |
download | qemu-be0fcbc462bb97605cc5d37b5f13a3a28c1417ac.zip qemu-be0fcbc462bb97605cc5d37b5f13a3a28c1417ac.tar.gz qemu-be0fcbc462bb97605cc5d37b5f13a3a28c1417ac.tar.bz2 |
target/s390x: Adjust check of noreturn in translate_one
If help_op is not set, ret == DISAS_NEXT.
Shift the test up from surrounding help_wout, help_cout
to skipping to out, as we do elsewhere in the function.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240502054417.234340-14-richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r-- | target/s390x/tcg/translate.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index c9a5a16..c81e035 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -6341,15 +6341,16 @@ static DisasJumpType translate_one(CPUS390XState *env, DisasContext *s) } if (insn->help_op) { ret = insn->help_op(s, &o); - } - if (ret != DISAS_NORETURN) { - if (insn->help_wout) { - insn->help_wout(s, &o); - } - if (insn->help_cout) { - insn->help_cout(s, &o); + if (ret == DISAS_NORETURN) { + goto out; } } + if (insn->help_wout) { + insn->help_wout(s, &o); + } + if (insn->help_cout) { + insn->help_cout(s, &o); + } /* io should be the last instruction in tb when icount is enabled */ if (unlikely(icount && ret == DISAS_NEXT)) { |