From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 2/5] bitops: compile time optimization for hweight_long(CONSTANT) Date: Wed, 3 Feb 2010 07:42:51 -0800 Message-ID: <20100203074251.e2caa3f3.akpm@linux-foundation.org> References: <20100130094515.475881280@intel.com> <20100130094957.692671259@intel.com> <20100201124825.cc024f2a.akpm@linux-foundation.org> <20100203133951.GA24357@localhost> <20100203070825.e36b3932.akpm@linux-foundation.org> <1265210157.24455.646.camel@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Wu Fengguang , LKML , Jamie Lokier , Roland Dreier , Al Viro , "linux-fsdevel@vger.kernel.org" , Ingo Molnar , "H. Peter Anvin" To: Peter Zijlstra Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:42447 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754489Ab0BCPo1 (ORCPT ); Wed, 3 Feb 2010 10:44:27 -0500 In-Reply-To: <1265210157.24455.646.camel@laptop> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 03 Feb 2010 16:15:57 +0100 Peter Zijlstra wrote: > On Wed, 2010-02-03 at 07:08 -0800, Andrew Morton wrote: > > On Wed, 3 Feb 2010 21:39:51 +0800 Wu Fengguang wrote: > > > > > Is there an official lowest GCC version that Linux supports? > > > > Documentation/Changes says gcc-3.2. > > Anyway, its not like that macro I used isn't straight forward. Not much > a builtin can do better. > > The only benefit the builtin has is possibly use machine popcnt > instructions but we already deal with that in the kernel. We didn't deal with it on every architecture, which is something which the compiler extension takes care of. In fact I can't find anywhere where we dealt with it on x86.