This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: soft-fp patch: Use __builtin_clz*


> The soft-fp code has an inefficient generic default implementation of 
> __FP_CLZ.  GCC 3.4 and greater provide __builtin_clz which can be used for 
> a better and simpler implementation.  This patch makes soft-fp use these 
> built-in functions.
> 
> In fact the only non-default definitions of __FP_CLZ are those in 
> sysdeps/i386/soft-fp/sfp-machine.h and 
> sysdeps/x86_64/soft-fp/sfp-machine.h.  GCC knows how to expand 
> __builtin_clz/__builtin_clzl properly for both platforms, though on x86_64 
> it seems this support isn't there until GCC 4.0.

>From these two statements it's not clear whether __builtin_clz{,l,ll}
actually work on all machines in GCC 3.4 or not.  If they don't, then we
can't use them unconditionally here.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]