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: Torbjorn Granlund <tege at matematik dot su dot se>
- Subject: Re: int vs. float divide optimization on AXP EV45
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 20 Nov 1998 21:04:11 -0700
- cc: "B. James Phillippe" <bryan at terran dot org>, egcs Mailing List <egcs at cygnus dot com>
- Reply-To: law at cygnus dot com
In message <199811201700.SAA15906@sophie.matematik.su.se>you write:
> 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 divisor
> s
> 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.
I stand corrected :-) Thanks Torbjorn.
jeff