NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/50887: __clzdi2 implementation in compile_rt incompatible with gcc



On Thu, Mar 03, 2016 at 07:30:00AM +0000, martin%NetBSD.org@localhost wrote:
> However, libgcc on sparc64 does not implement the underlying helper function
> _clzsi2 at all and always inlines:
> 
> inlint int _clzsi2(uint32_t v) { return _clzdi2(v)-32; }
> 
> which is correct, but combined with the compile_rt implementation leads
> to an obvious endless recursion.

I can't find any sensible reason for the GCC behavior. Even when using
the table version, it is better to only four lookups instead of eight,
so this is really something where GCC should be fixed to match its own
builtin definition.

Joerg


Home | Main Index | Thread Index | Old Index