All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Johansson via <qemu-devel@nongnu.org>
To: qemu-devel@nongnu.org
Cc: ale@rev.ng, tsimpson@quicinc.com, bcain@quicinc.com,
	mlambert@quicinc.com, babush@rev.ng, nizzo@rev.ng,
	richard.henderson@linaro.org
Subject: [PATCH v9 06/12] target/hexagon: expose next PC in DisasContext
Date: Fri, 22 Apr 2022 19:40:53 +0200	[thread overview]
Message-ID: <20220422174059.4304-7-anjo@rev.ng> (raw)
In-Reply-To: <20220422174059.4304-1-anjo@rev.ng>

From: Paolo Montesel <babush@rev.ng>

Signed-off-by: Alessandro Di Federico <ale@rev.ng>
Signed-off-by: Paolo Montesel <babush@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
---
 target/hexagon/translate.c | 3 ++-
 target/hexagon/translate.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c
index d4fc92f7e9..e3e250fd4f 100644
--- a/target/hexagon/translate.c
+++ b/target/hexagon/translate.c
@@ -741,11 +741,12 @@ static void decode_and_translate_packet(CPUHexagonState *env, DisasContext *ctx)
     if (decode_packet(nwords, words, &pkt, false) > 0) {
         HEX_DEBUG_PRINT_PKT(&pkt);
         gen_start_packet(ctx, &pkt);
+        ctx->npc = ctx->base.pc_next + pkt.encod_pkt_size_in_bytes;
         for (i = 0; i < pkt.num_insns; i++) {
             gen_insn(env, ctx, &pkt.insn[i], &pkt);
         }
         gen_commit_packet(env, ctx, &pkt);
-        ctx->base.pc_next += pkt.encod_pkt_size_in_bytes;
+        ctx->base.pc_next = ctx->npc;
     } else {
         gen_exception_end_tb(ctx, HEX_EXCP_INVALID_PACKET);
     }
diff --git a/target/hexagon/translate.h b/target/hexagon/translate.h
index a245172827..494471548e 100644
--- a/target/hexagon/translate.h
+++ b/target/hexagon/translate.h
@@ -53,6 +53,7 @@ typedef struct DisasContext {
     bool qreg_is_predicated[NUM_QREGS];
     int qreg_log_idx;
     bool pre_commit;
+    uint32_t npc;
 } DisasContext;
 
 static inline void ctx_log_reg_write(DisasContext *ctx, int rnum)
-- 
2.35.1



  parent reply	other threads:[~2022-04-22 18:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 17:40 [PATCH v9 00/12] target/hexagon: introduce idef-parser Anton Johansson via
2022-04-22 17:40 ` [PATCH v9 01/12] target/hexagon: update MAINTAINERS for idef-parser Anton Johansson via
2022-04-22 17:40 ` [PATCH v9 02/12] target/hexagon: import README " Anton Johansson via
2022-04-22 17:40 ` [PATCH v9 03/12] target/hexagon: make slot number an unsigned Anton Johansson via
2022-04-22 17:40 ` [PATCH v9 04/12] target/hexagon: make helper functions non-static Anton Johansson via
2022-04-22 17:40 ` [PATCH v9 05/12] target/hexagon: introduce new helper functions Anton Johansson via
2022-04-22 17:40 ` Anton Johansson via [this message]
2022-04-22 17:40 ` [PATCH v9 07/12] target/hexagon: prepare input for the idef-parser Anton Johansson via
2022-04-22 17:40 ` [PATCH v9 08/12] target/hexagon: import flex/bison to docker files Anton Johansson via
2022-05-24 10:07   ` Alex Bennée
2022-05-25 12:29     ` Anton Johansson via
2022-05-25 15:22       ` Richard Henderson
2022-05-25 16:38         ` Alex Bennée
2022-05-25 20:14           ` Anton Johansson via
2022-05-25 20:16             ` Richard Henderson
2022-05-25 20:27               ` Anton Johansson via
2022-05-25 21:05                 ` Richard Henderson
2022-04-22 17:40 ` [PATCH v9 09/12] target/hexagon: import lexer for idef-parser Anton Johansson via
2022-04-22 17:40 ` [PATCH v9 10/12] target/hexagon: import parser " Anton Johansson via
2022-04-22 17:40 ` [PATCH v9 11/12] target/hexagon: call idef-parser functions Anton Johansson via
2022-04-22 17:40 ` [PATCH v9 12/12] target/hexagon: import additional tests Anton Johansson via

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=20220422174059.4304-7-anjo@rev.ng \
    --to=qemu-devel@nongnu.org \
    --cc=ale@rev.ng \
    --cc=anjo@rev.ng \
    --cc=babush@rev.ng \
    --cc=bcain@quicinc.com \
    --cc=mlambert@quicinc.com \
    --cc=nizzo@rev.ng \
    --cc=richard.henderson@linaro.org \
    --cc=tsimpson@quicinc.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.