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]
Other format: [Raw text]

Re: GMP on IA64-HPUX


> On Mon, Dec 05, 2005 at 07:57:43AM -0800, Steve Ellcey wrote:
> > > > >   So, in short, my questions are: is gmp-4.1.4 supposed to work on
> > > > >   ia64-hpux?
> > > > >
> > > > > No, it is not.  It might be possible to get either the LP64 or
> > > > > the ILP32 ABI to work, but even that requires the workaround you
> > > > > mention.  Don't expect any HP compiler to compile GMP correctly
> > > > > though, unless you switch off optimization.
> > > > >
> > > 
> > > If it's really compiler problems, this is one more reason for pulling
> > > gmp to the toplevel gcc, so it can be built with a sane compiler.
> > > 
> > > Richard.
> > 
> > FYI:  What I do to compile gmp on IA64 HP-UX is to configure gmp with
> > '--host=none --target=none --build=none'.  This avoids all the target
> > specific code.  I am sure the performance stinks this way but since it
> > is used by the compiler and not in the run-time I haven't found it to be
> > a problem.  Of course I don't compile any big fortran programs either.
> 
> GMP/MPFR are used only in frontend (primarily for constant folding
> and Fortran array indices).  The types that use GMP/MPFR are converted
> in the trans-*.c files to types appropriate for the underlying hardware.
> We at most need 128-bits of precision, and I believe the hardware
> specific GMP code is most useful for thousands of bits of precision.
> In other words, the performance impact is probably not that substantial.

Here's my 2 cents worth:

1) Although GMP/MPFR is buildable under hppa-hpux, I still have to apply
   a patch by hand.  The build/host/target configure options are inconsistent
   with GCC and other GNU packages.  This makes GMP/MPFR somewhat tricky
   to build.

2) The code optimisations are targeted more toward building with HP cc
   than GCC.

3) We have a different perspective on the PA 2.0 runtime.  GMP makes
   use of PA 2.0 64-bit registers instructions in the 32-bit runtime.
   However, the upper portion of 64-bit call-saved registers are not
   not saved in the 32-bit runtime, and the EH exception support that
   we currently have doesn't restore the 64-bit context.  Thus, the
   use of 64-bit registers is restricted to code that doesn't make
   calls and can't generate exceptions.

4) We have 128-bit precision floating-point available from the HP C library.

Thus, if possible, I would prefer not to have to use GMP under hppa-hpux.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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