LWN.net Logo

64-bit division on 32-bit arch - where's the compiler error?

64-bit division on 32-bit arch - where's the compiler error?

Posted Aug 30, 2011 3:00 UTC (Tue) by jrn (subscriber, #64214)
In reply to: 64-bit division on 32-bit arch - where's the compiler error? by pr1268
Parent article: Quotes of the week

If you click on the subject line of the email in the lower pane in gmane, you get the thread containing it. In that thread, there is an informative message from Ingo that explains that the build failure is reproducible with x86 defconfig.

But how? you might wonder. Well, the patch fixing it changes two lines --- one contains a division by two, which should be compiled to a shift, and the other a division by a variable amount, which requires human attention and hence results in an unresolved reference to __udivdi3, presumably. I imagine the patch author noticed both divisions in the same function and needlessly changed the former at the same time as the latter.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds