-2002-12-20 DJ Delorie <dj@redhat.com>
+2002-12-20 Chris Demetriou <cgd@broadcom.com>
- * gas/xstormy16/allinsn.sh: Add tests for 12-bit reloc.
- * gas/xstormy16/allinsn.s: Likewise.
- * gas/xstormy16/allinsn.d: Likewise.
+ * lib/gas-defs.exp (run_dump_test): Add a new optional argument,
+ "extra_options".
2002-12-18 Chris Demetriou <cgd@broadcom.com>
}
-# run_dump_test FILE
+# run_dump_test FILE (optional:) EXTRA_OPTIONS
#
# Assemble a .s file, then run some utility on it and check the output.
#
# list ends with the first line that doesn't match the above syntax
# (hmm, not great for error detection).
#
+# The optional EXTRA_OPTIONS argument to `run_dump_test' is a list of
+# two-element lists. The first element of each is an option name, and
+# the second additional arguments to be added on to the end of the
+# option list as given in FILE.d. (If omitted, no additional options
+# are added.)
+#
# The interesting options are:
#
# name: TEST-NAME
# regexps in FILE.d. `regexp_diff' is defined later in this file; see
# further comments there.
-proc run_dump_test { name } {
+proc run_dump_test { name {extra_options {}} } {
global subdir srcdir
global OBJDUMP NM AS OBJCOPY READELF
global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS
set opts($opt_name) $opt_val
}
+ foreach i $extra_options {
+ set opt_name [lindex $i 0]
+ set opt_val [lindex $i 1]
+ if ![info exists opts($opt_name)] {
+ perror "unknown option $opt_name given in extra_opts"
+ unresolved $subdir/$name
+ return
+ }
+ # add extra option to end of existing option, adding space
+ # if necessary.
+ if [string length $opts($opt_name)] {
+ append opts($opt_name) " "
+ }
+ append opts($opt_name) $opt_val
+ }
+
if {$opts(PROG) != ""} {
switch -- $opts(PROG) {
objdump