diff options
author | Chris Demetriou <cgd@google.com> | 2002-12-27 08:00:31 +0000 |
---|---|---|
committer | Chris Demetriou <cgd@google.com> | 2002-12-27 08:00:31 +0000 |
commit | 640c0ccdc980483ff7a6c2e7992991f88b8e78a6 (patch) | |
tree | 604436db889a3dd43b182015479360ac86aaa2b2 /gas | |
parent | 59e2218b35c5bb1c4b547133668a3385fe91cc23 (diff) | |
download | gdb-640c0ccdc980483ff7a6c2e7992991f88b8e78a6.zip gdb-640c0ccdc980483ff7a6c2e7992991f88b8e78a6.tar.gz gdb-640c0ccdc980483ff7a6c2e7992991f88b8e78a6.tar.bz2 |
[ binutils/ChangeLog ]
2002-12-27 Chris Demetriou <cgd@broadcom.com>
* doc/binutils.texi (objdump): Document MIPS -M options.
[ gas/testsuite/ChangeLog ]
2002-12-27 Chris Demetriou <cgd@broadcom.com>
* gas/mips/cp0-names-mips32.d: New file.
* gas/mips/cp0-names-mips64.d: New file.
* gas/mips/cp0-names-numeric.d: New file.
* gas/mips/cp0-names-sb1.d: New file.
* gas/mips/cp0-names.s: New file.
* gas/mips/fpr-names-32.d: New file.
* gas/mips/fpr-names-64.d: New file.
* gas/mips/fpr-names-n32.d: New file.
* gas/mips/fpr-names-numeric.d: New file.
* gas/mips/fpr-names.s: New file.
* gas/mips/gpr-names-32.d: New file.
* gas/mips/gpr-names-64.d: New file.
* gas/mips/gpr-names-n32.d: New file.
* gas/mips/gpr-names-numeric.d: New file.
* gas/mips/gpr-names.s: New file.
* gas/mips/mips.exp: Run new tests.
[ include/ChangeLog ]
2002-12-27 Chris Demetriou <cgd@broadcom.com>
* dis-asm.h (print_mips_disassembler_options): Prototype.
[ include/opcode/ChangeLog ]
2002-12-19 Chris Demetriou <cgd@broadcom.com>
* mips.h (OP_OP_COP0, OP_OP_COP1, OP_OP_COP2, OP_OP_COP3)
(OP_OP_LWC1, OP_OP_LWC2, OP_OP_LWC3, OP_OP_LDC1, OP_OP_LDC2)
(OP_OP_LDC3, OP_OP_SWC1, OP_OP_SWC2, OP_OP_SWC3, OP_OP_SDC1)
(OP_OP_SDC2, OP_OP_SDC3): Define.
[ opcodes/ChangeLog ]
2002-12-27 Chris Demetriou <cgd@broadcom.com>
* disassemble.c (disassembler_usage): Add invocation of
print_mips_disassembler_options.
* mips-dis.c (print_mips_disassembler_options)
(set_default_mips_dis_options, parse_mips_dis_option)
(parse_mips_dis_options, choose_abi_by_name, choose_arch_by_name)
(choose_arch_by_number): New functions.
(mips_abi_choice, mips_arch_choice): New structures.
(mips32_reg_names, mips64_reg_names, reg_names): Remove.
(mips_gpr_names_numeric, mips_gpr_names_oldabi)
(mips_gpr_names_newabi, mips_fpr_names_numeric)
(mips_fpr_names_32, mips_fpr_names_n32, mips_fpr_names_64)
(mips_cp0_names_numeric, mips_cp0_names_mips3264)
(mips_cp0_names_sb1, mips_abi_choices, mips_arch_choices)
(mips_processor, mips_isa, mips_gpr_names, mips_fpr_names)
(mips_cp0_names): New variables.
(print_insn_args): Use new variables to print GPR, FPR, and CP0
register names.
(mips_isa_type): Remove.
(print_insn_mips): Remove ISA and CPU setup since it is now done...
(_print_insn_mips): Here. Remove register setup code, and
call set_default_mips_dis_options and parse_mips_dis_options
instead.
(print_mips16_insn_arg): Use mips_gpr_names instead of mips32_names.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/ChangeLog | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/cp0-names-mips32.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/cp0-names-mips64.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/cp0-names-numeric.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/cp0-names-sb1.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/cp0-names.s | 44 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/fpr-names-32.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/fpr-names-64.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/fpr-names-n32.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/fpr-names-numeric.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/fpr-names.s | 44 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/gpr-names-32.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/gpr-names-64.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/gpr-names-n32.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/gpr-names-numeric.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/gpr-names.s | 44 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 17 |
17 files changed, 672 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index fdfc06c..7d1a5cf 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,22 @@ +2002-12-27 Chris Demetriou <cgd@broadcom.com> + + * gas/mips/cp0-names-mips32.d: New file. + * gas/mips/cp0-names-mips64.d: New file. + * gas/mips/cp0-names-numeric.d: New file. + * gas/mips/cp0-names-sb1.d: New file. + * gas/mips/cp0-names.s: New file. + * gas/mips/fpr-names-32.d: New file. + * gas/mips/fpr-names-64.d: New file. + * gas/mips/fpr-names-n32.d: New file. + * gas/mips/fpr-names-numeric.d: New file. + * gas/mips/fpr-names.s: New file. + * gas/mips/gpr-names-32.d: New file. + * gas/mips/gpr-names-64.d: New file. + * gas/mips/gpr-names-n32.d: New file. + * gas/mips/gpr-names-numeric.d: New file. + * gas/mips/gpr-names.s: New file. + * gas/mips/mips.exp: Run new tests. + 2002-12-20 Chris Demetriou <cgd@broadcom.com> * lib/gas-defs.exp (run_dump_test): Add a new optional argument, diff --git a/gas/testsuite/gas/mips/cp0-names-mips32.d b/gas/testsuite/gas/mips/cp0-names-mips32.d new file mode 100644 index 0000000..0054342 --- /dev/null +++ b/gas/testsuite/gas/mips/cp0-names-mips32.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,cp0-names=mips32 +#name: MIPS CP0 register disassembly (mips32) +#source: cp0-names.s + +# Check objdump's handling of -M cp0-names=foo options. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 40800000 mtc0 \$0,c0_index +0+0004 <[^>]*> 40800800 mtc0 \$0,c0_random +0+0008 <[^>]*> 40801000 mtc0 \$0,c0_entrylo0 +0+000c <[^>]*> 40801800 mtc0 \$0,c0_entrylo1 +0+0010 <[^>]*> 40802000 mtc0 \$0,c0_context +0+0014 <[^>]*> 40802800 mtc0 \$0,c0_pagemask +0+0018 <[^>]*> 40803000 mtc0 \$0,c0_wired +0+001c <[^>]*> 40803800 mtc0 \$0,\$7 +0+0020 <[^>]*> 40804000 mtc0 \$0,c0_badvaddr +0+0024 <[^>]*> 40804800 mtc0 \$0,c0_count +0+0028 <[^>]*> 40805000 mtc0 \$0,c0_entryhi +0+002c <[^>]*> 40805800 mtc0 \$0,c0_compare +0+0030 <[^>]*> 40806000 mtc0 \$0,c0_status +0+0034 <[^>]*> 40806800 mtc0 \$0,c0_cause +0+0038 <[^>]*> 40807000 mtc0 \$0,c0_epc +0+003c <[^>]*> 40807800 mtc0 \$0,c0_prid +0+0040 <[^>]*> 40808000 mtc0 \$0,c0_config +0+0044 <[^>]*> 40808800 mtc0 \$0,c0_lladdr +0+0048 <[^>]*> 40809000 mtc0 \$0,c0_watchlo +0+004c <[^>]*> 40809800 mtc0 \$0,c0_watchhi +0+0050 <[^>]*> 4080a000 mtc0 \$0,c0_xcontext +0+0054 <[^>]*> 4080a800 mtc0 \$0,\$21 +0+0058 <[^>]*> 4080b000 mtc0 \$0,\$22 +0+005c <[^>]*> 4080b800 mtc0 \$0,c0_debug +0+0060 <[^>]*> 4080c000 mtc0 \$0,c0_depc +0+0064 <[^>]*> 4080c800 mtc0 \$0,c0_perfcnt +0+0068 <[^>]*> 4080d000 mtc0 \$0,c0_errctl +0+006c <[^>]*> 4080d800 mtc0 \$0,c0_cacheerr +0+0070 <[^>]*> 4080e000 mtc0 \$0,c0_taglo +0+0074 <[^>]*> 4080e800 mtc0 \$0,c0_taghi +0+0078 <[^>]*> 4080f000 mtc0 \$0,c0_errorepc +0+007c <[^>]*> 4080f800 mtc0 \$0,c0_desave + \.\.\. diff --git a/gas/testsuite/gas/mips/cp0-names-mips64.d b/gas/testsuite/gas/mips/cp0-names-mips64.d new file mode 100644 index 0000000..e92ffe8 --- /dev/null +++ b/gas/testsuite/gas/mips/cp0-names-mips64.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,cp0-names=mips64 +#name: MIPS CP0 register disassembly (mips64) +#source: cp0-names.s + +# Check objdump's handling of -M cp0-names=foo options. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 40800000 mtc0 \$0,c0_index +0+0004 <[^>]*> 40800800 mtc0 \$0,c0_random +0+0008 <[^>]*> 40801000 mtc0 \$0,c0_entrylo0 +0+000c <[^>]*> 40801800 mtc0 \$0,c0_entrylo1 +0+0010 <[^>]*> 40802000 mtc0 \$0,c0_context +0+0014 <[^>]*> 40802800 mtc0 \$0,c0_pagemask +0+0018 <[^>]*> 40803000 mtc0 \$0,c0_wired +0+001c <[^>]*> 40803800 mtc0 \$0,\$7 +0+0020 <[^>]*> 40804000 mtc0 \$0,c0_badvaddr +0+0024 <[^>]*> 40804800 mtc0 \$0,c0_count +0+0028 <[^>]*> 40805000 mtc0 \$0,c0_entryhi +0+002c <[^>]*> 40805800 mtc0 \$0,c0_compare +0+0030 <[^>]*> 40806000 mtc0 \$0,c0_status +0+0034 <[^>]*> 40806800 mtc0 \$0,c0_cause +0+0038 <[^>]*> 40807000 mtc0 \$0,c0_epc +0+003c <[^>]*> 40807800 mtc0 \$0,c0_prid +0+0040 <[^>]*> 40808000 mtc0 \$0,c0_config +0+0044 <[^>]*> 40808800 mtc0 \$0,c0_lladdr +0+0048 <[^>]*> 40809000 mtc0 \$0,c0_watchlo +0+004c <[^>]*> 40809800 mtc0 \$0,c0_watchhi +0+0050 <[^>]*> 4080a000 mtc0 \$0,c0_xcontext +0+0054 <[^>]*> 4080a800 mtc0 \$0,\$21 +0+0058 <[^>]*> 4080b000 mtc0 \$0,\$22 +0+005c <[^>]*> 4080b800 mtc0 \$0,c0_debug +0+0060 <[^>]*> 4080c000 mtc0 \$0,c0_depc +0+0064 <[^>]*> 4080c800 mtc0 \$0,c0_perfcnt +0+0068 <[^>]*> 4080d000 mtc0 \$0,c0_errctl +0+006c <[^>]*> 4080d800 mtc0 \$0,c0_cacheerr +0+0070 <[^>]*> 4080e000 mtc0 \$0,c0_taglo +0+0074 <[^>]*> 4080e800 mtc0 \$0,c0_taghi +0+0078 <[^>]*> 4080f000 mtc0 \$0,c0_errorepc +0+007c <[^>]*> 4080f800 mtc0 \$0,c0_desave + \.\.\. diff --git a/gas/testsuite/gas/mips/cp0-names-numeric.d b/gas/testsuite/gas/mips/cp0-names-numeric.d new file mode 100644 index 0000000..2732375 --- /dev/null +++ b/gas/testsuite/gas/mips/cp0-names-numeric.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,cp0-names=numeric +#name: MIPS CP0 register disassembly (numeric) +#source: cp0-names.s + +# Check objdump's handling of -M cp0-names=foo options. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 40800000 mtc0 \$0,\$0 +0+0004 <[^>]*> 40800800 mtc0 \$0,\$1 +0+0008 <[^>]*> 40801000 mtc0 \$0,\$2 +0+000c <[^>]*> 40801800 mtc0 \$0,\$3 +0+0010 <[^>]*> 40802000 mtc0 \$0,\$4 +0+0014 <[^>]*> 40802800 mtc0 \$0,\$5 +0+0018 <[^>]*> 40803000 mtc0 \$0,\$6 +0+001c <[^>]*> 40803800 mtc0 \$0,\$7 +0+0020 <[^>]*> 40804000 mtc0 \$0,\$8 +0+0024 <[^>]*> 40804800 mtc0 \$0,\$9 +0+0028 <[^>]*> 40805000 mtc0 \$0,\$10 +0+002c <[^>]*> 40805800 mtc0 \$0,\$11 +0+0030 <[^>]*> 40806000 mtc0 \$0,\$12 +0+0034 <[^>]*> 40806800 mtc0 \$0,\$13 +0+0038 <[^>]*> 40807000 mtc0 \$0,\$14 +0+003c <[^>]*> 40807800 mtc0 \$0,\$15 +0+0040 <[^>]*> 40808000 mtc0 \$0,\$16 +0+0044 <[^>]*> 40808800 mtc0 \$0,\$17 +0+0048 <[^>]*> 40809000 mtc0 \$0,\$18 +0+004c <[^>]*> 40809800 mtc0 \$0,\$19 +0+0050 <[^>]*> 4080a000 mtc0 \$0,\$20 +0+0054 <[^>]*> 4080a800 mtc0 \$0,\$21 +0+0058 <[^>]*> 4080b000 mtc0 \$0,\$22 +0+005c <[^>]*> 4080b800 mtc0 \$0,\$23 +0+0060 <[^>]*> 4080c000 mtc0 \$0,\$24 +0+0064 <[^>]*> 4080c800 mtc0 \$0,\$25 +0+0068 <[^>]*> 4080d000 mtc0 \$0,\$26 +0+006c <[^>]*> 4080d800 mtc0 \$0,\$27 +0+0070 <[^>]*> 4080e000 mtc0 \$0,\$28 +0+0074 <[^>]*> 4080e800 mtc0 \$0,\$29 +0+0078 <[^>]*> 4080f000 mtc0 \$0,\$30 +0+007c <[^>]*> 4080f800 mtc0 \$0,\$31 + \.\.\. diff --git a/gas/testsuite/gas/mips/cp0-names-sb1.d b/gas/testsuite/gas/mips/cp0-names-sb1.d new file mode 100644 index 0000000..97fea54 --- /dev/null +++ b/gas/testsuite/gas/mips/cp0-names-sb1.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,cp0-names=sb1 +#name: MIPS CP0 register disassembly (sb1) +#source: cp0-names.s + +# Check objdump's handling of -M cp0-names=foo options. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 40800000 mtc0 \$0,c0_index +0+0004 <[^>]*> 40800800 mtc0 \$0,c0_random +0+0008 <[^>]*> 40801000 mtc0 \$0,c0_entrylo0 +0+000c <[^>]*> 40801800 mtc0 \$0,c0_entrylo1 +0+0010 <[^>]*> 40802000 mtc0 \$0,c0_context +0+0014 <[^>]*> 40802800 mtc0 \$0,c0_pagemask +0+0018 <[^>]*> 40803000 mtc0 \$0,c0_wired +0+001c <[^>]*> 40803800 mtc0 \$0,\$7 +0+0020 <[^>]*> 40804000 mtc0 \$0,c0_badvaddr +0+0024 <[^>]*> 40804800 mtc0 \$0,c0_count +0+0028 <[^>]*> 40805000 mtc0 \$0,c0_entryhi +0+002c <[^>]*> 40805800 mtc0 \$0,c0_compare +0+0030 <[^>]*> 40806000 mtc0 \$0,c0_status +0+0034 <[^>]*> 40806800 mtc0 \$0,c0_cause +0+0038 <[^>]*> 40807000 mtc0 \$0,c0_epc +0+003c <[^>]*> 40807800 mtc0 \$0,c0_prid +0+0040 <[^>]*> 40808000 mtc0 \$0,c0_config +0+0044 <[^>]*> 40808800 mtc0 \$0,c0_lladdr +0+0048 <[^>]*> 40809000 mtc0 \$0,c0_watchlo +0+004c <[^>]*> 40809800 mtc0 \$0,c0_watchhi +0+0050 <[^>]*> 4080a000 mtc0 \$0,c0_xcontext +0+0054 <[^>]*> 4080a800 mtc0 \$0,\$21 +0+0058 <[^>]*> 4080b000 mtc0 \$0,\$22 +0+005c <[^>]*> 4080b800 mtc0 \$0,c0_debug +0+0060 <[^>]*> 4080c000 mtc0 \$0,c0_depc +0+0064 <[^>]*> 4080c800 mtc0 \$0,c0_perfcnt +0+0068 <[^>]*> 4080d000 mtc0 \$0,c0_errctl +0+006c <[^>]*> 4080d800 mtc0 \$0,c0_cacheerr_i +0+0070 <[^>]*> 4080e000 mtc0 \$0,c0_taglo_i +0+0074 <[^>]*> 4080e800 mtc0 \$0,c0_taghi_i +0+0078 <[^>]*> 4080f000 mtc0 \$0,c0_errorepc +0+007c <[^>]*> 4080f800 mtc0 \$0,c0_desave + \.\.\. diff --git a/gas/testsuite/gas/mips/cp0-names.s b/gas/testsuite/gas/mips/cp0-names.s new file mode 100644 index 0000000..2395f72 --- /dev/null +++ b/gas/testsuite/gas/mips/cp0-names.s @@ -0,0 +1,44 @@ +# source file to test objdump's disassembly using various styles of +# CP0 register names. + + .set noreorder + .set noat + + .globl text_label .text +text_label: + + mtc0 $0, $0 + mtc0 $0, $1 + mtc0 $0, $2 + mtc0 $0, $3 + mtc0 $0, $4 + mtc0 $0, $5 + mtc0 $0, $6 + mtc0 $0, $7 + mtc0 $0, $8 + mtc0 $0, $9 + mtc0 $0, $10 + mtc0 $0, $11 + mtc0 $0, $12 + mtc0 $0, $13 + mtc0 $0, $14 + mtc0 $0, $15 + mtc0 $0, $16 + mtc0 $0, $17 + mtc0 $0, $18 + mtc0 $0, $19 + mtc0 $0, $20 + mtc0 $0, $21 + mtc0 $0, $22 + mtc0 $0, $23 + mtc0 $0, $24 + mtc0 $0, $25 + mtc0 $0, $26 + mtc0 $0, $27 + mtc0 $0, $28 + mtc0 $0, $29 + mtc0 $0, $30 + mtc0 $0, $31 + +# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... + .space 8 diff --git a/gas/testsuite/gas/mips/fpr-names-32.d b/gas/testsuite/gas/mips/fpr-names-32.d new file mode 100644 index 0000000..b34e8c4 --- /dev/null +++ b/gas/testsuite/gas/mips/fpr-names-32.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,fpr-names=32 +#name: MIPS FPR disassembly (32) +#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,ft4 +0+0044 <[^>]*> 44808800 mtc1 \$0,ft4f +0+0048 <[^>]*> 44809000 mtc1 \$0,ft5 +0+004c <[^>]*> 44809800 mtc1 \$0,ft5f +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-64.d b/gas/testsuite/gas/mips/fpr-names-64.d new file mode 100644 index 0000000..8924215 --- /dev/null +++ b/gas/testsuite/gas/mips/fpr-names-64.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,fpr-names=64 +#name: MIPS FPR disassembly (64) +#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,ft12 +0+0008 <[^>]*> 44801000 mtc1 \$0,fv1 +0+000c <[^>]*> 44801800 mtc1 \$0,ft13 +0+0010 <[^>]*> 44802000 mtc1 \$0,ft0 +0+0014 <[^>]*> 44802800 mtc1 \$0,ft1 +0+0018 <[^>]*> 44803000 mtc1 \$0,ft2 +0+001c <[^>]*> 44803800 mtc1 \$0,ft3 +0+0020 <[^>]*> 44804000 mtc1 \$0,ft4 +0+0024 <[^>]*> 44804800 mtc1 \$0,ft5 +0+0028 <[^>]*> 44805000 mtc1 \$0,ft6 +0+002c <[^>]*> 44805800 mtc1 \$0,ft7 +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,ft8 +0+0054 <[^>]*> 4480a800 mtc1 \$0,ft9 +0+0058 <[^>]*> 4480b000 mtc1 \$0,ft10 +0+005c <[^>]*> 4480b800 mtc1 \$0,ft11 +0+0060 <[^>]*> 4480c000 mtc1 \$0,fs0 +0+0064 <[^>]*> 4480c800 mtc1 \$0,fs1 +0+0068 <[^>]*> 4480d000 mtc1 \$0,fs2 +0+006c <[^>]*> 4480d800 mtc1 \$0,fs3 +0+0070 <[^>]*> 4480e000 mtc1 \$0,fs4 +0+0074 <[^>]*> 4480e800 mtc1 \$0,fs5 +0+0078 <[^>]*> 4480f000 mtc1 \$0,fs6 +0+007c <[^>]*> 4480f800 mtc1 \$0,fs7 + \.\.\. diff --git a/gas/testsuite/gas/mips/fpr-names-n32.d b/gas/testsuite/gas/mips/fpr-names-n32.d new file mode 100644 index 0000000..ef811f1 --- /dev/null +++ b/gas/testsuite/gas/mips/fpr-names-n32.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,fpr-names=n32 +#name: MIPS FPR disassembly (n32) +#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,ft14 +0+0008 <[^>]*> 44801000 mtc1 \$0,fv1 +0+000c <[^>]*> 44801800 mtc1 \$0,ft15 +0+0010 <[^>]*> 44802000 mtc1 \$0,ft0 +0+0014 <[^>]*> 44802800 mtc1 \$0,ft1 +0+0018 <[^>]*> 44803000 mtc1 \$0,ft2 +0+001c <[^>]*> 44803800 mtc1 \$0,ft3 +0+0020 <[^>]*> 44804000 mtc1 \$0,ft4 +0+0024 <[^>]*> 44804800 mtc1 \$0,ft5 +0+0028 <[^>]*> 44805000 mtc1 \$0,ft6 +0+002c <[^>]*> 44805800 mtc1 \$0,ft7 +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,ft8 +0+0058 <[^>]*> 4480b000 mtc1 \$0,fs1 +0+005c <[^>]*> 4480b800 mtc1 \$0,ft9 +0+0060 <[^>]*> 4480c000 mtc1 \$0,fs2 +0+0064 <[^>]*> 4480c800 mtc1 \$0,ft10 +0+0068 <[^>]*> 4480d000 mtc1 \$0,fs3 +0+006c <[^>]*> 4480d800 mtc1 \$0,ft11 +0+0070 <[^>]*> 4480e000 mtc1 \$0,fs4 +0+0074 <[^>]*> 4480e800 mtc1 \$0,ft12 +0+0078 <[^>]*> 4480f000 mtc1 \$0,fs5 +0+007c <[^>]*> 4480f800 mtc1 \$0,ft13 + \.\.\. diff --git a/gas/testsuite/gas/mips/fpr-names-numeric.d b/gas/testsuite/gas/mips/fpr-names-numeric.d new file mode 100644 index 0000000..08b20b2 --- /dev/null +++ b/gas/testsuite/gas/mips/fpr-names-numeric.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric,fpr-names=numeric +#name: MIPS FPR disassembly (numeric) +#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,\$f0 +0+0004 <[^>]*> 44800800 mtc1 \$0,\$f1 +0+0008 <[^>]*> 44801000 mtc1 \$0,\$f2 +0+000c <[^>]*> 44801800 mtc1 \$0,\$f3 +0+0010 <[^>]*> 44802000 mtc1 \$0,\$f4 +0+0014 <[^>]*> 44802800 mtc1 \$0,\$f5 +0+0018 <[^>]*> 44803000 mtc1 \$0,\$f6 +0+001c <[^>]*> 44803800 mtc1 \$0,\$f7 +0+0020 <[^>]*> 44804000 mtc1 \$0,\$f8 +0+0024 <[^>]*> 44804800 mtc1 \$0,\$f9 +0+0028 <[^>]*> 44805000 mtc1 \$0,\$f10 +0+002c <[^>]*> 44805800 mtc1 \$0,\$f11 +0+0030 <[^>]*> 44806000 mtc1 \$0,\$f12 +0+0034 <[^>]*> 44806800 mtc1 \$0,\$f13 +0+0038 <[^>]*> 44807000 mtc1 \$0,\$f14 +0+003c <[^>]*> 44807800 mtc1 \$0,\$f15 +0+0040 <[^>]*> 44808000 mtc1 \$0,\$f16 +0+0044 <[^>]*> 44808800 mtc1 \$0,\$f17 +0+0048 <[^>]*> 44809000 mtc1 \$0,\$f18 +0+004c <[^>]*> 44809800 mtc1 \$0,\$f19 +0+0050 <[^>]*> 4480a000 mtc1 \$0,\$f20 +0+0054 <[^>]*> 4480a800 mtc1 \$0,\$f21 +0+0058 <[^>]*> 4480b000 mtc1 \$0,\$f22 +0+005c <[^>]*> 4480b800 mtc1 \$0,\$f23 +0+0060 <[^>]*> 4480c000 mtc1 \$0,\$f24 +0+0064 <[^>]*> 4480c800 mtc1 \$0,\$f25 +0+0068 <[^>]*> 4480d000 mtc1 \$0,\$f26 +0+006c <[^>]*> 4480d800 mtc1 \$0,\$f27 +0+0070 <[^>]*> 4480e000 mtc1 \$0,\$f28 +0+0074 <[^>]*> 4480e800 mtc1 \$0,\$f29 +0+0078 <[^>]*> 4480f000 mtc1 \$0,\$f30 +0+007c <[^>]*> 4480f800 mtc1 \$0,\$f31 + \.\.\. diff --git a/gas/testsuite/gas/mips/fpr-names.s b/gas/testsuite/gas/mips/fpr-names.s new file mode 100644 index 0000000..1f14d64 --- /dev/null +++ b/gas/testsuite/gas/mips/fpr-names.s @@ -0,0 +1,44 @@ +# source file to test objdump's disassembly using various styles of +# FPR names. + + .set noreorder + .set noat + + .globl text_label .text +text_label: + + mtc1 $0, $f0 + mtc1 $0, $f1 + mtc1 $0, $f2 + mtc1 $0, $f3 + mtc1 $0, $f4 + mtc1 $0, $f5 + mtc1 $0, $f6 + mtc1 $0, $f7 + mtc1 $0, $f8 + mtc1 $0, $f9 + mtc1 $0, $f10 + mtc1 $0, $f11 + mtc1 $0, $f12 + mtc1 $0, $f13 + mtc1 $0, $f14 + mtc1 $0, $f15 + mtc1 $0, $f16 + mtc1 $0, $f17 + mtc1 $0, $f18 + mtc1 $0, $f19 + mtc1 $0, $f20 + mtc1 $0, $f21 + mtc1 $0, $f22 + mtc1 $0, $f23 + mtc1 $0, $f24 + mtc1 $0, $f25 + mtc1 $0, $f26 + mtc1 $0, $f27 + mtc1 $0, $f28 + mtc1 $0, $f29 + mtc1 $0, $f30 + mtc1 $0, $f31 + +# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... + .space 8 diff --git a/gas/testsuite/gas/mips/gpr-names-32.d b/gas/testsuite/gas/mips/gpr-names-32.d new file mode 100644 index 0000000..6d22b93 --- /dev/null +++ b/gas/testsuite/gas/mips/gpr-names-32.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=32 +#name: MIPS GPR disassembly (32) +#source: gpr-names.s + +# Check objdump's handling of -M gpr-names=foo options. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 3c000000 lui zero,0x0 +0+0004 <[^>]*> 3c010000 lui at,0x0 +0+0008 <[^>]*> 3c020000 lui v0,0x0 +0+000c <[^>]*> 3c030000 lui v1,0x0 +0+0010 <[^>]*> 3c040000 lui a0,0x0 +0+0014 <[^>]*> 3c050000 lui a1,0x0 +0+0018 <[^>]*> 3c060000 lui a2,0x0 +0+001c <[^>]*> 3c070000 lui a3,0x0 +0+0020 <[^>]*> 3c080000 lui t0,0x0 +0+0024 <[^>]*> 3c090000 lui t1,0x0 +0+0028 <[^>]*> 3c0a0000 lui t2,0x0 +0+002c <[^>]*> 3c0b0000 lui t3,0x0 +0+0030 <[^>]*> 3c0c0000 lui t4,0x0 +0+0034 <[^>]*> 3c0d0000 lui t5,0x0 +0+0038 <[^>]*> 3c0e0000 lui t6,0x0 +0+003c <[^>]*> 3c0f0000 lui t7,0x0 +0+0040 <[^>]*> 3c100000 lui s0,0x0 +0+0044 <[^>]*> 3c110000 lui s1,0x0 +0+0048 <[^>]*> 3c120000 lui s2,0x0 +0+004c <[^>]*> 3c130000 lui s3,0x0 +0+0050 <[^>]*> 3c140000 lui s4,0x0 +0+0054 <[^>]*> 3c150000 lui s5,0x0 +0+0058 <[^>]*> 3c160000 lui s6,0x0 +0+005c <[^>]*> 3c170000 lui s7,0x0 +0+0060 <[^>]*> 3c180000 lui t8,0x0 +0+0064 <[^>]*> 3c190000 lui t9,0x0 +0+0068 <[^>]*> 3c1a0000 lui k0,0x0 +0+006c <[^>]*> 3c1b0000 lui k1,0x0 +0+0070 <[^>]*> 3c1c0000 lui gp,0x0 +0+0074 <[^>]*> 3c1d0000 lui sp,0x0 +0+0078 <[^>]*> 3c1e0000 lui s8,0x0 +0+007c <[^>]*> 3c1f0000 lui ra,0x0 + \.\.\. diff --git a/gas/testsuite/gas/mips/gpr-names-64.d b/gas/testsuite/gas/mips/gpr-names-64.d new file mode 100644 index 0000000..e724833 --- /dev/null +++ b/gas/testsuite/gas/mips/gpr-names-64.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=64 +#name: MIPS GPR disassembly (64) +#source: gpr-names.s + +# Check objdump's handling of -M gpr-names=foo options. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 3c000000 lui zero,0x0 +0+0004 <[^>]*> 3c010000 lui at,0x0 +0+0008 <[^>]*> 3c020000 lui v0,0x0 +0+000c <[^>]*> 3c030000 lui v1,0x0 +0+0010 <[^>]*> 3c040000 lui a0,0x0 +0+0014 <[^>]*> 3c050000 lui a1,0x0 +0+0018 <[^>]*> 3c060000 lui a2,0x0 +0+001c <[^>]*> 3c070000 lui a3,0x0 +0+0020 <[^>]*> 3c080000 lui a4,0x0 +0+0024 <[^>]*> 3c090000 lui a5,0x0 +0+0028 <[^>]*> 3c0a0000 lui a6,0x0 +0+002c <[^>]*> 3c0b0000 lui a7,0x0 +0+0030 <[^>]*> 3c0c0000 lui t0,0x0 +0+0034 <[^>]*> 3c0d0000 lui t1,0x0 +0+0038 <[^>]*> 3c0e0000 lui t2,0x0 +0+003c <[^>]*> 3c0f0000 lui t3,0x0 +0+0040 <[^>]*> 3c100000 lui s0,0x0 +0+0044 <[^>]*> 3c110000 lui s1,0x0 +0+0048 <[^>]*> 3c120000 lui s2,0x0 +0+004c <[^>]*> 3c130000 lui s3,0x0 +0+0050 <[^>]*> 3c140000 lui s4,0x0 +0+0054 <[^>]*> 3c150000 lui s5,0x0 +0+0058 <[^>]*> 3c160000 lui s6,0x0 +0+005c <[^>]*> 3c170000 lui s7,0x0 +0+0060 <[^>]*> 3c180000 lui t8,0x0 +0+0064 <[^>]*> 3c190000 lui t9,0x0 +0+0068 <[^>]*> 3c1a0000 lui k0,0x0 +0+006c <[^>]*> 3c1b0000 lui k1,0x0 +0+0070 <[^>]*> 3c1c0000 lui gp,0x0 +0+0074 <[^>]*> 3c1d0000 lui sp,0x0 +0+0078 <[^>]*> 3c1e0000 lui s8,0x0 +0+007c <[^>]*> 3c1f0000 lui ra,0x0 + \.\.\. diff --git a/gas/testsuite/gas/mips/gpr-names-n32.d b/gas/testsuite/gas/mips/gpr-names-n32.d new file mode 100644 index 0000000..2a41934 --- /dev/null +++ b/gas/testsuite/gas/mips/gpr-names-n32.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=n32 +#name: MIPS GPR disassembly (n32) +#source: gpr-names.s + +# Check objdump's handling of -M gpr-names=foo options. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 3c000000 lui zero,0x0 +0+0004 <[^>]*> 3c010000 lui at,0x0 +0+0008 <[^>]*> 3c020000 lui v0,0x0 +0+000c <[^>]*> 3c030000 lui v1,0x0 +0+0010 <[^>]*> 3c040000 lui a0,0x0 +0+0014 <[^>]*> 3c050000 lui a1,0x0 +0+0018 <[^>]*> 3c060000 lui a2,0x0 +0+001c <[^>]*> 3c070000 lui a3,0x0 +0+0020 <[^>]*> 3c080000 lui a4,0x0 +0+0024 <[^>]*> 3c090000 lui a5,0x0 +0+0028 <[^>]*> 3c0a0000 lui a6,0x0 +0+002c <[^>]*> 3c0b0000 lui a7,0x0 +0+0030 <[^>]*> 3c0c0000 lui t0,0x0 +0+0034 <[^>]*> 3c0d0000 lui t1,0x0 +0+0038 <[^>]*> 3c0e0000 lui t2,0x0 +0+003c <[^>]*> 3c0f0000 lui t3,0x0 +0+0040 <[^>]*> 3c100000 lui s0,0x0 +0+0044 <[^>]*> 3c110000 lui s1,0x0 +0+0048 <[^>]*> 3c120000 lui s2,0x0 +0+004c <[^>]*> 3c130000 lui s3,0x0 +0+0050 <[^>]*> 3c140000 lui s4,0x0 +0+0054 <[^>]*> 3c150000 lui s5,0x0 +0+0058 <[^>]*> 3c160000 lui s6,0x0 +0+005c <[^>]*> 3c170000 lui s7,0x0 +0+0060 <[^>]*> 3c180000 lui t8,0x0 +0+0064 <[^>]*> 3c190000 lui t9,0x0 +0+0068 <[^>]*> 3c1a0000 lui k0,0x0 +0+006c <[^>]*> 3c1b0000 lui k1,0x0 +0+0070 <[^>]*> 3c1c0000 lui gp,0x0 +0+0074 <[^>]*> 3c1d0000 lui sp,0x0 +0+0078 <[^>]*> 3c1e0000 lui s8,0x0 +0+007c <[^>]*> 3c1f0000 lui ra,0x0 + \.\.\. diff --git a/gas/testsuite/gas/mips/gpr-names-numeric.d b/gas/testsuite/gas/mips/gpr-names-numeric.d new file mode 100644 index 0000000..58fe3c0 --- /dev/null +++ b/gas/testsuite/gas/mips/gpr-names-numeric.d @@ -0,0 +1,42 @@ +#objdump: -dr --prefix-addresses --show-raw-insn -M gpr-names=numeric +#name: MIPS GPR disassembly (numeric) +#source: gpr-names.s + +# Check objdump's handling of -M gpr-names=foo options. + +.*: +file format .*mips.* + +Disassembly of section .text: +0+0000 <[^>]*> 3c000000 lui \$0,0x0 +0+0004 <[^>]*> 3c010000 lui \$1,0x0 +0+0008 <[^>]*> 3c020000 lui \$2,0x0 +0+000c <[^>]*> 3c030000 lui \$3,0x0 +0+0010 <[^>]*> 3c040000 lui \$4,0x0 +0+0014 <[^>]*> 3c050000 lui \$5,0x0 +0+0018 <[^>]*> 3c060000 lui \$6,0x0 +0+001c <[^>]*> 3c070000 lui \$7,0x0 +0+0020 <[^>]*> 3c080000 lui \$8,0x0 +0+0024 <[^>]*> 3c090000 lui \$9,0x0 +0+0028 <[^>]*> 3c0a0000 lui \$10,0x0 +0+002c <[^>]*> 3c0b0000 lui \$11,0x0 +0+0030 <[^>]*> 3c0c0000 lui \$12,0x0 +0+0034 <[^>]*> 3c0d0000 lui \$13,0x0 +0+0038 <[^>]*> 3c0e0000 lui \$14,0x0 +0+003c <[^>]*> 3c0f0000 lui \$15,0x0 +0+0040 <[^>]*> 3c100000 lui \$16,0x0 +0+0044 <[^>]*> 3c110000 lui \$17,0x0 +0+0048 <[^>]*> 3c120000 lui \$18,0x0 +0+004c <[^>]*> 3c130000 lui \$19,0x0 +0+0050 <[^>]*> 3c140000 lui \$20,0x0 +0+0054 <[^>]*> 3c150000 lui \$21,0x0 +0+0058 <[^>]*> 3c160000 lui \$22,0x0 +0+005c <[^>]*> 3c170000 lui \$23,0x0 +0+0060 <[^>]*> 3c180000 lui \$24,0x0 +0+0064 <[^>]*> 3c190000 lui \$25,0x0 +0+0068 <[^>]*> 3c1a0000 lui \$26,0x0 +0+006c <[^>]*> 3c1b0000 lui \$27,0x0 +0+0070 <[^>]*> 3c1c0000 lui \$28,0x0 +0+0074 <[^>]*> 3c1d0000 lui \$29,0x0 +0+0078 <[^>]*> 3c1e0000 lui \$30,0x0 +0+007c <[^>]*> 3c1f0000 lui \$31,0x0 + \.\.\. diff --git a/gas/testsuite/gas/mips/gpr-names.s b/gas/testsuite/gas/mips/gpr-names.s new file mode 100644 index 0000000..2637dab --- /dev/null +++ b/gas/testsuite/gas/mips/gpr-names.s @@ -0,0 +1,44 @@ +# source file to test objdump's disassembly using various styles of +# GPR names. + + .set noreorder + .set noat + + .globl text_label .text +text_label: + + lui $0, 0 + lui $1, 0 + lui $2, 0 + lui $3, 0 + lui $4, 0 + lui $5, 0 + lui $6, 0 + lui $7, 0 + lui $8, 0 + lui $9, 0 + lui $10, 0 + lui $11, 0 + lui $12, 0 + lui $13, 0 + lui $14, 0 + lui $15, 0 + lui $16, 0 + lui $17, 0 + lui $18, 0 + lui $19, 0 + lui $20, 0 + lui $21, 0 + lui $22, 0 + lui $23, 0 + lui $24, 0 + lui $25, 0 + lui $26, 0 + lui $27, 0 + lui $28, 0 + lui $29, 0 + lui $30, 0 + lui $31, 0 + +# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ... + .space 8 diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index b47499c..00ab585 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -234,4 +234,21 @@ if { [istarget mips*-*-*] } then { } run_dump_test "elf-consthilo" } + + # tests of objdump's ability to disassemble using different + # register names. + run_dump_test "gpr-names-numeric" + run_dump_test "gpr-names-32" + run_dump_test "gpr-names-n32" + run_dump_test "gpr-names-64" + + 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 "cp0-names-numeric" + run_dump_test "cp0-names-mips32" + run_dump_test "cp0-names-mips64" + run_dump_test "cp0-names-sb1" } |