long long divisors

george anzinger george@mvista.com
Sun Oct 28 08:27:00 GMT 2001


It seems to me that the compiler should emit one idiv (x86) for the
following code:

long long foo;

long bar, result,rem;
:
:
:
result = foo / bar;
rem = foo % bar;

But it calls a library routine instead.  Am I being unreasonable, or is
there a trick I am missing?

George



More information about the Gcc-bugs mailing list