From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqnBD-0006TI-Cy for qemu-devel@nongnu.org; Mon, 16 Jul 2012 11:25:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqnBB-0005ma-Du for qemu-devel@nongnu.org; Mon, 16 Jul 2012 11:25:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqnBB-0005mW-5i for qemu-devel@nongnu.org; Mon, 16 Jul 2012 11:25:45 -0400 Message-ID: <50043274.7020302@redhat.com> Date: Mon, 16 Jul 2012 18:25:40 +0300 From: Avi Kivity MIME-Version: 1.0 References: <0e5d35008c438b250c66b1ab4e774bd718521d8c.1342269249.git.blauwirbel@gmail.com> In-Reply-To: <0e5d35008c438b250c66b1ab4e774bd718521d8c.1342269249.git.blauwirbel@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 2/2] bitops: fix types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On 07/14/2012 03:34 PM, Blue Swirl wrote: > bitops.h uses inconsistently 'unsigned long' and 'int' for bit numbers. > > Unify to 'unsigned long' because it generates better code on x86_64. > Adjust asserts accordingly. > Actually, plain unsigned generates the best code. unsigned longs require an extra byte for many instructions. It also requires more stack space if spilled. Unsigned does not, but is compatible with unsigned long in case it needs to be used in pointer arithmetic (unlike signed int which needs a sign extension instruction). -- error compiling committee.c: too many arguments to function