From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Marek Vasut <marex@denx.de>, Chris Wulff <crwulff@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 7/7] target/nios2: Clean up goto in handle_instruction
Date: Mon, 28 Jun 2021 16:33:50 +0100 [thread overview]
Message-ID: <CAFEAcA-1K-49LXG34LyagJaw=qk2o317uxiovGTRMyTwn4zG+g@mail.gmail.com> (raw)
In-Reply-To: <20210620221046.1526418-8-richard.henderson@linaro.org>
On Sun, 20 Jun 2021 at 23:13, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/nios2/translate.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/target/nios2/translate.c b/target/nios2/translate.c
> index 31f63d9faa..276643cee0 100644
> --- a/target/nios2/translate.c
> +++ b/target/nios2/translate.c
> @@ -753,7 +753,8 @@ static void handle_instruction(DisasContext *dc, CPUNios2State *env)
> op = get_opcode(code);
>
> if (unlikely(op >= ARRAY_SIZE(i_type_instructions))) {
> - goto illegal_op;
> + t_gen_helper_raise_exception(dc, EXCP_ILLEGAL);
> + return;
> }
>
> dc->zero = NULL;
> @@ -764,11 +765,6 @@ static void handle_instruction(DisasContext *dc, CPUNios2State *env)
> if (dc->zero) {
> tcg_temp_free(dc->zero);
> }
> -
> - return;
> -
> -illegal_op:
> - t_gen_helper_raise_exception(dc, EXCP_ILLEGAL);
> }
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
For consistency, we should do the same for the identical code pattern
in handle_r_type_instr().
thanks
-- PMM
prev parent reply other threads:[~2021-06-28 15:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-20 22:10 [PATCH v2 0/7] target/nios2: Convert to TranslatorOps Richard Henderson
2021-06-20 22:10 ` [PATCH v2 1/7] target/nios2: Replace DISAS_TB_JUMP with DISAS_NORETURN Richard Henderson
2021-06-28 15:14 ` Peter Maydell
2021-06-20 22:10 ` [PATCH v2 2/7] target/nios2: Use global cpu_env Richard Henderson
2021-06-28 15:15 ` Peter Maydell
2021-06-20 22:10 ` [PATCH v2 3/7] target/nios2: Use global cpu_R Richard Henderson
2021-06-28 15:16 ` Peter Maydell
2021-06-20 22:10 ` [PATCH v2 4/7] target/nios2: Add DisasContextBase to DisasContext Richard Henderson
2021-06-28 15:28 ` Peter Maydell
2021-06-20 22:10 ` [PATCH v2 5/7] target/nios2: Convert to TranslatorOps Richard Henderson
2021-06-28 15:57 ` Peter Maydell
2021-06-28 16:04 ` Richard Henderson
2021-06-20 22:10 ` [PATCH v2 6/7] target/nios2: Remove assignment to env in handle_instruction Richard Henderson
2021-06-28 15:31 ` Peter Maydell
2021-06-28 15:58 ` Richard Henderson
2021-06-20 22:10 ` [PATCH v2 7/7] target/nios2: Clean up goto " Richard Henderson
2021-06-28 15:33 ` Peter Maydell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFEAcA-1K-49LXG34LyagJaw=qk2o317uxiovGTRMyTwn4zG+g@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=crwulff@gmail.com \
--cc=marex@denx.de \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).