All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Emilio G. Cota" <cota@braap.org>, qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>,
	Yongbok Kim <yongbok.kim@mips.com>
Subject: Re: [Qemu-devel] [PATCH 07/18] target/mips: convert to DisasJumpType
Date: Sun, 22 Apr 2018 09:52:02 -1000	[thread overview]
Message-ID: <95862bc8-ef04-2755-60ca-3ba0e2ac9fd9@linaro.org> (raw)
In-Reply-To: <1524250517-28032-8-git-send-email-cota@braap.org>

On 04/20/2018 08:55 AM, Emilio G. Cota wrote:
> +#define DISAS_STOP       DISAS_TARGET_0
> +#define DISAS_EXCP       DISAS_TARGET_1
> +#define DISAS_EXIT       DISAS_TARGET_2

DISAS_EXCP should be unused and therefore not exist.

> @@ -8301,7 +8298,7 @@ static void gen_cp0 (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int rt,
>                  check_insn(ctx, ISA_MIPS2);
>                  gen_helper_eret(cpu_env);
>              }
> -            ctx->bstate = BS_EXCP;
> +            ctx->is_jmp = DISAS_EXCP;

Should be DISAS_EXIT -- helper_eret has changed both PC and hflags.

> @@ -8316,7 +8313,7 @@ static void gen_cp0 (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int rt,
>              generate_exception_end(ctx, EXCP_RI);
>          } else {
>              gen_helper_deret(cpu_env);
> -            ctx->bstate = BS_EXCP;
> +            ctx->is_jmp = DISAS_EXCP;

Likewise.

>          }
>          break;
>      case OPC_WAIT:
> @@ -8331,7 +8328,7 @@ static void gen_cp0 (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int rt,
>          save_cpu_state(ctx, 1);
>          ctx->pc -= 4;
>          gen_helper_wait(cpu_env);
> -        ctx->bstate = BS_EXCP;
> +        ctx->is_jmp = DISAS_EXCP;

Should be DISAS_NORETURN, since helper_wait exits via raise_exception.

> -    if (cs->singlestep_enabled && ctx.bstate != BS_BRANCH) {
> -        save_cpu_state(&ctx, ctx.bstate != BS_EXCP);
> +    if (cs->singlestep_enabled && ctx.is_jmp != DISAS_NORETURN) {
> +        save_cpu_state(&ctx, ctx.is_jmp != DISAS_EXCP);

Should be != DISAS_EXIT here, since for exit we have ensured that PC has
already been updated.  C.f. the switch below...

> +        case DISAS_EXIT:
>              tcg_gen_exit_tb(0);
>              break;

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

  reply	other threads:[~2018-04-22 19:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 18:54 [Qemu-devel] [PATCH v3 00/18] Translation loop conversion for sh4/sparc/mips/s390x/openrisc/riscv targets Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 01/18] translator: merge max_insns into DisasContextBase Emilio G. Cota
2018-05-09 10:04   ` Michael Clark
2018-04-20 18:55 ` [Qemu-devel] [PATCH 02/18] target/sh4: convert to TranslatorOps Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 03/18] target/sparc: convert to DisasJumpType Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 04/18] target/sparc: convert to DisasContextBase Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 05/18] target/sparc: convert to TranslatorOps Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 06/18] target/mips: use lookup_and_goto_ptr on BS_STOP Emilio G. Cota
2018-04-22 19:37   ` Richard Henderson
2018-04-20 18:55 ` [Qemu-devel] [PATCH 07/18] target/mips: convert to DisasJumpType Emilio G. Cota
2018-04-22 19:52   ` Richard Henderson [this message]
2018-04-23 16:54     ` Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 08/18] target/mips: convert to DisasContextBase Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 09/18] target/mips: use *ctx for DisasContext Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 10/18] target/mips: convert to TranslatorOps Emilio G. Cota
2018-04-22 19:54   ` Richard Henderson
2018-04-20 18:55 ` [Qemu-devel] [PATCH 11/18] target/s390x: convert to DisasJumpType Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 12/18] target/s390x: convert to DisasContextBase Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 13/18] target/s390x: convert to TranslatorOps Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 14/18] target/openrisc: convert to DisasContextBase Emilio G. Cota
2018-04-20 19:44   ` Philippe Mathieu-Daudé
2018-04-20 18:55 ` [Qemu-devel] [PATCH 15/18] target/openrisc: convert to TranslatorOps Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 16/18] target/riscv: convert to DisasJumpType Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 17/18] target/riscv: convert to DisasContextBase Emilio G. Cota
2018-04-20 18:55 ` [Qemu-devel] [PATCH 18/18] target/riscv: convert to TranslatorOps Emilio G. Cota
2018-05-09 10:11   ` Michael Clark

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=95862bc8-ef04-2755-60ca-3ba0e2ac9fd9@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=cota@braap.org \
    --cc=qemu-devel@nongnu.org \
    --cc=yongbok.kim@mips.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.