proposal for enhancement to configure, re UltraSPARC-T1

Peter Farkas Peter.Farkas at Sun.COM
Sat Dec 9 02:51:11 CET 2006


This is a proposal for an enhancement to configure.

SYNOPSIS:

configure should not use the .asm files when building the libraries
to be used on UltraSPARC-T1 based systems.

DETAILS:

Since usage of the floating point registers is not recommended on
UltraSPARC-T1 based systems, the .asm functions containing SPARC
assembler code should not be used when GMP libraries are built
for such systems.  Using the generic integer functions in GMP
yields about five times better performance than using the .asm
functions on UltraSPARC-T1 based systems (i.e. an improvement of
about 400%).

The config.guess script already differentiates between UltraSPARC-T1
and other UltraSPARC processors.  configure should be enhanced to
behave as if "--build=none ABI=longlong" was specified when the
exact_cpu is UltraSPARC-T1, and behave as it does now for the other
UltraSPARC processors.

Note that the UltraSPARC-T1 is ill-suited for the type of computing
that is done in GMP.  Indeed, UltraSPARC-T1 based systems are ideal
for situations where tens or hundreds of threads run on the system,
but they are not suited for "number-crunching" within one process.
Besides, if the application is from cryptography, then it should
take advantage of the hardware support for cryptography in the
UltraSPARC-T1 processor.  This being said, there might be situations
when a user would need to use GMP on a UltraSPARC-T1 based system,
and there is no reason why the performance improvement "should be
left on the table"

WORKAROUND:

Until somebody implements this enhancement, always use

--build=none ABI=longlong CFLAGS="<high_optimization>"

where high_optimization could be something like

-fast -fns=no -fsimple=1 -xarch=v9 -xchip=ultraT1

or

-O2 -m64 -mptr64 -mcpu=ultrasparc

with the obvious modifications if 32-bit libraries are desired
(the former for SunStudio 11, the latter for gcc, and either
is a good choice for GCC For SPARC Systems (from Sun Microsystems,
Inc.) with the former being preferred).

Also, until a fix is implemented, this should be documented in
the relevant places in the GMP documentation.

COMMENTS:

I want to re-emphasize the comments in the third paragraph of the
DETAILS section.

If nobody volunteers to implement this proposal for enhancement,
I may do it myself, if I am convinced that there is demand for
running GMP on UltraSPARC-T1 based systems, and I learn what the
process for implementing changes to configure is.

SUBMITTER:

Peter Farkas
Staff Engineer
Sun Microsystems, Inc.

12/08/2006


More information about the gmp-devel mailing list