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: 9949623 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7AF0A603F4 for ; Tue, 12 Sep 2017 16:36:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 797A929043 for ; Tue, 12 Sep 2017 16:36:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E5872904F; Tue, 12 Sep 2017 16:36:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B55FF29043 for ; Tue, 12 Sep 2017 16:36:06 +0000 (UTC) Received: from localhost ([::1]:36919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dro9R-0001WT-R7 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 12 Sep 2017 12:35:05 -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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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"