ATLAS presently supports only the 64-bit ISAs (MIPS III and MIPS IV)
using the ABIs discussed below, which seem to work for Linux and IRIX.
This information is presently priliminary, but as far as I can tell,
both IRIX and Linux use the same ABIs. The only difference appears to
be in their comment character, which is easily worked around by using
C-style comments (assuming you use cpp, as I do).
There seem to be a lot of MIPS ABIs, and different archs use different
ones. As far as I know, Linux follows the SGI/IRIX ABIs, which can
be sorted into the following catagories, based on the IRIX cc
flag or gcc's -mabi= flag:
- -32
- : this is the classic 32 ABI build for old MIPS I MIPS II 32 bit
hardware. Has only 16 fp regs, and integer regs are 32 bits long.
Not presently supported by ATLAS.
- -o64
- : Seems to be a 64-bit extension of -32, which is also
not presently supported by ATLAS.
- -64
- : 64 bit ABI for MIPS III and MIPS IV ISA machines.
Integer regs are 64 bits long, and 32 fp regs are allowed.
Supported by ATLAS.
- -n32
- : 32 bit ABI for MIPS III and MIPS IV ISA machines.
Integer regs are 64 bits long, and 32 fp regs are allowed.
Has same register usage as -64, but integers, longs, and
pointers all 32 bit.
NOTE: rest of this document describes my understanding of -64
and -n32 ABIs only.
MIPS assembler routines in ATLAS should include:
#if !defined(ATL_GAS_MIPS)
#error "This kernel requires MIPS assembler!"
#endif
This quick error exit keeps a non-MIPS assembler from generating hundreds
or thousands of spurious error messages during install.
Subsections
Clint Whaley
2012-07-10