This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Preprocessor arithmetic
On Wed, Nov 15, 2000 at 12:22:54AM -0800, Zack Weinberg wrote:
> On Wed, Nov 15, 2000 at 07:43:06AM +0000, Neil Booth wrote:
> > Zack Weinberg wrote:-
> >
> > > Either. Think about cross-compiling from a 32-bit machine to a brand
> > > new shiny 128-bit chip. Okay, this is less likely than cross-
> > > compiling from a 32-bit machine to an embedded 16- or 8-bit chip, but
> > > no less wrong.
> >
> > Right. In other words, we require arbitrary precision integer
> > arithmetic. My understanding is that not even the compiler proper
> > does this.
>
> The compiler proper has support for up to 2*HOST_WIDE_INT integer
> arithmetic (actually operating on tree nodes). I think.
>
> > What's the long term goal in this area? To write a library to handle
> > such arithmetic, and use it in cpp and the front ends?
>
> 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.
It depends which floating point emulator you are talking about. The one in
real.c, certainly. The one in config/fp-bit.c, I would say not at this time,
since AFAIK, gmp doesn't have the libgcc exception to allow users to link it
in. Also, we would have to fold gmp into libgcc.a.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482