This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: int vs. float divide optimization on AXP EV45
- To: "B. James Phillippe" <bryan at terran dot org>
- Subject: Re: int vs. float divide optimization on AXP EV45
- From: Torbjorn Granlund <tege at matematik dot su dot se>
- Date: Fri, 20 Nov 1998 18:00:48 +0100
- cc: egcs Mailing List <egcs at cygnus dot com>
GCC has code to implement integer division by performing multiplications
in the FPU. It's code Torbjorn contributed to GCC several years ago. I
believe you can find details about it in the 1992 or 1993 PLDI conference
proceedings.
Not quite.
GCC has code for doing integer diviision with compile-time constant divisors
by using run-time integer multiply. No floating-point operations are
involved.
An article was published in the 1994 PLDI proceedings ("Division by
Invariant Integers using Multiplication"). Not all of what is described in
that article is implemented in GCC. In particular, invariant divisors that
are not compile-time constants are not handled. Also, we never use
floating-point operations.
Torbjörn