This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

long long divisors


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]