Go to the first, previous, next, last section, table of contents.


ABI and ISA

ABI (Application Binary Interface) refers to the calling conventions between functions, meaning what registers are used and what sizes the various C data types are. ISA (Instruction Set Architecture) refers to the instructions and registers a CPU has available.

Some 64-bit ISA CPUs have both a 64-bit ABI and a 32-bit ABI defined, the latter for compatibility with older CPUs in the family. GMP chooses the best ABI available for a given target system, and this generally gives significantly greater speed.

The burden is on application programs and cooperating libraries to ensure they match the ABI chosen by GMP. Fortunately this presents a difficulty only on a few systems, and if you have one of them then the performance gains are enough to make it worth the trouble.

Some of what's described in this section may change in future releases of GMP.

HPPA 2.0
CPU target `hppa2.0' uses the hppa2.0n 32-bit ABI, but either a 32-bit or 64-bit limb. A 64-bit limb is available on HP-UX 10 or up when using c89. No gcc support is planned for 64-bit operations in this ABI. Applications must be compiled with the same options as GMP, which means
c89  +DA2.0 +e -D_LONG_LONG_LIMB
A 32-bit limb is used in other cases, and no special compiler options are needed. CPU target `hppa2.0w' uses the hppa2.0w 64-bit ABI, which is available on HP-UX 11 or up when using c89. gcc support for this is in progress. Applications must be compiled for the same ABI, which means
c89  +DD64
MIPS 3 and 4 under IRIX 6
Targets `mips*-*-irix6*' use the n32 ABI and a 64-bit limb. Applications must be compiled for the same ABI, which means either
gcc  -mabi=n32
cc   -n32
PowerPC 64
CPU target `powerpc64' uses either the 32-bit ABI or the AIX 64-bit ABI. The latter is used on targets `powerpc64-*-aix*' and applications must be compiled using either
gcc  -maix64
xlc  -q64
On other systems the 32-bit ABI is used, but with 64-bit limbs provided by long long in gcc. Applications must be compiled using
gcc  -D_LONG_LONG_LIMB
Sparc V9
On a sparc v9 CPU, either the v8plus 32-bit ABI or v9 64-bit ABI is used. Targets `ultrasparc*-*-solaris2.[7-9]', `sparcv9-*-solaris2.[7-9]' and `sparc64-*-linux*' use the v9 ABI, if the compiler supports it. Other targets use the v8plus ABI (but with as much of the v9 ISA as possible in the circumstances). Note that Solaris prior to 2.7 doesn't save all registers properly, and hence uses the v8plus ABI. For the v8plus ABI, applications can be compiled with either
gcc  -mv8plus
cc   -xarch=v8plus
For the v9 ABI, applications must be compiled with either
gcc  -m64 -mptr64 -Wa,-xarch=v9 -mcpu=v9
cc   -xarch=v9
Don't be confused by the names of these options, they're called `arch' but they effectively control the ABI.


Go to the first, previous, next, last section, table of contents.