aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2025-02-15 01:30:58 +0000
committerMaciej W. Rozycki <macro@orcam.me.uk>2025-02-15 01:30:58 +0000
commitcaaa18f2128471cfaeda047d0725bef08daeb510 (patch)
tree9087d9a9fbafbf04e2de3011df60b4ab2bcd8cbc /gas
parente8f545e985bafcbecd63af180d08f96d7b9f7f5d (diff)
downloadbinutils-caaa18f2128471cfaeda047d0725bef08daeb510.zip
binutils-caaa18f2128471cfaeda047d0725bef08daeb510.tar.gz
binutils-caaa18f2128471cfaeda047d0725bef08daeb510.tar.bz2
MIPS objdump: Add `eabi32` and `eabi64` ABI options
Extend gpr and fpr register names with names suitable for both EABIs. Heavily inspired by the EABI documenation written by Eric Christopher, which can be read at https://sourceware.org/legacy-ml/binutils/2003-06/msg00436.html 2025-02-15 Anghelo Carvajal <angheloalf95@gmail.com> * mips-dis.c (mips_fpr_names_eabi32): New variable. (mips_fpr_names_eabi64): New variable. (mips_abi_choices): Add "eabi32" and "eabi64" options. Signed-off-by: Anghelo Carvajal <angheloalf95@gmail.com>
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/mips/fpr-names-eabi32.d42
-rw-r--r--gas/testsuite/gas/mips/fpr-names-eabi64.d42
-rw-r--r--gas/testsuite/gas/mips/gpr-names-eabi32.d4
-rw-r--r--gas/testsuite/gas/mips/gpr-names-eabi64.d4
-rw-r--r--gas/testsuite/gas/mips/mips.exp4
5 files changed, 96 insertions, 0 deletions
diff --git a/gas/testsuite/gas/mips/fpr-names-eabi32.d b/gas/testsuite/gas/mips/fpr-names-eabi32.d
new file mode 100644
index 0000000..6d9e674
--- /dev/null
+++ b/gas/testsuite/gas/mips/fpr-names-eabi32.d
@@ -0,0 +1,42 @@
+#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,fpr-names=eabi32
+#name: MIPS FPR disassembly (eabi32)
+#source: fpr-names.s
+
+# Check objdump's handling of -M fpr-names=foo options.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> 44800000 mtc1 \$0,fv0
+0+0004 <[^>]*> 44800800 mtc1 \$0,fv0f
+0+0008 <[^>]*> 44801000 mtc1 \$0,fv1
+0+000c <[^>]*> 44801800 mtc1 \$0,fv1f
+0+0010 <[^>]*> 44802000 mtc1 \$0,ft0
+0+0014 <[^>]*> 44802800 mtc1 \$0,ft0f
+0+0018 <[^>]*> 44803000 mtc1 \$0,ft1
+0+001c <[^>]*> 44803800 mtc1 \$0,ft1f
+0+0020 <[^>]*> 44804000 mtc1 \$0,ft2
+0+0024 <[^>]*> 44804800 mtc1 \$0,ft2f
+0+0028 <[^>]*> 44805000 mtc1 \$0,ft3
+0+002c <[^>]*> 44805800 mtc1 \$0,ft3f
+0+0030 <[^>]*> 44806000 mtc1 \$0,fa0
+0+0034 <[^>]*> 44806800 mtc1 \$0,fa0f
+0+0038 <[^>]*> 44807000 mtc1 \$0,fa1
+0+003c <[^>]*> 44807800 mtc1 \$0,fa1f
+0+0040 <[^>]*> 44808000 mtc1 \$0,fa2
+0+0044 <[^>]*> 44808800 mtc1 \$0,fa2f
+0+0048 <[^>]*> 44809000 mtc1 \$0,fa3
+0+004c <[^>]*> 44809800 mtc1 \$0,fa3f
+0+0050 <[^>]*> 4480a000 mtc1 \$0,fs0
+0+0054 <[^>]*> 4480a800 mtc1 \$0,fs0f
+0+0058 <[^>]*> 4480b000 mtc1 \$0,fs1
+0+005c <[^>]*> 4480b800 mtc1 \$0,fs1f
+0+0060 <[^>]*> 4480c000 mtc1 \$0,fs2
+0+0064 <[^>]*> 4480c800 mtc1 \$0,fs2f
+0+0068 <[^>]*> 4480d000 mtc1 \$0,fs3
+0+006c <[^>]*> 4480d800 mtc1 \$0,fs3f
+0+0070 <[^>]*> 4480e000 mtc1 \$0,fs4
+0+0074 <[^>]*> 4480e800 mtc1 \$0,fs4f
+0+0078 <[^>]*> 4480f000 mtc1 \$0,fs5
+0+007c <[^>]*> 4480f800 mtc1 \$0,fs5f
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/fpr-names-eabi64.d b/gas/testsuite/gas/mips/fpr-names-eabi64.d
new file mode 100644
index 0000000..343feef
--- /dev/null
+++ b/gas/testsuite/gas/mips/fpr-names-eabi64.d
@@ -0,0 +1,42 @@
+#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,fpr-names=eabi64
+#name: MIPS FPR disassembly (eabi64)
+#source: fpr-names.s
+
+# Check objdump's handling of -M fpr-names=foo options.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> 44800000 mtc1 \$0,fv0
+0+0004 <[^>]*> 44800800 mtc1 \$0,fv1
+0+0008 <[^>]*> 44801000 mtc1 \$0,ft0
+0+000c <[^>]*> 44801800 mtc1 \$0,ft1
+0+0010 <[^>]*> 44802000 mtc1 \$0,ft2
+0+0014 <[^>]*> 44802800 mtc1 \$0,ft3
+0+0018 <[^>]*> 44803000 mtc1 \$0,ft4
+0+001c <[^>]*> 44803800 mtc1 \$0,ft5
+0+0020 <[^>]*> 44804000 mtc1 \$0,ft6
+0+0024 <[^>]*> 44804800 mtc1 \$0,ft7
+0+0028 <[^>]*> 44805000 mtc1 \$0,ft8
+0+002c <[^>]*> 44805800 mtc1 \$0,ft9
+0+0030 <[^>]*> 44806000 mtc1 \$0,fa0
+0+0034 <[^>]*> 44806800 mtc1 \$0,fa1
+0+0038 <[^>]*> 44807000 mtc1 \$0,fa2
+0+003c <[^>]*> 44807800 mtc1 \$0,fa3
+0+0040 <[^>]*> 44808000 mtc1 \$0,fa4
+0+0044 <[^>]*> 44808800 mtc1 \$0,fa5
+0+0048 <[^>]*> 44809000 mtc1 \$0,fa6
+0+004c <[^>]*> 44809800 mtc1 \$0,fa7
+0+0050 <[^>]*> 4480a000 mtc1 \$0,fs0
+0+0054 <[^>]*> 4480a800 mtc1 \$0,fs1
+0+0058 <[^>]*> 4480b000 mtc1 \$0,fs2
+0+005c <[^>]*> 4480b800 mtc1 \$0,fs3
+0+0060 <[^>]*> 4480c000 mtc1 \$0,fs4
+0+0064 <[^>]*> 4480c800 mtc1 \$0,fs5
+0+0068 <[^>]*> 4480d000 mtc1 \$0,fs6
+0+006c <[^>]*> 4480d800 mtc1 \$0,fs7
+0+0070 <[^>]*> 4480e000 mtc1 \$0,fs8
+0+0074 <[^>]*> 4480e800 mtc1 \$0,fs9
+0+0078 <[^>]*> 4480f000 mtc1 \$0,fs10
+0+007c <[^>]*> 4480f800 mtc1 \$0,fs11
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/gpr-names-eabi32.d b/gas/testsuite/gas/mips/gpr-names-eabi32.d
new file mode 100644
index 0000000..299dff7
--- /dev/null
+++ b/gas/testsuite/gas/mips/gpr-names-eabi32.d
@@ -0,0 +1,4 @@
+#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=eabi32
+#name: MIPS GPR disassembly (eabi32)
+#source: gpr-names.s
+#dump: gpr-names-64.d
diff --git a/gas/testsuite/gas/mips/gpr-names-eabi64.d b/gas/testsuite/gas/mips/gpr-names-eabi64.d
new file mode 100644
index 0000000..be0a046
--- /dev/null
+++ b/gas/testsuite/gas/mips/gpr-names-eabi64.d
@@ -0,0 +1,4 @@
+#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=eabi64
+#name: MIPS GPR disassembly (eabi64)
+#source: gpr-names.s
+#dump: gpr-names-64.d
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 1b6efda..659ba14 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -1340,11 +1340,15 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "gpr-names-32"
run_dump_test "gpr-names-n32"
run_dump_test "gpr-names-64"
+ run_dump_test "gpr-names-eabi32"
+ run_dump_test "gpr-names-eabi64"
run_dump_test "fpr-names-numeric"
run_dump_test "fpr-names-32"
run_dump_test "fpr-names-n32"
run_dump_test "fpr-names-64"
+ run_dump_test "fpr-names-eabi32"
+ run_dump_test "fpr-names-eabi64"
run_dump_test "cp0-names-numeric"
run_dump_test "cp0-names-r3000"