diff options
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 24 |
2 files changed, 29 insertions, 3 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 1f46705..286fce9 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,4 +1,12 @@ 2010-10-24 Maciej W. Rozycki <macro@linux-mips.org> + Richard Sandiford <rdsandiford@googlemail.com> + + * gas/mips/mips.exp (run_dump_test_arch): Check for the presence + of a file-format-specific test too. + (run_dump_test_arches): Pull elf, ecoff and aout variables for + use by the above. + +2010-10-24 Maciej W. Rozycki <macro@linux-mips.org> * gas/mips/ld.s: Remove "l.d", "s.d" and "sd" instructions. * gas/mips/ld.d: Adjust accordingly. diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index f581c9d..8c04254 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -286,13 +286,30 @@ proc mips_arch_list_matching {args} { # # 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 format [expr { $elf ? "elf" : $ecoff ? "ecoff" : "aout" }] set proparch [lindex [mips_arch_properties $arch 0] 0] - set archname "${proparch}@${name}" - if { [file exists "$srcdir/$subdir/${archname}.d"] } { - set name $archname + 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 \ @@ -309,6 +326,7 @@ proc run_dump_test_arch { name arch } { # 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" } |