aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2010-10-24 09:59:20 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2010-10-24 09:59:20 +0000
commit8b7955ca9bc1ae723b7c9f1b5a31ccfa24608911 (patch)
tree852220c1b55c9184c74add9196960cba94938a05
parent37bfb8fca2a05712574251fbe4d5810aed919015 (diff)
downloadgdb-8b7955ca9bc1ae723b7c9f1b5a31ccfa24608911.zip
gdb-8b7955ca9bc1ae723b7c9f1b5a31ccfa24608911.tar.gz
gdb-8b7955ca9bc1ae723b7c9f1b5a31ccfa24608911.tar.bz2
* 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.
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/mips/mips.exp24
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"
}