qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/5] target/alpha: Use tcg_gen_lookup_and_got


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 2/5] target/alpha: Use tcg_gen_lookup_and_goto_ptr
Date: Thu, 15 Jun 2017 13:55:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 06/15/2017 01:48 AM, Alex Bennée wrote:

Richard Henderson <address@hidden> writes:

Signed-off-by: Richard Henderson <address@hidden>
---
  target/alpha/translate.c | 27 ++++++++++++++++++++++-----
  1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/target/alpha/translate.c b/target/alpha/translate.c
index 7c45ae3..a48e451 100644
--- a/target/alpha/translate.c
+++ b/target/alpha/translate.c
@@ -84,6 +84,7 @@ typedef enum {
         the PC (for whatever reason), so there's no need to do it again on
         exiting the TB.  */
      EXIT_PC_UPDATED,
+    EXIT_PC_UPDATED_NOCHAIN,

      /* We are exiting the TB, but have neither emitted a goto_tb, nor
         updated the PC for the next instruction to be executed.  */
@@ -458,11 +459,17 @@ static bool in_superpage(DisasContext *ctx, int64_t addr)
  #endif
  }

+static bool use_exit_tb(DisasContext *ctx)
+{
+    return ((ctx->tb->cflags & CF_LAST_IO)
+            || ctx->singlestep_enabled
+            || singlestep);
+}

minor nit: why start testing this global? At the least we should
probably seed ctx->singlestep_enabled when we set up for translation.

+
  static bool use_goto_tb(DisasContext *ctx, uint64_t dest)
  {
      /* Suppress goto_tb in the case of single-steping and IO.  */
-    if ((ctx->tb->cflags & CF_LAST_IO)
-        || ctx->singlestep_enabled || singlestep) {

I didn't start testing this global.  It's already there.

Further, despite the name similarity these are very different conditions.

For ctx->singlestep_enabled we emit a debug exception at the end of every instruction.

For singlestep, we must execute only one insn in the TB and further we must return to the main loop after the TB. Both are required for -singlestep -d cpu to log all that's being requested.

One cannot combine the two conditions.


r~



reply via email to

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