]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
MIPS objdump: Recognize o64 ABI names
authorMaximilian Ciric <max.ciric@gmail.com>
Sat, 22 Feb 2025 20:57:15 +0000 (20:57 +0000)
committerMaciej W. Rozycki <macro@orcam.me.uk>
Sat, 22 Feb 2025 20:57:15 +0000 (20:57 +0000)
commit0e92c0ded9b65a818d968315e5bb9ce636cf8029
tree4b5e045e900ef97504b6a5ae6eb5e4db922d2963
parent00c57bf85d0b3033e24535e0fb45c22b995abc59
MIPS objdump: Recognize o64 ABI names

Add gpr and fpr names for the o64 ABI to objdump.

With the recent addition of both EABIs, this completes support for the
standard ABI options (ABI-breaking options such as -modd-spreg or
-mabi=32 -mfp64 notwithstanding). The names have been verified against
GCC's usage of the registers. Notably, the only(?) documentation that
defines the o64 ABI at

https://gcc.gnu.org/projects/mipso64-abi.html

appears to contain a mistake w.r.t. floating-point arguments. In
particular:

> If the first and second arguments floating-point arguments to a
> function are 32-bit values, they are passed in $f12 and $f14.

As from 4.0.0 this does not happen in GCC's implementation of the ABI;
a pair of single-float arguments are still passed in $f12 and $f13, the
same as when one or both of the arguments are double-precision floats.
The registers $f12, $f13 and $f14 have been named $fa0, $fa1 and $ft10
to match the implementation.

Signed-off-by: Maximilian Ciric <max.ciric@gmail.com>
gas/testsuite/gas/mips/fpr-names-o64.d [new file with mode: 0644]
gas/testsuite/gas/mips/gpr-names-o64.d [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp
opcodes/mips-dis.c