qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 02/23] target/i386: Return bool from disas_insn


From: Richard Henderson
Subject: Re: [PATCH v2 02/23] target/i386: Return bool from disas_insn
Date: Thu, 8 Sep 2022 13:14:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 9/6/22 15:42, Philippe Mathieu-Daudé wrote:
On 6/9/22 12:09, Richard Henderson wrote:
Instead of returning the new pc, which is present in
DisasContext, return true if an insn was translated.
This is false when we detect a page crossing and must
undo the insn under translation.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  target/i386/tcg/translate.c | 42 +++++++++++++++++++------------------
  1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 1e24bb2985..46300ffd91 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -4665,7 +4665,7 @@ static void gen_sse(CPUX86State *env, DisasContext *s, 
int b)
  /* convert one instruction. s->base.is_jmp is set if the translation must
     be stopped. Return the next pc value */
-static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
+static bool disas_insn(DisasContext *s, CPUState *cpu)
  {
      CPUX86State *env = cpu->env_ptr;
      int b, prefixes;
@@ -4695,12 +4695,13 @@ static target_ulong disas_insn(DisasContext *s, 
CPUState *cpu)
          return s->pc;

Shouldn't we return 'true' here?

Whoops, yes.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]