From patchwork Sun Mar 6 21:39:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 85600 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C5DD6B70FC for ; Mon, 7 Mar 2011 10:00:08 +1100 (EST) Received: from localhost ([127.0.0.1]:54468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwM3T-0000Ug-G4 for incoming@patchwork.ozlabs.org; Sun, 06 Mar 2011 17:03:59 -0500 Received: from [140.186.70.92] (port=55186 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwM0K-0006qM-AR for qemu-devel@nongnu.org; Sun, 06 Mar 2011 17:00:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwLgD-00084G-S3 for qemu-devel@nongnu.org; Sun, 06 Mar 2011 16:39:58 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:52071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwLgD-000840-Gc for qemu-devel@nongnu.org; Sun, 06 Mar 2011 16:39:57 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1PwLgB-0003Tl-7h; Sun, 06 Mar 2011 21:39:55 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Sun, 6 Mar 2011 21:39:55 +0000 Message-Id: <1299447595-13344-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1299447595-13344-1-git-send-email-peter.maydell@linaro.org> References: <1299447595-13344-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH v3 3/3] target-arm: Use TCG temporary leak debugging facilities X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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 c8cbb9c..f9bb573 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -9150,6 +9150,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 @@ -9259,6 +9261,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