From: Tim Deegan Subject: Re: ffs vs __builtin_ffs Date: Thu, 31 Oct 2013 18:32:20 +0100 Message-ID: <20131031173220.GB69400@deinos.phlegethon.org> References: <527236BA.3010102@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <527236BA.3010102@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Keir Fraser , Jan Beulich , Xen-devel List List-Id: xen-devel@lists.xenproject.org At 10:53 +0000 on 31 Oct (1383213226), Andrew Cooper wrote: > Would it be acceptable to provide a patch which does a straight replace > of the static inline function with a define? __builtin_ffs is supported > in all compilers we support, but there does not appear to any sane way > to detect the presence of the builtin. Seems like a good idea to me, though it'd have to be __builtin_ffsl() as the existing ffs() takes an unsigned long. Tim.