From patchwork Tue Sep 12 16:25:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 112342 Delivered-To: patch@linaro.org Received: by 10.80.202.13 with SMTP id d13csp154906edi; Tue, 12 Sep 2017 09:35:46 -0700 (PDT) X-Received: by 10.55.160.4 with SMTP id j4mr19945353qke.357.1505234146021; Tue, 12 Sep 2017 09:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505234146; cv=none; d=google.com; s=arc-20160816; b=O8ySjp3lHRjDWRWa4wa3SC+JnoJHtaFx35yqQ3f7rBtndBi7ik4gmR5OWTC2rU1iBY bYUfGEasOzYBoJ9wJjDdY5W555LNKoKjcb+2YhudlLZsHRhusuXJkY+CXbulDiqXNVcY KTjX8Toj/Xk+vLTLoVnCfjrmc3+bX/O81suHJOl9S4Fjv1YPjiiiXFTaxLKvteb24zvO tLFdHcHy0FvO4tMc8ZP6JjZBopJMOSXyP9qM/kS5G1GlnCsQp2QJeF+T/OxggjzRQ9Je cph3DXyjKvx+BT2F9aEqCnqTyaJfqPJq6L/JO5j3hv3Fo0Ihojp/zC8crHoRJ94SdH23 qGZQ== 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=03UOSpg8PRz0Msrhor56twpaRVfPJZefeQoMqpA2HYA=; b=KAWgUfpq79EXG4d7D5b5yIUuyPvlUo6wxQ7kIgeZD3Y7Yq0qdD+6QHRiTBXgMXaNio W67sdmPin9v99qm8tQb440DBwqKTYUm1AypJJZMRtcE3ovd22fYCbLG3ykauPICaEA7w sYvWK+yY3lhxTLukwrBhoH/0HBsErx2R7nT7FH8TV/A5kuJ6vhHaBv9Tkx2uaucZSnQP L/PNDqH8KFJOncF6mxilSdFu1fH9g4+abtG+qMVNo9Pu028M4NA+tHIO3ImtvBBJXBNO k1AyTIhAlfiHnM80B6HHc4NWFDrbekwnfAWRdlbwHNA1NQvtxJmj/ONtg1iJqs0pkSu2 dblA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GvbWZ4Gb; 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 q77si11813141qka.183.2017.09.12.09.35.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 12 Sep 2017 09:35:46 -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=GvbWZ4Gb; 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]:36968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1droA3-0002to-NX for patch@linaro.org; Tue, 12 Sep 2017 12:35:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dro0M-0001y5-7t for qemu-devel@nongnu.org; Tue, 12 Sep 2017 12:25:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dro0I-0007Bl-5E for qemu-devel@nongnu.org; Tue, 12 Sep 2017 12:25:42 -0400 Received: from mail-pf0-x236.google.com ([2607:f8b0:400e:c00::236]:36711) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dro0H-0007Az-Fp for qemu-devel@nongnu.org; Tue, 12 Sep 2017 12:25:37 -0400 Received: by mail-pf0-x236.google.com with SMTP id e199so19406059pfh.3 for ; Tue, 12 Sep 2017 09:25:37 -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=03UOSpg8PRz0Msrhor56twpaRVfPJZefeQoMqpA2HYA=; b=GvbWZ4GbyXZIoiim2KaUwBPSwM2cV+W8o9s3buZTUIkH/Ff0Jq5n2W7BZAqWFueoAj Q87VTOzCoV3WzTCkcUtH1ZWKeZz2dmE8FcP5+fQ+prDSwbantbJ/cUxs2ZIwpdZfESQm mFfAMZNGInOdC025Selp0QPN9uwdtDSiZopug= 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=03UOSpg8PRz0Msrhor56twpaRVfPJZefeQoMqpA2HYA=; b=teyp536j1zuyMEBU7ENys7xDlISBRX9x5353rXUYm46a4ghzjRxMkzBfEQBN6kOY2T mCv8bLtPUYT4f2NLmUgo5URzpXa/uwX62evGy7SWAGT4Jc382bp9Prnh6k7rt2GahSvf qKhi56+Xm5/hueMZ8AQDT1+b8k4JIFul/WL+8E3bZzcLqoZgLtpobYOYHVOE6uIILr8+ 2HE1OfcPkUdyMlU92/M2s9XBMcZOc7ok16aMN4YAyd38RbVwu8juDtAzKpy2YCJePKNX DdQGDCDs0IoFSbWKvc7Lwfea6D0TPDG6vadW3MLute4bZ3fk+IobG8oO1fKAFjjRXyxy q19g== X-Gm-Message-State: AHPjjUio+brQAFvU3JQx3cVTQEtDhK0NSoH5ZY49TqRF2bSN/p4/vAlI MsRwX0PoyVGP3z0Or5QJ0Q== X-Google-Smtp-Source: ADKCNb42vtz3tAw/C6mKTcFnU22PUenbVUhbZvKOVNwA1ctBzx9jrXYZW4oRZ6ltqOOrY1nMSTqn/A== X-Received: by 10.99.120.3 with SMTP id t3mr15235782pgc.388.1505233536341; Tue, 12 Sep 2017 09:25:36 -0700 (PDT) Received: from bigtime.twiddle.net (97-126-103-167.tukw.qwest.net. [97.126.103.167]) by smtp.gmail.com with ESMTPSA id b22sm20382140pfh.175.2017.09.12.09.25.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Sep 2017 09:25:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 12 Sep 2017 09:25:12 -0700 Message-Id: <20170912162513.21694-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170912162513.21694-1-richard.henderson@linaro.org> References: <20170912162513.21694-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::236 Subject: [Qemu-devel] [PATCH v2 15/16] 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: alex.bennee@linaro.org, f4bug@amsat.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There was a problem here with an ILP32 host with 64 host registers. E.g. aarch64 running in ILP32 mode. 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 d4412102ba..c5ada53358 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -210,9 +210,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"