lkml.org 
[lkml]   [2004]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: using gcc built-ins for bitops?
On Thu, Jun 24, 2004 at 08:05:34AM -0400, Jakub Jelinek wrote:
> On Thu, Jun 24, 2004 at 01:31:51PM +0200, Arjan van de Ven wrote:
> > On Thu, Jun 24, 2004 at 02:00:22AM -0700, Andrew Morton wrote:
> > > For the implementation it would be nice to have the old-style
> > > implementations in one header and the new-style ones in a separate header.
> > > That would create a bit of an all-or-nothing situation, but that should be
> > > OK?
> >
> > In addition I stuck those in asm-generic since they no longer are
> > architecture specific....
>
> This is not going to work.
> Say on x86_64, __builtin_ctzl (~word) ends up __ctzdi2 (~word) call in GCC
> 3.4.x, which is not defined in the kernel (in 3.5 it will be bsfq).
> On a bunch of arches which don't have an instruction for ffz operation
> it will always result in a library call.

It's actually fine; the architecture first needs to include this file and
there it can use the proper ifdefs; the functions themselves don't matter,
only when they can be used, and the arch still controls that.

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.111 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site