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: Preprocessor arithmetic


Joern Rennecke <amylaar@redhat.com> writes:

  > Hm, g95 presently uses libgmp for integer and floating point
  > arithmetic simulation.  It might not be a bad idea to scrap what we
  > have and use libgmp everywhere - particularly the floating point
  > emulator.
  
  I think that doing tree and rtl arithmetic (e.g. for fold-const.c, (g)cse.c
  and combine.c) with gmp would slow the compiler down.
  
Yes, using GMP, at least it high-level functions is not a good idea.
It is better to implement a little special library for fixed
precision.  After all, fixed precision is what the compiler really
needs.

Regarding using GMP's float functions instead of real.c, I'd vote
against that too.  GMP's floats are heavy weight, and only a new
experimental function calls supports true IEEE rounding.

But my ieeelib.c which I contributed years ago might be a starting
point for a fast real.c replacement.

--
Torbjörn
(GMP author)

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