Received: from [140.186.70.92] (port=42038 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsGVK-0006ts-0o for qemu-devel@nongnu.org; Wed, 23 Feb 2011 10:19:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsGVH-0006ps-B0 for qemu-devel@nongnu.org; Wed, 23 Feb 2011 10:19:49 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:40780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsGVH-0006o2-3z for qemu-devel@nongnu.org; Wed, 23 Feb 2011 10:19:47 -0500 From: Peter Maydell Date: Wed, 23 Feb 2011 15:19:36 +0000 Message-Id: <1298474376-20495-4-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1298474376-20495-1-git-send-email-peter.maydell@linaro.org> References: <1298474376-20495-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 3/3] target-arm: Use TCG temporary leak debugging facilities List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org Use the new TCG temporary leak debugging facilities to check that each ARM instruction does not leak temporaries. Signed-off-by: Peter Maydell --- target-arm/translate.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 31067d5..b96a136 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -9125,6 +9125,8 @@ static inline void gen_intermediate_code_internal(CPUState *env, gen_icount_start(); + tcg_clear_temp_count(); + /* A note on handling of the condexec (IT) bits: * * We want to avoid the overhead of having to write the updated condexec @@ -9234,6 +9236,11 @@ static inline void gen_intermediate_code_internal(CPUState *env, gen_set_label(dc->condlabel); dc->condjmp = 0; } + + if (tcg_check_temp_count()) { + fprintf(stderr, "TCG temporary leak before %08x\n", dc->pc); + } + /* Translation stops when a conditional branch is encountered. * Otherwise the subsequent code could get translated several times. * Also stop translation when a page boundary is reached. This -- 1.7.1