mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
3abf975826
The binutils testsuite supports involving LD in processing test cases and with the MIPS target that has the same issues the LD testsuite does. So to support LD in the MIPS part of the binutils testsuite similarly to commit86b24e15c4
("MIPS/LD/testsuite: Correct comm-data.exp test ABI/emul/endian arrangement") update the mips.exp test script to: - correctly select emulations for targets using non-traditional MIPS emulations, - correctly select ABIs for targets that do not support all of them, - use the default endianness selection where possible to benefit targets that support only one, - simplify test invocation by providing ABI-specific `run_dump_test' wrappers, specifically `run_dump_test_o32', `run_dump_test_n32' and `run_dump_test_n64', which remove the need to use conditionals across the Expect script or to repeat ABI-specific GAS and LD flags with each invocation, borrowing changes from commit78da84f994
("MIPS/LD/testsuite: Correct mips-elf.exp test ABI/emul/endian arrangement"). As a side effect this disables o32 ABI testing for targets that are not supposed to support them and do not with LD, but still have such support with BFD and GAS due to our inflexibility in configuration. Ultimately we ought to support having o32 completely disabled. binutils/ * testsuite/binutils-all/mips/mips.exp (run_dump_test_abi) (run_dump_test_o32, run_dump_test_n32, run_dump_test_n64): New procedures. (has_newabi): Remove variable. (has_abi, abi_asflags, abi_ldflags): New associative array variables. (irixemul): New variable. Replace `run_dump_test' calls where applicable throughout with `run_dump_test_o32', `run_dump_test_n32' and `run_dump_test_n64' as appropriate. Use `noarch' for tests that require their own architecture setting. * testsuite/binutils-all/mips/mips-ase-1.d: Remove GAS flags. * testsuite/binutils-all/mips/mips-ase-2.d: Likewise. * testsuite/binutils-all/mips/mips-ase-3.d: Likewise. * testsuite/binutils-all/mips/mips-note-2-n32.d: Likewise. * testsuite/binutils-all/mips/mips-note-2-n64.d: Likewise. * testsuite/binutils-all/mips/mips-note-2.d: Likewise. * testsuite/binutils-all/mips/mips-note-2r-n32.d: Likewise. * testsuite/binutils-all/mips/mips-note-2r-n64.d: Likewise. * testsuite/binutils-all/mips/mips-note-2r.d: Likewise. * testsuite/binutils-all/mips/mips-reginfo-n32.d: Likewise. * testsuite/binutils-all/mips/mips-reginfo.d: Likewise. * testsuite/binutils-all/mips/mips16-extend-noinsn.d: Likewise. * testsuite/binutils-all/mips/mips16-pcrel.d: Likewise. * testsuite/binutils-all/mips/mips16-alias.d: Remove `-32' from GAS flags. * testsuite/binutils-all/mips/mips16-extend-insn.d: Likewise. * testsuite/binutils-all/mips/mips16-noalias.d: Likewise. * testsuite/binutils-all/mips/mips16-undecoded.d: Likewise. * testsuite/binutils-all/mips/mips16e2-extend-insn.d: Likewise. * testsuite/binutils-all/mips/mips16e2-undecoded.d: Likewise. * testsuite/binutils-all/mips/mixed-micromips.d: Likewise. * testsuite/binutils-all/mips/mixed-mips16.d: Likewise.
31 lines
935 B
Makefile
31 lines
935 B
Makefile
#PROG: objcopy
|
|
#objdump: -dr --prefix-addresses --show-raw-insn
|
|
#name: Mixed MIPS and microMIPS disassembly
|
|
#as: -mips2
|
|
|
|
# Test mixed-mode disassembly in overlapping sections.
|
|
|
|
.*: +file format .*mips.*
|
|
|
|
Disassembly of section \.text\.foo:
|
|
[0-9a-f]+ <[^>]*> 27bdffe0 addiu sp,sp,-32
|
|
[0-9a-f]+ <[^>]*> afbf001c sw ra,28\(sp\)
|
|
[0-9a-f]+ <[^>]*> 0c000000 jal 00000000 <.*>
|
|
[ ]*[0-9a-f]+: R_MIPS_26 baz
|
|
[0-9a-f]+ <[^>]*> 00000000 nop
|
|
[0-9a-f]+ <[^>]*> 8fbf001c lw ra,28\(sp\)
|
|
[0-9a-f]+ <[^>]*> 03e00008 jr ra
|
|
[0-9a-f]+ <[^>]*> 27bd0020 addiu sp,sp,32
|
|
\.\.\.
|
|
|
|
Disassembly of section \.text\.bar:
|
|
[0-9a-f]+ <[^>]*> 4ff1 addiu sp,sp,-32
|
|
[0-9a-f]+ <[^>]*> cbe7 sw ra,28\(sp\)
|
|
[0-9a-f]+ <[^>]*> 7400 0000 jals 00000000 <.*>
|
|
[ ]*[0-9a-f]+: R_MICROMIPS_26_S1 baz
|
|
[0-9a-f]+ <[^>]*> 0c00 nop
|
|
[0-9a-f]+ <[^>]*> 4be7 lw ra,28\(sp\)
|
|
[0-9a-f]+ <[^>]*> 4708 jraddiusp 32
|
|
[0-9a-f]+ <[^>]*> 0c00 nop
|
|
\.\.\.
|