# mips_arch_properties ARCH (optional:) INCLUDE_GPRSIZE
#
# This function returns the property list associated with ARCH in the
-# architecture data array. If INCLUDE_GPRSIZE is non-zero, an additional
-# "gpr32" or "gpr64" property will be returned as part of the list based
-# on the architecture's GPR size.
+# architecture data array, including the "canonical" target name as the
+# first element.
+#
+# If INCLUDE_GPRSIZE is non-zero, an additional "gpr32" or "gpr64"
+# property will be returned as part of the list based on the
+# architecture's GPR size.
proc mips_arch_properties {arch {include_gprsize 1}} {
array set archdata [mips_arch_data $arch]
set props $archdata(props)
#
# Invoke "run_dump_test" for test NAME, with extra assembler and
# disassembler flags to test architecture ARCH.
+#
+# You can override the expected output for particular architectures
+# and file formats. The possible test names are, in order of preference:
+#
+# 1. CARCH@FORMAT@NAME.d
+# 2. CARCH@NAME.d
+# 3. FORMAT@NAME.d
+# 4. NAME.d
+#
+# where CARCH is the "canonical" name of architecture ARCH as recorded
+# in its associated property list, and where FORMAT is the target's
+# file format (one of "elf", "ecoff" or "aout").
proc run_dump_test_arch { name arch } {
+ upvar elf elf ecoff ecoff aout aout
global subdir srcdir
- set archname "${arch}@${name}"
- if { [file exists "$srcdir/$subdir/${archname}.d"] } {
- set name $archname
+ set format [expr { $elf ? "elf" : $ecoff ? "ecoff" : "aout" }]
+ set proparch [lindex [mips_arch_properties $arch 0] 0]
+ foreach prefix [list ${proparch}@${format}@ ${proparch}@ ${format}@] {
+ set archname ${prefix}${name}
+ if { [file exists "$srcdir/$subdir/${archname}.d"] } {
+ set name $archname
+ break
+ }
}
if [catch {run_dump_test $name \
# Invoke "run_dump_test_arch" for test NAME, for each architecture
# listed in ARCH_LIST.
proc run_dump_test_arches { name arch_list } {
+ upvar elf elf ecoff ecoff aout aout
foreach arch $arch_list {
run_dump_test_arch "$name" "$arch"
}
run_dump_test "vxworks1-el"
run_dump_test "vxworks1-xgot-el"
} elseif { [istarget mips*-*-*] } {
- set no_mips16 0
set elf [expr [istarget *-*-elf*] || [istarget *-*-irix5*] || [istarget *-*-irix6* ] || [istarget *-*-linux*] || [istarget *-*-netbsd*] ]
set ecoff [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
set aout [expr [istarget *-*-bsd*] || [istarget *-*-openbsd*] ]
- set gpr_ilocks [expr [istarget mipstx39*-*-*]]
set addr32 [expr [istarget mipstx39*-*-*] || [istarget mips-*-linux*] || [istarget mipsel-*-linux*] || [istarget mips*-*-ecoff]]
set has_newabi [expr [istarget *-*-irix6*] || [istarget mips64*-*-linux*]]
+ set no_mips16 [expr !$elf]
if { [istarget "mips*-*-*linux*"] || [istarget "mips*-sde-elf*"] } then {
set tmips "t"
} {
set el ""
}
- if { $ecoff } {
- set no_mips16 1
- }
if { $no_mips16 } {
mips_arch_destroy mips16
}
run_dump_test "eret-1"
run_dump_test "eret-2"
run_dump_test "eret-3"
+ run_dump_test_arches "24k-branch-delay-1" [mips_arch_list_matching mips1]
+ run_dump_test_arches "24k-triple-stores-1" \
+ [mips_arch_list_matching mips32r2 !octeon]
+ run_dump_test_arches "24k-triple-stores-2" [mips_arch_list_matching mips2]
+ run_dump_test_arches "24k-triple-stores-3" [mips_arch_list_matching mips3]
+ run_dump_test_arches "24k-triple-stores-4" [mips_arch_list_matching mips2]
+ run_dump_test_arches "24k-triple-stores-5" [mips_arch_list_matching mips1]
+ run_dump_test_arches "24k-triple-stores-6" [mips_arch_list_matching mips2]
+ run_dump_test_arches "24k-triple-stores-7" [mips_arch_list_matching mips2]
+ run_dump_test_arches "24k-triple-stores-8" [mips_arch_list_matching mips1]
+ run_dump_test_arches "24k-triple-stores-9" [mips_arch_list_matching mips1]
+ run_dump_test_arches "24k-triple-stores-10" [mips_arch_list_matching mips1]
+ if $elf {
+ run_dump_test_arches "24k-triple-stores-11" \
+ [mips_arch_list_matching mips1]
+ }
if $elf {
run_dump_test_arches "jal-svr4pic" \
run_dump_test "lb-xgot-ilocks"
}
if !$aout {
- if !$gpr_ilocks {
- run_dump_test "ld"
- } else {
- if !$addr32 {
- run_dump_test "ld-ilocks"
- } else {
- run_dump_test "ld-ilocks-addr32"
- }
- }
+ run_dump_test_arches "ld" [mips_arch_list_matching mips1]
+ run_dump_test_arches "ld-forward" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "sd" [mips_arch_list_matching mips1]
+ run_dump_test_arches "sd-forward" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "l_d" [mips_arch_list_matching mips1]
+ run_dump_test_arches "l_d-forward" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "s_d" [mips_arch_list_matching mips1]
+ run_dump_test_arches "s_d-forward" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "ldc1" [mips_arch_list_matching mips2]
+ run_dump_test_arches "ldc1-forward" \
+ [mips_arch_list_matching mips2]
+ run_dump_test_arches "sdc1" [mips_arch_list_matching mips2]
+ run_dump_test_arches "sdc1-forward" \
+ [mips_arch_list_matching mips2]
+ if $has_newabi {
+ run_dump_test_arches "ld-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "ld-forward-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "sd-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "sd-forward-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "l_d-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "l_d-forward-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "s_d-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "s_d-forward-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "ldc1-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "ldc1-forward-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "sdc1-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "sdc1-forward-n32" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "ld-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "ld-forward-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "sd-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "sd-forward-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "l_d-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "l_d-forward-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "s_d-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "s_d-forward-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "ldc1-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "ldc1-forward-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "sdc1-n64" \
+ [mips_arch_list_matching mips3]
+ run_dump_test_arches "sdc1-forward-n64" \
+ [mips_arch_list_matching mips3]
+ }
}
if $elf { run_dump_test "ld-svr4pic" }
if $elf { run_dump_test "ld-xgot" }
run_dump_test "xlr-ext"
}
- run_dump_test "relax"
+ run_dump_test_arches "relax" [mips_arch_list_matching mips2]
+ run_dump_test_arches "relax-at" [mips_arch_list_matching mips2]
run_dump_test "relax-swap1-mips1"
run_dump_test "relax-swap1-mips2"
run_dump_test "relax-swap2"
+ run_list_test_arches "relax-bposge" "-mdsp -relax-branch" \
+ [mips_arch_list_matching mips64r2]
run_list_test "illegal" "-32"
run_list_test "baddata1" "-32"
run_dump_test "elf_arch_mips64r2"
# Verify that ASE markings are handled properly.
- if { !$no_mips16 } { run_dump_test "elf_ase_mips16" }
+ if { !$no_mips16 } {
+ run_dump_test "elf_ase_mips16"
+ run_dump_test "elf_ase_mips16-2"
+ }
run_dump_test "mips-gp32-fp32-pic"
run_dump_test "mips-gp32-fp64-pic"
run_dump_test_arches "elf-rel27" [mips_arch_list_all]
+ if $has_newabi {
+ run_dump_test "elf-rel28-n32"
+ run_dump_test "elf-rel28-n64"
+ }
+
if { !$no_mips16 } {
run_dump_test "${tmips}mips${el}16-e"
run_dump_test "${tmips}mips${el}16-f"
run_list_test "tls-ill" "-32"
run_dump_test "tls-o32"
run_dump_test "jalr2"
+
+ run_dump_test_arches "aent" [mips_arch_list_matching mips1]
+
+ run_dump_test_arches "branch-misc-4" \
+ [mips_arch_list_matching mips1]
+ run_dump_test_arches "branch-misc-4-64" \
+ [mips_arch_list_matching mips3]
}
if $has_newabi {
run_dump_test "loongson-2f-2"
run_dump_test "loongson-2f-3"
+ run_dump_test "loongson-3a"
+ run_dump_test "loongson-3a-2"
+ run_dump_test "loongson-3a-3"
+
run_dump_test_arches "octeon" [mips_arch_list_matching octeon]
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 "smartmips"
run_dump_test "mips32-dsp"
run_dump_test "mips32-sync"
run_dump_test_arches "mips32r2-sync" \
[mips_arch_list_matching mips32r2]
+ run_dump_test_arches "alnv_ps-swap" [lsort -dictionary -unique [concat \
+ [mips_arch_list_matching mips5] \
+ [mips_arch_list_matching mips32r2] ] ]
if $has_newabi { run_dump_test "cfi-n64-1" }
- run_dump_test_arches "aent" [mips_arch_list_matching mips1]
+ run_dump_test "pr12915"
+ run_dump_test "reginfo-1a"
+ run_dump_test "reginfo-1b"
}