[PATCH] MIPS/gas/testsuite: Additional MIPS16 reloc conversion tests
Maciej W. Rozycki
macro@codesourcery.com
Thu Oct 27 21:29:00 GMT 2011
More information about the Binutils mailing list
Thu Oct 27 21:29:00 GMT 2011
- Previous message (by thread): [PATCH] MIPS/binutils: microMIPS linker relaxation fixes
- Next message (by thread): [gold patch] Add --no-gnu-unique option to disable STB_GNU_UNIQUE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, Here are some additional bits for New ABI MIPS16 reloc conversion tests that I decided to split off from the microMIPS linker relaxation fix to reduce the number of cascading changes there. As it turned out the current state of our test framework does not allow dropping MIPS16 non-default-ISA cases into multi-architecture tests, I decided the MIPS16 architecture needs to be split. At this point I only created a MIPS-III MIPS16 (sub)architecture to cover 64-bit MIPS16 targets. This in turn required some changes to other test runs that assumed they can support any architecture that has 64-bit registers. I have switched them to MIPS-III as that amounts to same, but excludes MIPS16. Eventually we may want to have MIPS32 and MIPS64 (sub)architectures too to cover MIPS16e additions. Tested with mips-sde-elf and mips-linux-gnu, no regressions. OK to apply? 2011-10-27 Maciej W. Rozycki <macro@codesourcery.com> gas/testsuite/ * gas/mips/mips16-3@elf-rel29.d: New test. * gas/mips/mips16-3@elf-rel29-n32.d: Likewise. * gas/mips/mips16-3@elf-rel29-n64.d: Likewise. * gas/mips/mips16-3@loc-swap.d: Likewise. * gas/mips/mips16-3@loc-swap-dis.d: Likewise. * gas/mips/mips16-3@loc-swap-2.d: Likewise. * gas/mips/mips16-3@relax-swap3.d: Likewise. * gas/mips/mips.exp: Remove -mmips:16 from "mips16" architecture. Define new "mips16-3" architecture. Limit "rol64", "rol64-hw", "elf${el}-rel2", and "elf-rel4" tests to "mips3". Extend "elf-rel29-n32" and "elf-rel29-n64" tests to "gpr64". Maciej binutils-gas-test-mips16-isa3.diff Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips.exp =================================================================== --- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips.exp 2011-10-27 21:32:24.000000000 +0100 +++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips.exp 2011-10-27 22:11:12.155897671 +0100 @@ -394,7 +394,9 @@ mips_arch_create mips64r2 64 mips64 { mi { -mmips:isa64r2 } \ { mipsisa64r2-*-* mipsisa64r2el-*-* } mips_arch_create mips16 32 {} {} \ - { -march=mips1 -mips16 } { -mmips:16 } + { -march=mips1 -mips16 } {} +mips_arch_create mips16-3 64 mips16 {} \ + { -march=mips3 -mips16 } { -mmips:4000 } mips_arch_create micromips 64 mips64r2 {} \ { -march=mips64 -mmicromips } {} mips_arch_create r3000 32 mips1 {} \ @@ -640,8 +642,8 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test_arches "rol" [mips_arch_list_matching mips1 !ror] run_dump_test_arches "rol-hw" [mips_arch_list_matching ror] - run_dump_test_arches "rol64" [mips_arch_list_matching gpr64 !ror] - run_dump_test_arches "rol64-hw" [mips_arch_list_matching gpr64 ror] + run_dump_test_arches "rol64" [mips_arch_list_matching mips3 !ror] + run_dump_test_arches "rol64-hw" [mips_arch_list_matching mips3 ror] if !$aout { run_dump_test "sb" } run_dump_test "trunc" @@ -809,10 +811,10 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "mips-abi32-pic2" run_dump_test "elf${el}-rel" - run_dump_test_arches "elf${el}-rel2" [mips_arch_list_matching gpr64] + run_dump_test_arches "elf${el}-rel2" [mips_arch_list_matching mips3] run_dump_test "e32${el}-rel2" run_dump_test "elf${el}-rel3" - run_dump_test_arches "elf-rel4" [mips_arch_list_matching gpr64] + run_dump_test_arches "elf-rel4" [mips_arch_list_matching mips3] run_dump_test "e32-rel4" run_dump_test "elf-rel5" run_dump_test "elf-rel6" @@ -873,9 +875,9 @@ if { [istarget mips*-*-vxworks*] } { [mips_arch_list_all] if $has_newabi { run_dump_test_arches "elf-rel29-n32" \ - [mips_arch_list_matching mips3] + [mips_arch_list_matching gpr64] run_dump_test_arches "elf-rel29-n64" \ - [mips_arch_list_matching mips3] + [mips_arch_list_matching gpr64] } if { !$no_mips16 } { Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@elf-rel29-n32.d =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@elf-rel29-n32.d 2011-10-27 22:11:12.155897671 +0100 @@ -0,0 +1,19 @@ +#PROG: readelf +#readelf: -r +#name: MIPS ELF reloc 29 (n32) +#as: -n32 +#source: elf-rel29.s + +# Test reloc conversion (MIPS16). + +Relocation section '\.rela\.text' at offset .* contains 9 entries: + Offset Info Type Sym\.Value Sym\. Name \+ Addend +00000000 00000569 R_MIPS16_LO16 0000000c boo \+ 0 +00000004 00000566 R_MIPS16_GOT16 0000000c boo \+ 0 +00000008 00000568 R_MIPS16_HI16 0000000c boo \+ 0 +0000000c 00000669 R_MIPS16_LO16 00000018 bar \+ 0 +00000010 00000669 R_MIPS16_LO16 00000018 bar \+ 0 +00000014 00000666 R_MIPS16_GOT16 00000018 bar \+ 0 +00000018 00000169 R_MIPS16_LO16 00000000 \.text \+ 24 +0000001c 00000169 R_MIPS16_LO16 00000000 \.text \+ 24 +00000020 00000168 R_MIPS16_HI16 00000000 \.text \+ 24 Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@elf-rel29-n64.d =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@elf-rel29-n64.d 2011-10-27 22:11:12.155897671 +0100 @@ -0,0 +1,37 @@ +#PROG: readelf +#readelf: -r +#name: MIPS ELF reloc 29 (n64) +#as: -64 +#source: elf-rel29.s + +# Test reloc conversion (MIPS16). + +Relocation section '\.rela\.text' at offset .* contains 9 entries: + Offset Info Type Sym\. Value Sym\. Name \+ Addend +000000000000 000500000069 R_MIPS16_LO16 000000000000000c boo \+ 0 + Type2: R_MIPS_NONE + Type3: R_MIPS_NONE +000000000004 000500000066 R_MIPS16_GOT16 000000000000000c boo \+ 0 + Type2: R_MIPS_NONE + Type3: R_MIPS_NONE +000000000008 000500000068 R_MIPS16_HI16 000000000000000c boo \+ 0 + Type2: R_MIPS_NONE + Type3: R_MIPS_NONE +00000000000c 000600000069 R_MIPS16_LO16 0000000000000018 bar \+ 0 + Type2: R_MIPS_NONE + Type3: R_MIPS_NONE +000000000010 000600000069 R_MIPS16_LO16 0000000000000018 bar \+ 0 + Type2: R_MIPS_NONE + Type3: R_MIPS_NONE +000000000014 000600000066 R_MIPS16_GOT16 0000000000000018 bar \+ 0 + Type2: R_MIPS_NONE + Type3: R_MIPS_NONE +000000000018 000100000069 R_MIPS16_LO16 0000000000000000 \.text \+ 24 + Type2: R_MIPS_NONE + Type3: R_MIPS_NONE +00000000001c 000100000069 R_MIPS16_LO16 0000000000000000 \.text \+ 24 + Type2: R_MIPS_NONE + Type3: R_MIPS_NONE +000000000020 000100000068 R_MIPS16_HI16 0000000000000000 \.text \+ 24 + Type2: R_MIPS_NONE + Type3: R_MIPS_NONE Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@elf-rel29.d =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@elf-rel29.d 2011-10-27 22:11:12.155897671 +0100 @@ -0,0 +1,6 @@ +#PROG: readelf +#readelf: -r +#name: MIPS ELF reloc 29 (o32) +#as: -32 +#source: elf-rel29.s +#dump: mips16@elf-rel29.d Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@loc-swap-2.d =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@loc-swap-2.d 2011-10-27 22:11:12.155897671 +0100 @@ -0,0 +1,6 @@ +#PROG: readelf +#readelf: -wl +#name: MIPS DWARF-2 location information with branch swapping (2) +#as: -32 +#source: loc-swap-2.s +#dump: mips16@loc-swap-2.d Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@loc-swap-dis.d =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@loc-swap-dis.d 2011-10-27 22:11:12.155897671 +0100 @@ -0,0 +1,5 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS DWARF-2 location information with branch swapping disassembly +#as: -32 +#source: loc-swap.s +#dump: mips16@loc-swap-dis.d Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@loc-swap.d =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@loc-swap.d 2011-10-27 22:18:01.445864000 +0100 @@ -0,0 +1,6 @@ +#PROG: readelf +#readelf: -wl +#name: MIPS DWARF-2 location information with branch swapping +#as: -32 +#source: loc-swap.s +#dump: mips16@loc-swap.d Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@relax-swap3.d =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-3@relax-swap3.d 2011-10-27 22:11:12.155897671 +0100 @@ -0,0 +1,5 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: MIPS relaxed macro with branch swapping +#as: -32 +#source: relax-swap3.s +#dump: mips16@relax-swap3.d
- Previous message (by thread): [PATCH] MIPS/binutils: microMIPS linker relaxation fixes
- Next message (by thread): [gold patch] Add --no-gnu-unique option to disable STB_GNU_UNIQUE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list