From patchwork Sun Sep 17 15:05:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 112861 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2751753qgf; Sun, 17 Sep 2017 08:19:45 -0700 (PDT) X-Received: by 10.55.154.2 with SMTP id c2mr16814683qke.4.1505661585921; Sun, 17 Sep 2017 08:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505661585; cv=none; d=google.com; s=arc-20160816; b=UkQVWhTiFcabQXEAbXp587w7RfFIfMVCsRimkgYgnSDKtbUN7CjE0ItpiXkoymVwWG 5P8JhhJJwl+RlpsY9UeDF25F65ixQYbSN1sbzzJCnNbZL+PVl062iXaRLUFexUITm+t3 43n0mMjAGTrqLekBk3iLWQeWx1X12ORMie5XF1y7njVJx3C1pemAd+/Wkhjylh5G+kfh GJ6iaqKSVTEOJt7zofEHOYNhaqMfpc5nOPvNjlW9K482mjgkrwghVfD63uoIUDBolX+k NV3nOefajdgMEapCPHdt4/TbTYJATfizC+m15uP8rF5lLAdmKiMIAa9GpGpHMhRJpFim UfNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=2oN4AO38Q14wTV1dmLoG0SbIy7EbobED6VUDH/lXwtQ=; b=ujsA0IOXnoPSIIzI47IP3g0SmoSmRt85BjbLhTJBcFIq2SZxc6K7LVRympwDDQFpG3 fmnOHTTf9oD073mYz0mEC+YT2jPiH1e48+siAoKEDhSBjC+4ZS85NiioWs7fKvqoT04T gqxL1FOHPPvdDzmaAk4qbcTCch6zGVCCR9DeUShqAHgaPErVOq4bSFLt0JC66S427kVY jFwWECU8EFJa7bm1fcgnqSDKFXYfA1uW6kYdpWpuC+gyH5nbon/4fs9/D0A5lpCwUCuJ rnYHs3RM/Y5vCWGGoUFuicbq+ulksmyXpfwM4ZkNtgWiHqOBvo9lmKfbbjxII1REucCe P75g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ivvmGpAU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id e40si5326681qta.498.2017.09.17.08.19.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 17 Sep 2017 08:19:45 -0700 (PDT) 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; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ivvmGpAU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtbMF-0002bJ-TX for patch@linaro.org; Sun, 17 Sep 2017 11:19:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtb94-00085r-KE for qemu-devel@nongnu.org; Sun, 17 Sep 2017 11:06:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtb90-0008Fu-9Q for qemu-devel@nongnu.org; Sun, 17 Sep 2017 11:06:06 -0400 Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:49537) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtb90-0008Fi-57 for qemu-devel@nongnu.org; Sun, 17 Sep 2017 11:06:02 -0400 Received: by mail-oi0-x229.google.com with SMTP id t21so3682570oih.6 for ; Sun, 17 Sep 2017 08:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2oN4AO38Q14wTV1dmLoG0SbIy7EbobED6VUDH/lXwtQ=; b=ivvmGpAU9WOgfA3Z7wacpsUmeDopbqVx1LnF8yMog4+KO8/WTSxwJ+fFatwkwXS7km QEJSCxftgAVMu9BuAzQ2sLlvfjY/Ih7V9YWIdlRNtRBwzRkrnAUbYdH8PqanSmMGtrZw T9gU6T4eb62Nl9VAK+0CXwC9nc2baYpiHp604= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2oN4AO38Q14wTV1dmLoG0SbIy7EbobED6VUDH/lXwtQ=; b=tZS+aP3W6d9z3eLwWorHnucnsf8icctpfLh+VaDG0ihG4Ikn9qoTbqhLSkAIgoSHhA 1huskptWIgQwmLzF9XAjwh91FddniKytihyfvT4WbLqeUSZxYfq0RrLcvSkRf6f8Z4zy scGejHjQw8bdhF0ZNz5/YHJhOeEGWjZ+IygYtAzT2p1LEJHsFKXiUvhjk6Gca6IELbVr BjQZ9cjJ1C5X0f3IcY7fU6rbgv9GiaAEabW5qp0fX91SBMVOsLmoHJczVhJfZ6HaY4xs Q9AD+tnKjmMtWAzJEdqGU4gbyqk2KlmJ3Xr5k3blrVRCJ5ASGnjvmBRbKi4QHyTITwHI O5lQ== X-Gm-Message-State: AHPjjUgrHcGO6RVZfU2NM4RW6vogEMbhwrRyHjGTDNHkmhimQ4FnwYJr K6F2YSh5U16rtmipfz2O9Q== X-Google-Smtp-Source: AOwi7QBIib20Wtg9iKXZ/ezDuXZxQYZ/5D2CV53WJqBOGgOM5RtvC1A34qHdBeyzTbBPsi4E1Lddsw== X-Received: by 10.202.58.131 with SMTP id h125mr13663675oia.203.1505660761206; Sun, 17 Sep 2017 08:06:01 -0700 (PDT) Received: from bigtime.twiddle.net (162.189-204-159.bestel.com.mx. [189.204.159.162]) by smtp.gmail.com with ESMTPSA id j2sm5348789oia.20.2017.09.17.08.05.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 17 Sep 2017 08:06:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 17 Sep 2017 08:05:30 -0700 Message-Id: <20170917150535.8284-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170917150535.8284-1-richard.henderson@linaro.org> References: <20170917150535.8284-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::229 Subject: [Qemu-devel] [PULL 12/17] tcg: Fix types in tcg_regset_{set, reset}_reg X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There was a potential problem here with an ILP32 host with 64 host registers. Signed-off-by: Richard Henderson --- tcg/tcg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.13.5 diff --git a/tcg/tcg.h b/tcg/tcg.h index 50dfd7c77f..25662c36d4 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -186,9 +186,9 @@ typedef enum TCGOpcode { NB_OPS, } TCGOpcode; -#define tcg_regset_set_reg(d, r) (d) |= 1L << (r) -#define tcg_regset_reset_reg(d, r) (d) &= ~(1L << (r)) -#define tcg_regset_test_reg(d, r) (((d) >> (r)) & 1) +#define tcg_regset_set_reg(d, r) ((d) |= (TCGRegSet)1 << (r)) +#define tcg_regset_reset_reg(d, r) ((d) &= ~((TCGRegSet)1 << (r))) +#define tcg_regset_test_reg(d, r) (((d) >> (r)) & 1) #ifndef TCG_TARGET_INSN_UNIT_SIZE # error "Missing TCG_TARGET_INSN_UNIT_SIZE"