From patchwork Thu Feb 4 13:31:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 44483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 44169B7D4C for ; Fri, 5 Feb 2010 00:38:12 +1100 (EST) Received: from localhost ([127.0.0.1]:57530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nd1uK-0001Mo-VS for incoming@patchwork.ozlabs.org; Thu, 04 Feb 2010 08:38:09 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nd1oP-0006tX-Fw for qemu-devel@nongnu.org; Thu, 04 Feb 2010 08:32:01 -0500 Received: from [199.232.76.173] (port=39980 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nd1oO-0006sd-EY for qemu-devel@nongnu.org; Thu, 04 Feb 2010 08:32:00 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nd1oM-00079D-Rj for qemu-devel@nongnu.org; Thu, 04 Feb 2010 08:32:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28519) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nd1oM-00078v-1E for qemu-devel@nongnu.org; Thu, 04 Feb 2010 08:31:58 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o14DVvIp013184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Feb 2010 08:31:57 -0500 Received: from localhost.localdomain (vpn1-5-172.ams2.redhat.com [10.36.5.172]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o14DVs34014783 for ; Thu, 4 Feb 2010 08:31:56 -0500 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 4 Feb 2010 14:31:50 +0100 Message-Id: <1265290313-31738-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1265290313-31738-1-git-send-email-pbonzini@redhat.com> References: <1265290313-31738-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH v2 RESEND 2/5] fix undefined shifts by >32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This one is for 0.12 too. Signed-off-by: Paolo Bonzini --- vl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 39833fc..ea9a95c 100644 --- a/vl.c +++ b/vl.c @@ -2380,9 +2380,9 @@ static void numa_add(const char *optarg) fprintf(stderr, "only 63 CPUs in NUMA mode supported.\n"); } - value = (1 << (endvalue + 1)) - (1 << value); + value = (2ULL << endvalue) - (1ULL << value); } else { - value = 1 << value; + value = 1ULL << value; } } node_cpumask[nodenr] = value;