On Wed, Aug 12, 2015 at 3:36 PM, Linus Torvalds <[email protected]> wrote: > On Wed, Aug 12, 2015 at 3:20 PM, Andy Lutomirski <[email protected]> wrote: >> >> Does your objection still apply if we supplied our own implementations of a >> handful of libgcc helpers? > > We already do that. > > Several architectures actually implement _udivdi3. > > However, do_div() is actually the much simpler/better interface. > > I don't think we have a single case in the kernel where we really want > the full 64/64 division, and the 64/32->64 case really is > fundamentally simpler. > > This whole "do_div is so complicated" thing is just BS. > > The thing that triggered Christoph to ask was a bug in the > implementation of that *simpler* interface. What makes you think that > making people implement _udivdi3 would magically avoid all such bugs? >
Nothing. We could ask gcc to fix this, I suppose (add __udiv_64_over_32 or whatever). --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

