This is the mail archive of the gcc@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]

Re: int vs. float divide optimization on AXP EV45



  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


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