From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>,
Max Filippov <jcmvbkbc@gmail.com>,
qemu-stable@nongnu.org
Subject: [Qemu-devel] [PATCH v2] target-xtensa: fix search_pc for the last TB opcode
Date: Thu, 20 Dec 2012 00:04:09 +0400 [thread overview]
Message-ID: <1355947449-22308-1-git-send-email-jcmvbkbc@gmail.com> (raw)
Zero out tcg_ctx.gen_opc_instr_start for instructions representing the
last guest opcode in the TB.
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Changes v1 -> v2:
- replace while loop with memset
target-xtensa/translate.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c
index 5d8762c..2931d00 100644
--- a/target-xtensa/translate.c
+++ b/target-xtensa/translate.c
@@ -3005,7 +3005,11 @@ static void gen_intermediate_code_internal(
gen_icount_end(tb, insn_count);
*tcg_ctx.gen_opc_ptr = INDEX_op_end;
- if (!search_pc) {
+ if (search_pc) {
+ j = tcg_ctx.gen_opc_ptr - tcg_ctx.gen_opc_buf;
+ memset(tcg_ctx.gen_opc_instr_start + lj + 1, 0,
+ (j - lj) * sizeof(tcg_ctx.gen_opc_instr_start[0]));
+ } else {
tb->size = dc.pc - pc_start;
tb->icount = insn_count;
}
--
1.7.7.6
next reply other threads:[~2012-12-19 20:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 20:04 Max Filippov [this message]
2012-12-22 15:41 ` [Qemu-devel] [PATCH v2] target-xtensa: fix search_pc for the last TB opcode Blue Swirl
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=1355947449-22308-1-git-send-email-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.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).