From patchwork Sat Feb 8 15:57:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 24361 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 258A820967 for ; Sat, 8 Feb 2014 16:05:02 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf9294318pab.11 for ; Sat, 08 Feb 2014 08:05:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=tsg/dywrsgtspcj3gFWexWiGgrnIFyC1uMPRJAjvMYA=; b=EYiQBBjL3Otl0QXHjtS5exLDujkLBv8pmoNOtX68ZgIcCyNfHRnhjKErsiYQz31Bdy /Hwxu/sOPtfXF3uu12yt3/Sgvchg1HEmZ0w8CJUqPVaBVvP14yFdZq/xWuWDIO9utF26 ub7TsbTSfReCkCp0+sdTJIAamfHA3WNvuT4/aA7ZCvwkRIrr+1nCZHEWF2Auwse1qR/w YnApKhfhks81b2BS0yjMDgoTj14lWhXUJVYZLb2VBvf2Tpog8l+6OoC/uCRU+R9H1yuL +0uuuCip6DtjQUD5wCKewVlVyJl2f0g9hc7QIZ7JZnOzuezj4m+ky+I3+dBqTaxV+Z13 VLIg== X-Gm-Message-State: ALoCoQnSXMCR9ifMDwlORUPRbdVTChiUh7elxCed+ojVaN0sI72VuGBoKB5wjpdzE41Gnawe5Lx8 X-Received: by 10.66.26.132 with SMTP id l4mr5809224pag.2.1391875502253; Sat, 08 Feb 2014 08:05:02 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.139 with SMTP id 11ls1390178qgn.84.gmail; Sat, 08 Feb 2014 08:05:01 -0800 (PST) X-Received: by 10.220.11.141 with SMTP id t13mr386654vct.30.1391875501960; Sat, 08 Feb 2014 08:05:01 -0800 (PST) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id p9si2616327vdv.122.2014.02.08.08.05.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Feb 2014 08:05:01 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu8so3661974vcb.1 for ; Sat, 08 Feb 2014 08:05:01 -0800 (PST) X-Received: by 10.58.100.100 with SMTP id ex4mr15503416veb.2.1391875501890; Sat, 08 Feb 2014 08:05:01 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp40605vcz; Sat, 8 Feb 2014 08:05:01 -0800 (PST) X-Received: by 10.224.127.73 with SMTP id f9mr3957662qas.11.1391875501233; Sat, 08 Feb 2014 08:05:01 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v46si6166307qgv.50.2014.02.08.08.05.01 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 08 Feb 2014 08:05:01 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:47045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAOq-00016d-PW for patch@linaro.org; Sat, 08 Feb 2014 11:05:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAJ2-0000Go-8A for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:59:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCAJ0-00034K-TI for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:59:00 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:45686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAJ0-000349-Mw for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:58 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WCAI8-0003Ki-V6; Sat, 08 Feb 2014 15:58:04 +0000 From: Peter Maydell To: Anthony Liguori Date: Sat, 8 Feb 2014 15:57:39 +0000 Message-Id: <1391875084-12772-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391875084-12772-1-git-send-email-peter.maydell@linaro.org> References: <1391875084-12772-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 04/29] tcg: Add TCGV_UNUSED_PTR, TCGV_IS_UNUSED_PTR, TCGV_EQUAL_PTR 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 We have macros for marking TCGv values as unused, checking if they are unused and comparing them to each other. However these only exist for TCGv_i32 and TCGv_i64; add them for TCGv_ptr as well. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- tcg/tcg.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index c72af6c..f7efcb4 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -324,13 +324,16 @@ typedef int TCGv_i64; #define TCGV_EQUAL_I32(a, b) (GET_TCGV_I32(a) == GET_TCGV_I32(b)) #define TCGV_EQUAL_I64(a, b) (GET_TCGV_I64(a) == GET_TCGV_I64(b)) +#define TCGV_EQUAL_PTR(a, b) (GET_TCGV_PTR(a) == GET_TCGV_PTR(b)) /* Dummy definition to avoid compiler warnings. */ #define TCGV_UNUSED_I32(x) x = MAKE_TCGV_I32(-1) #define TCGV_UNUSED_I64(x) x = MAKE_TCGV_I64(-1) +#define TCGV_UNUSED_PTR(x) x = MAKE_TCGV_PTR(-1) #define TCGV_IS_UNUSED_I32(x) (GET_TCGV_I32(x) == -1) #define TCGV_IS_UNUSED_I64(x) (GET_TCGV_I64(x) == -1) +#define TCGV_IS_UNUSED_PTR(x) (GET_TCGV_PTR(x) == -1) /* call flags */ /* Helper does not read globals (either directly or through an exception). It