-# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+# Copyright (C) 2012-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
if { [ string match "octeon*" $proparch ] && $proparch != "octeon" } {
lappend prefixes octeon@
}
+ if { [ string match "mips*r6" $proparch ]} {
+ lappend prefixes mipsr6@
+ }
foreach prefix ${prefixes} {
set archname ${prefix}${name}
if { [file exists "$srcdir/$subdir/${archname}.d"] } {
# Invoke "run_list_test" for test NAME with additional assembler options OPTS.
# Add the assembler flags that are associated with architecture ARCH.
proc run_list_test_arch { name opts arch } {
- global subdir
+ global subdir srcdir
set testname "MIPS $name ([concat $opts [mips_arch_displayname $arch]])"
+ set proparch [lindex [mips_arch_properties $arch 0] 0]
+ set prefixes [list ${proparch}@ ]
+ if { [ string match "octeon*" $proparch ] && $proparch != "octeon" } {
+ lappend prefixes octeon@
+ }
+ if { [ string match "mips*r6" $proparch ]} {
+ lappend prefixes mipsr6@
+ }
+ foreach prefix ${prefixes} {
+ set archname ${prefix}${name}
+ if { [file exists "$srcdir/$subdir/${archname}.l"] } {
+ set name $archname
+ break
+ }
+ }
+
if [catch {run_list_test \
$name \
[concat $opts [mips_arch_as_flags $arch]] \
{ -march=mips32r5 -mtune=mips32r5 } \
{ -mmips:isa32r5 } \
{ mipsisa32r5-*-* mipsisa32r5el-*-* }
+mips_arch_create mips32r6 32 mips32r5 { fpisa3 fpisa4 fpisa5 ror } \
+ { -march=mips32r6 -mtune=mips32r6 --defsym r6=} \
+ { -mmips:isa32r6 } \
+ { mipsisa32r6-*-* mipsisa32r6el-*-* }
mips_arch_create mips64 64 mips5 { mips32 } \
{ -march=mips64 -mtune=mips64 } { -mmips:isa64 } \
{ mipsisa64-*-* mipsisa64el-*-* }
{ -march=mips64r5 -mtune=mips64r5 } \
{ -mmips:isa64r5 } \
{ mipsisa64r5-*-* mipsisa64r5el-*-* }
+mips_arch_create mips64r6 64 mips64r5 { mips32r6 ror } \
+ { -march=mips64r6 -mtune=mips64r6 --defsym r6=} \
+ { -mmips:isa64r6 } \
+ { mipsisa64r6-*-* mipsisa64r6el-*-* }
mips_arch_create mips16 32 {} {} \
{ -march=mips1 -mips16 } { -mmips:16 }
mips_arch_create micromips 64 mips64r2 {} \
mips_arch_create octeon2 64 octeonp { oddspreg } \
{ -march=octeon2 -mtune=octeon2 } { -mmips:octeon2 } \
{ }
+mips_arch_create octeon3 64 octeon2 { oddspreg } \
+ { -march=octeon3 -mtune=octeon3 } { -mmips:octeon3 } \
+ { }
mips_arch_create xlr 64 mips64 { oddspreg } \
{ -march=xlr -mtune=xlr } { -mmips:xlr }
mips_arch_create r5900 64 mips3 { gpr_ilocks singlefloat nollsc } \
run_dump_test "vxworks1-xgot"
run_dump_test "vxworks1-el"
run_dump_test "vxworks1-xgot-el"
+
+ run_list_test "option-pic-vxworks-1" "-mvxworks-pic" \
+ "MIPS invalid PIC option in VxWorks PIC"
+ run_list_test "option-pic-vxworks-2" "-mvxworks-pic" \
+ "MIPS invalid switch to SVR4 PIC from VxWorks PIC"
} elseif { [istarget mips*-*-*] } {
set addr32 [expr [istarget mipstx39*-*-*] || [istarget mips-*-linux*] || [istarget mipsel-*-linux*] \
|| [istarget mipsisa32-*-linux*] || [istarget mipsisa32el-*-linux*]]
run_dump_test_arches "bgeu" [mips_arch_list_matching mips1]
run_dump_test_arches "blt" [mips_arch_list_matching mips1]
run_dump_test_arches "bltu" [mips_arch_list_matching mips1]
- run_dump_test_arches "branch-likely" [mips_arch_list_matching mips2]
+ run_dump_test_arches "branch-likely" [mips_arch_list_matching mips2 !mips32r6]
run_dump_test_arches "branch-misc-1" [mips_arch_list_matching mips1]
run_dump_test_arches "branch-misc-2" [mips_arch_list_matching mips1]
run_dump_test_arches "branch-misc-2pic" [mips_arch_list_matching mips1]
"MIPS branch swapping ($count)"
}
+ run_dump_test "compact-eh-eb-1"
+ run_dump_test "compact-eh-eb-2"
+ run_dump_test "compact-eh-eb-3"
+ run_dump_test "compact-eh-eb-4"
+ run_dump_test "compact-eh-eb-5"
+ run_dump_test "compact-eh-eb-6"
+ run_dump_test "compact-eh-eb-7"
+ run_dump_test "compact-eh-el-1"
+ run_dump_test "compact-eh-el-2"
+ run_dump_test "compact-eh-el-3"
+ run_dump_test "compact-eh-el-4"
+ run_dump_test "compact-eh-el-5"
+ run_dump_test "compact-eh-el-6"
+ run_dump_test "compact-eh-el-7"
+ run_list_test "compact-eh-err1"
+ run_list_test "compact-eh-err2"
+
run_dump_test "div"
if { !$addr32 } {
run_dump_test "eret-2"
run_dump_test "eret-3"
run_dump_test_arches "fix-rm7000-1" \
- [mips_arch_list_matching mips3 !singlefloat]
+ [mips_arch_list_matching mips3 !singlefloat \
+ !mips64r6]
run_dump_test_arches "fix-rm7000-2" \
- [mips_arch_list_matching mips3 !singlefloat]
+ [mips_arch_list_matching mips3 !singlefloat \
+ !mips64r6]
run_dump_test_arches "24k-branch-delay-1" \
[mips_arch_list_matching mips1]
run_dump_test_arches "24k-triple-stores-1" \
run_list_test_arches "mips4-fp" "-32 -msoft-float" \
[mips_arch_list_matching fpisa4]
run_dump_test_arches "mips4-branch-likely" \
- [mips_arch_list_matching mips4]
+ [mips_arch_list_matching mips4 !mips32r6]
run_list_test_arches "mips4-branch-likely" "-32 -msoft-float" \
- [mips_arch_list_matching mips4]
+ [mips_arch_list_matching mips4 !mips32r6]
run_dump_test_arches "mips5-fp" "-32" \
[mips_arch_list_matching fpisa5]
run_dump_test_arches "mips5-fp" "-mabi=o64" \
run_dump_test_arches "rol64-hw" [mips_arch_list_matching gpr64 ror]
run_dump_test "sb"
+ run_dump_test_arches "sdata-gp" [mips_arch_list_matching mips1]
run_dump_test "trunc"
run_dump_test "ulh"
- run_dump_test_arches "ulh2-eb" [mips_arch_list_matching mips1]
- run_dump_test_arches "ulh2-el" [mips_arch_list_matching mips1]
+ run_dump_test_arches "ulh2-eb" [mips_arch_list_matching mips1 !mips32r6]
+ run_dump_test_arches "ulh2-el" [mips_arch_list_matching mips1 !mips32r6]
run_dump_test "ulh-svr4pic"
run_dump_test "ulh-xgot"
run_dump_test "ulw"
run_dump_test "ush"
run_dump_test "usw"
run_dump_test "usd"
- run_dump_test_arches "ulw2-eb" [mips_arch_list_matching mips1 !gpr_ilocks]
- run_dump_test_arches "ulw2-eb-ilocks" [mips_arch_list_matching gpr_ilocks]
- run_dump_test_arches "ulw2-el" [mips_arch_list_matching mips1 !gpr_ilocks]
- run_dump_test_arches "ulw2-el-ilocks" [mips_arch_list_matching gpr_ilocks]
-
- run_dump_test_arches "uld2-eb" [mips_arch_list_matching mips3]
- run_dump_test_arches "uld2-el" [mips_arch_list_matching mips3]
+ run_dump_test_arches "ulw2-eb" [mips_arch_list_matching mips1 !gpr_ilocks \
+ !mips32r6]
+ run_dump_test_arches "ulw2-eb-ilocks" [mips_arch_list_matching gpr_ilocks \
+ !mips32r6]
+ run_dump_test_arches "ulw2-el" [mips_arch_list_matching mips1 !gpr_ilocks \
+ !mips32r6]
+ run_dump_test_arches "ulw2-el-ilocks" [mips_arch_list_matching gpr_ilocks \
+ !mips32r6]
+
+ run_dump_test_arches "uld2-eb" [mips_arch_list_matching mips3 !mips32r6]
+ run_dump_test_arches "uld2-el" [mips_arch_list_matching mips3 !mips32r6]
run_dump_test "mips16"
run_dump_test "mips16-64"
run_dump_test "mips16-macro"
# Check MIPS16e extensions
- run_dump_test_arches "mips16e" [mips_arch_list_matching mips32 !micromips]
+ run_dump_test_arches "mips16e" [mips_arch_list_matching mips32 !micromips \
+ !mips32r6]
# Check jalx handling
run_dump_test "mips16-jalx"
run_dump_test "mips-jalx"
run_dump_test "xlr-ext"
}
- run_dump_test_arches "relax" [mips_arch_list_matching mips2]
- run_dump_test_arches "relax-at" [mips_arch_list_matching mips2]
+ run_dump_test_arches "relax" [mips_arch_list_matching mips2 !mips32r6]
+ run_dump_test_arches "relax-at" [mips_arch_list_matching mips2 !mips32r6]
run_dump_test "relax-swap1-mips1"
run_dump_test "relax-swap1-mips2"
run_dump_test "relax-swap2"
run_dump_test_arches "relax-swap3" [mips_arch_list_all]
run_list_test_arches "relax-bc1any" "-mips3d -mabi=o64 -relax-branch" \
[mips_arch_list_matching mips64 \
- !micromips]
+ !micromips !mips32r6]
run_list_test_arches "relax-bposge" "-mdsp -relax-branch" \
[mips_arch_list_matching mips64r2 \
- !micromips]
+ !micromips !mips32r6]
run_dump_test_arches "eva" [mips_arch_list_matching mips32r2 !octeon]
run_dump_test "elf_arch_mips32r2"
run_dump_test "elf_arch_mips32r3"
run_dump_test "elf_arch_mips32r5"
+ run_dump_test "elf_arch_mips32r6"
run_dump_test "elf_arch_mips64"
run_dump_test "elf_arch_mips64r2"
run_dump_test "elf_arch_mips64r3"
run_dump_test "elf_arch_mips64r5"
+ run_dump_test "elf_arch_mips64r6"
# Verify that ASE markings are handled properly.
run_dump_test "elf_ase_mips16"
run_dump_test "n32-consec"
}
+ # tests of objdump's ability to disassemble the move mnemonic
+ run_dump_test_arches "move" [mips_arch_list_matching mips64 !micromips]
+ run_dump_test_arches "micromips32-move" [mips_arch_list_matching micromips]
+
# tests of objdump's ability to disassemble using different
# register names.
run_dump_test "gpr-names-numeric"
run_list_test_arches "octeon-ill" [mips_arch_list_matching octeon]
run_dump_test_arches "octeon-pref" [mips_arch_list_matching octeon]
run_dump_test_arches "octeon2" [mips_arch_list_matching octeon2]
+ run_dump_test_arches "octeon3" [mips_arch_list_matching octeon3]
run_dump_test "smartmips"
run_dump_test_arches "mips32-dsp" [mips_arch_list_matching mips32r2 \
run_dump_test "align2-el"
run_dump_test "align3"
run_dump_test "odd-float"
- run_dump_test "ehword"
+ run_dump_test "insn-opts"
run_list_test_arches "mips-macro-ill-sfp" "-32 -msingle-float" \
[mips_arch_list_matching mips2]
run_dump_test "mips32-sync"
run_dump_test_arches "mips32r2-sync" \
[mips_arch_list_matching mips32r2]
- run_dump_test_arches "alnv_ps-swap" [mips_arch_list_matching fpisa5]
+ run_dump_test_arches "alnv_ps-swap" [mips_arch_list_matching fpisa5 \
+ !mips32r6]
run_dump_test_arches "cache" [lsort -dictionary -unique [concat \
[mips_arch_list_matching mips3] \
[mips_arch_list_matching mips32] ] ]
- run_dump_test_arches "daddi" [mips_arch_list_matching mips3]
+ run_dump_test_arches "daddi" [mips_arch_list_matching mips3 \
+ !mips32r6]
run_dump_test_arches "pref" [lsort -dictionary -unique [concat \
[mips_arch_list_matching mips4] \
[mips_arch_list_matching mips32] ] ]
run_list_test "ase-errors-4" "-mabi=o64 -march=mips3" "ASE errors (4)"
run_dump_test_arches "la-reloc" [mips_arch_list_matching mips1]
+ run_list_test "dla-warn" "-mabi=32 -march=mips3" \
+ "DLA with 32-bit addresses"
if { $has_newabi } {
run_dump_test_arches "dla-reloc" [mips_arch_list_matching mips3]
+ run_list_test "la-warn" "-mabi=64 -march=mips3" \
+ "LA with 64-bit addresses"
}
# Start with MIPS II to avoid load delay nops.
run_dump_test_arches "ld-reloc" [mips_arch_list_matching mips2]
- run_dump_test_arches "ulw-reloc" [mips_arch_list_matching mips2]
- run_dump_test_arches "ulh-reloc" [mips_arch_list_matching mips2]
+ run_dump_test_arches "ulw-reloc" [mips_arch_list_matching mips2 !mips32r6]
+ run_dump_test_arches "ulh-reloc" [mips_arch_list_matching mips2 !mips32r6]
run_dump_test "l_d-reloc"
run_list_test "bltzal"
run_dump_test_arches "msa" [mips_arch_list_matching mips32r2]
run_dump_test_arches "msa64" [mips_arch_list_matching mips64r2]
- run_dump_test_arches "msa-relax" [mips_arch_list_matching mips32r2]
+ run_dump_test_arches "msa-relax" [mips_arch_list_matching mips32r2 !mips32r6]
run_dump_test_arches "msa-branch" [mips_arch_list_matching mips32r2]
run_dump_test_arches "xpa" [mips_arch_list_matching mips32r2 !micromips]
run_dump_test_arches "attr-gnu-4-0" "-64" \
[mips_arch_list_matching mips3]
run_dump_test_arches "attr-gnu-4-0" "-mfp32 -32" \
- [mips_arch_list_matching mips1]
+ [mips_arch_list_matching mips1 !mips32r6]
run_dump_test_arches "attr-gnu-4-0" "-mfpxx -32" \
[mips_arch_list_matching mips2 !r5900]
run_dump_test_arches "attr-gnu-4-0" "-mfp64 -32" \
run_dump_test_arches "attr-gnu-4-0" "-msoft-float -64" \
[mips_arch_list_matching mips3]
run_dump_test_arches "attr-none-double" "-32" \
- [mips_arch_list_matching mips1]
+ [mips_arch_list_matching mips1 !mips32r6]
+ run_dump_test_arches "r6-attr-none-double" "-32" \
+ [mips_arch_list_matching mips32r6]
run_dump_test_arches "attr-none-double" "-64" \
[mips_arch_list_matching mips3]
run_dump_test_arches "attr-none-o32-fpxx" \
run_list_test_arches "attr-gnu-4-1-mfp64" "-32 -mfp64" \
[mips_arch_list_matching mips32r2]
run_list_test_arches "attr-gnu-4-1-mfp32" "-64 -mfp32" \
- [mips_arch_list_matching mips3]
+ [mips_arch_list_matching mips3 !mips64r6]
run_list_test_arches "attr-gnu-4-1-msingle-float" "-32 -msingle-float" \
[mips_arch_list_matching mips1]
run_list_test_arches "attr-gnu-4-1-msoft-float" "-32 -msoft-float" \
run_dump_test_arches "attr-gnu-4-1" "-32 -mfpxx" \
[mips_arch_list_matching mips2 !r5900]
run_dump_test_arches "attr-gnu-4-1" "-32 -mfp32" \
- [mips_arch_list_matching mips1]
+ [mips_arch_list_matching mips1 !mips32r6]
run_dump_test_arches "attr-gnu-4-1" "-64 -mfp64" \
[mips_arch_list_matching mips3]
run_list_test_arches "attr-gnu-4-2-mdouble-float" "-32 -mfp32" \
- [mips_arch_list_matching mips1]
+ [mips_arch_list_matching mips1 !mips32r6]
run_list_test_arches "attr-gnu-4-2-mdouble-float" "-32 -mfpxx" \
[mips_arch_list_matching mips2 !r5900]
run_list_test_arches "attr-gnu-4-2-mdouble-float" "-32 -mfp64" \
[mips_arch_list_matching mips3]
run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -mfp32" \
- [mips_arch_list_matching mips1]
+ [mips_arch_list_matching mips1 !mips32r6]
run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -mfpxx" \
[mips_arch_list_matching mips2 !r5900]
run_list_test_arches "attr-gnu-4-3-mhard-float" "-32 -mfp64" \
[mips_arch_list_matching mips3]
run_list_test_arches "attr-gnu-4-4" "-32 -mfp32" \
- [mips_arch_list_matching mips1]
+ [mips_arch_list_matching mips1 !mips32r6]
run_list_test_arches "attr-gnu-4-4" "-32 -mfpxx" \
[mips_arch_list_matching mips2 !r5900]
run_list_test_arches "attr-gnu-4-4" "-32 -mfp64" \
[mips_arch_list_matching mips1]
run_list_test_arches "attr-gnu-4-5" "-32 -mfp32" \
- [mips_arch_list_matching mips1]
+ [mips_arch_list_matching mips1 !mips32r6]
run_list_test_arches "attr-gnu-4-5" "-32 -mfp64" \
[mips_arch_list_matching mips32r2]
run_list_test_arches "attr-gnu-4-5" "-32 -mfp64 -mno-odd-spreg" \
[mips_arch_list_matching mips2 !r5900]
run_list_test_arches "attr-gnu-4-6" "-32 -mfp32" \
- [mips_arch_list_matching mips1]
+ [mips_arch_list_matching mips1 !mips32r6]
run_list_test_arches "attr-gnu-4-6-noodd" "-32 -mfp64 -mno-odd-spreg" \
[mips_arch_list_matching mips32r2]
run_list_test_arches "attr-gnu-4-6-64" "-64 -mfp64" \
[mips_arch_list_matching mips32r2]
run_list_test_arches "attr-gnu-4-7" "-32 -mfp32" \
- [mips_arch_list_matching mips1]
+ [mips_arch_list_matching mips1 !mips32r6]
run_list_test_arches "attr-gnu-4-7-odd" "-32 -mfp64" \
[mips_arch_list_matching mips32r2]
run_list_test_arches "attr-gnu-4-7-64" "-64 -mfp64" \
run_dump_test_arches "odd-spreg" "-mfp32" [mips_arch_list_matching oddspreg]
run_dump_test_arches "odd-spreg" "-mfpxx" [mips_arch_list_matching oddspreg]
run_dump_test_arches "odd-spreg" "-mfp64" [mips_arch_list_matching mips32r2]
- run_dump_test_arches "no-odd-spreg" "-mfp32" [mips_arch_list_matching mips1]
+ run_dump_test_arches "no-odd-spreg" "-mfp32" [mips_arch_list_matching mips1 \
+ !mips32r6]
run_dump_test_arches "no-odd-spreg" "-mfpxx" [mips_arch_list_matching mips2 !r5900]
run_dump_test_arches "no-odd-spreg" "-mfp64" [mips_arch_list_matching mips32r2]
run_dump_test "module-check"
run_list_test "module-check-warn" "-32"
run_dump_test "li-d"
+
+ run_list_test "option-pic-vxworks-1" "-mvxworks-pic" \
+ "MIPS invalid PIC option in VxWorks PIC"
+ run_list_test "option-pic-vxworks-2" "-mvxworks-pic" \
+ "MIPS invalid switch to SVR4 PIC from VxWorks PIC"
+
+ run_dump_test_arches "r6" [mips_arch_list_matching mips32r6]
+ if $has_newabi {
+ run_dump_test_arches "r6-n32" [mips_arch_list_matching mips64r6]
+ run_dump_test_arches "r6-n64" [mips_arch_list_matching mips64r6]
+ run_dump_test_arches "r6-64-n32" [mips_arch_list_matching mips64r6]
+ run_dump_test_arches "r6-64-n64" [mips_arch_list_matching mips64r6]
+ run_list_test_arches "ldpc-unalign" "-64" [mips_arch_list_matching mips64r6]
+ }
+ run_list_test_arches "r6-removed" "-32" [mips_arch_list_matching mips32r6]
+ run_list_test_arches "r6-64-removed" [mips_arch_list_matching mips64r6]
+
+ run_list_test_arches "r6-branch-constraints" "-32" \
+ [mips_arch_list_matching mips32r6]
}