From patchwork Fri Dec 7 21:07:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 204607 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 43E492C01FA for ; Sat, 8 Dec 2012 08:07:56 +1100 (EST) Received: from localhost ([::1]:48462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th59F-0006WP-9g for incoming@patchwork.ozlabs.org; Fri, 07 Dec 2012 16:07:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th596-0006WK-MA for qemu-devel@nongnu.org; Fri, 07 Dec 2012 16:07:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Th594-0003Ct-87 for qemu-devel@nongnu.org; Fri, 07 Dec 2012 16:07:44 -0500 Received: from mail-qa0-f52.google.com ([209.85.216.52]:56884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th594-0003Cp-02 for qemu-devel@nongnu.org; Fri, 07 Dec 2012 16:07:42 -0500 Received: by mail-qa0-f52.google.com with SMTP id d13so901177qak.4 for ; Fri, 07 Dec 2012 13:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=RN4N06uIXY18xLqqkhhW/Ah4AM7P3W2gIir/b80ni3E=; b=Wo/mmlJaqWeAd8yJKmfnOAtBg/A/IaVAFjaDx5VZ22wLD21Km7okApsB+DHGgOI3Z0 KICmu4nmfGJRk630C22Y1w2GhR94B/B8b59mjrNpFkaFbsWrTqVI8IunNeKgN57IC0Fv 0kJUULfz4ChFqBFQ/nL/WmAhjCa4+uckmYWDK5X1glppyQ8cQ9L0S1FG4HSd4he2Vu4d uWij+095eLW8pBrjGca1s/x+6IT6fVM+5FOXhjRDd/+oGLdxZhxruZUaVoqU2UfvRXeM Dwbsm9MeqVQt+DouZPMygEdp3ZhIMetXEOzxAjK2TLeElktgHFHsQD0K5QM8dgirRYFv lcLA== Received: by 10.49.121.38 with SMTP id lh6mr13050710qeb.7.1354914461369; Fri, 07 Dec 2012 13:07:41 -0800 (PST) Received: from pebble.twiddle.home.com ([201.120.20.251]) by mx.google.com with ESMTPS id g9sm8291272qaj.18.2012.12.07.13.07.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Dec 2012 13:07:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 7 Dec 2012 15:07:17 -0600 Message-Id: <1354914437-15967-1-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.52 Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH v2] tcg: Add TCGV_IS_UNUSED_* X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Cc: Aurelien Jarno Signed-off-by: Richard Henderson Reviewed-by: Andreas Färber --- tcg/tcg-op.h | 2 ++ tcg/tcg.h | 3 +++ 2 files changed, 5 insertions(+) Changes since v1: * Add tl-sized TCGV_IS_UNUSED to tcg-op.h. r~ diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h index 0b3cb0b..91c9d80 100644 --- a/tcg/tcg-op.h +++ b/tcg/tcg-op.h @@ -2329,6 +2329,7 @@ static inline void tcg_gen_movcond_i64(TCGCond cond, TCGv_i64 ret, #define tcg_gen_qemu_ldst_op tcg_gen_op3i_i32 #define tcg_gen_qemu_ldst_op_i64 tcg_gen_qemu_ldst_op_i64_i32 #define TCGV_UNUSED(x) TCGV_UNUSED_I32(x) +#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I32(x) #define TCGV_EQUAL(a, b) TCGV_EQUAL_I32(a, b) #else #define TCGv TCGv_i64 @@ -2340,6 +2341,7 @@ static inline void tcg_gen_movcond_i64(TCGCond cond, TCGv_i64 ret, #define tcg_gen_qemu_ldst_op tcg_gen_op3i_i64 #define tcg_gen_qemu_ldst_op_i64 tcg_gen_qemu_ldst_op_i64_i64 #define TCGV_UNUSED(x) TCGV_UNUSED_I64(x) +#define TCGV_IS_UNUSED(x) TCGV_IS_UNUSED_I64(x) #define TCGV_EQUAL(a, b) TCGV_EQUAL_I64(a, b) #endif diff --git a/tcg/tcg.h b/tcg/tcg.h index 9481e35..90406fc 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -270,6 +270,9 @@ typedef int TCGv_i64; #define TCGV_UNUSED_I32(x) x = MAKE_TCGV_I32(-1) #define TCGV_UNUSED_I64(x) x = MAKE_TCGV_I64(-1) +#define TCGV_IS_UNUSED_I32(x) (GET_TCGV_I32(x) == -1) +#define TCGV_IS_UNUSED_I64(x) (GET_TCGV_I64(x) == -1) + /* call flags */ /* Helper does not read globals (either directly or through an exception). It implies TCG_CALL_NO_WRITE_GLOBALS. */