This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
long long divisors
- To: "gcc-bugs at gcc dot gnu dot org" <gcc-bugs at gcc dot gnu dot org>
- Subject: long long divisors
- From: george anzinger <george at mvista dot com>
- Date: Sun, 28 Oct 2001 08:26:08 -0800
- Organization: Monta Vista Software
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