qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Emilio G. Cota" <cota@braap.org>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <rth@twiddle.net>,
	David Gibson <david@gibson.dropbear.id.au>,
	Alexander Graf <agraf@suse.de>,
	qemu-ppc@nongnu.org
Subject: [Qemu-devel] [PATCH 1/3] translator: add retcode to translator_loop_temp_check
Date: Wed, 14 Feb 2018 22:14:20 -0500	[thread overview]
Message-ID: <1518664462-2960-2-git-send-email-cota@braap.org> (raw)
In-Reply-To: <1518664462-2960-1-git-send-email-cota@braap.org>

This will allow us to print further info from target code.

Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 accel/tcg/translator.c    | 4 +++-
 include/exec/translator.h | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c
index 23c6602..f409a95 100644
--- a/accel/tcg/translator.c
+++ b/accel/tcg/translator.c
@@ -23,12 +23,14 @@
    (1) the target is sufficiently clean to support reporting,
    (2) as and when all temporaries are known to be consumed.
    For most targets, (2) is at the end of translate_insn.  */
-void translator_loop_temp_check(DisasContextBase *db)
+int translator_loop_temp_check(DisasContextBase *db)
 {
     if (tcg_check_temp_count()) {
         qemu_log("warning: TCG temporary leaks before "
                  TARGET_FMT_lx "\n", db->pc_next);
+        return 1;
     }
+    return 0;
 }
 
 void translator_loop(const TranslatorOps *ops, DisasContextBase *db,
diff --git a/include/exec/translator.h b/include/exec/translator.h
index e2dc2a0..8833340 100644
--- a/include/exec/translator.h
+++ b/include/exec/translator.h
@@ -139,6 +139,6 @@ typedef struct TranslatorOps {
 void translator_loop(const TranslatorOps *ops, DisasContextBase *db,
                      CPUState *cpu, TranslationBlock *tb);
 
-void translator_loop_temp_check(DisasContextBase *db);
+int translator_loop_temp_check(DisasContextBase *db);
 
 #endif  /* EXEC__TRANSLATOR_H */
-- 
2.7.4

  reply	other threads:[~2018-02-15  3:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15  3:14 [Qemu-devel] [PATCH 0/3] target/ppc: convert to generic translation loop Emilio G. Cota
2018-02-15  3:14 ` Emilio G. Cota [this message]
2018-02-15 15:09   ` [Qemu-devel] [PATCH 1/3] translator: add retcode to translator_loop_temp_check Richard Henderson
2018-02-15 16:24     ` Emilio G. Cota
2018-02-15  3:14 ` [Qemu-devel] [PATCH 2/3] target/ppc: convert to DisasContextBase Emilio G. Cota
2018-02-15 15:13   ` Richard Henderson
2018-02-15  3:14 ` [Qemu-devel] [PATCH 3/3] target/ppc: convert to TranslatorOps Emilio G. Cota
2018-02-15 15:20   ` Richard Henderson

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=1518664462-2960-2-git-send-email-cota@braap.org \
    --to=cota@braap.org \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    /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).