Messages in this thread | | | Date | Tue, 1 Jul 2003 22:06:41 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [PATCH] Kill div64.h dupes, parenthesize do_div() macro params |
| |
On Wed, 2 Jul 2003, Bernardo Innocenti wrote: > > By the way, what do you think about getting rid of the do_div() macro > altogether? I've noticed that gcc 3.3 is quite capable of guessing the > optimal instruction pattern to use even for the generic do_div() > written in C:
No thank you. 3.x is still broken enough that I don't want to force people to use it.
> This code makes gcc select the "udivmodsi4" pattern on the m68k > backend
Who cares about m68k? Does it do the right thing on x86? gcc 3.2.2 does not, it does a "call __udivdi3" + "call __umoddi3", which is a 64/64->64 thing, which is totally inappropriate, and about a million times slower than a single "udiv".
gcc is crap when it comes to long long. Always has been.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |