This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GMP on IA64-HPUX
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc at gcc dot gnu dot org
- Cc: sgk at troutmask dot apl dot washington dot edu, sje at cup dot hp dot com, richard dot guenther at gmail dot com, fxcoudert at gmail dot com, fortran at gcc dot gnu dot org
- Date: Mon, 5 Dec 2005 17:52:40 -0500 (EST)
- Subject: 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)