--- /dev/null
+#objdump: -dr
+#name: jal
+
+# Test the jal macro.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> jalr \$t9
+...
+0+0008 <[^>]*> jalr \$a0,\$t9
+...
+0+0010 <[^>]*> jal 0+ <text_label>
+[ ]*RELOC: 0+0010 (JMPADDR|R_MIPS_26) .text
+...
+0+0018 <[^>]*> jal 0+ <text_label>
+[ ]*RELOC: 0+0018 (JMPADDR|R_MIPS_26) external_text_label
+...
+0+0020 <[^>]*> j 0+ <text_label>
+[ ]*RELOC: 0+0020 (JMPADDR|R_MIPS_26) .text
+...
+0+0028 <[^>]*> j 0+ <text_label>
+[ ]*RELOC: 0+0028 (JMPADDR|R_MIPS_26) external_text_label
+...
if [expr $i&$num] then {
set extra_opts "$extra_opts $opt($bit)"
if $ignore_stdout($bit) then {
- set maybe_ignore_stdout "1>/dev/null"
+ set maybe_ignore_stdout ">/dev/null"
}
}
}
proc gas_test_ignore_stdout { file as_opts testname } {
global comp_output
- gas_run $file $as_opts "2>&1 1>/dev/null"
+ gas_run $file $as_opts ">/dev/null"
want_no_output $testname
}
proc gas_test_error { file as_opts testname } {
global comp_output
- gas_run $file $as_opts "2>&1 1>/dev/null"
+ gas_run $file $as_opts ">/dev/null"
if ![string match "" $comp_output] then {
send_log "$comp_output\n"
verbose "$comp_output" 3
set opts(nm) {}
set opts(name) {}
set opts(PROG) {}
+ set opts(source) {}
foreach i $opt_array {
set opt_name [lindex $i 0]
eval set program \$[string toupper $program]
if { $opts(name) == "" } { set testname "$subdir/$name" } else { set testname $opts(name) }
- catch "exec $srcdir/lib/run $AS $ASFLAGS $opts(as) ${file}.s" comp_output
+ if { $opts(source) == "" } {
+ set sourcefile ${file}.s
+ } else {
+ set sourcefile $srcdir/$subdir/$opts(source)
+ }
+
+ catch "exec $srcdir/lib/run $AS $ASFLAGS $opts(as) $sourcefile" comp_output
if ![string match "" $comp_output] then {
send_log "$comp_output\n"
return
}
- if [catch "exec $program -r > dump.out" comp_output] {
- fail_phase $testname {running objdump} {-r}
+ if { $progopts1 == "" } { set $progopts1 "-r" }
+ if [catch "exec $program $progopts $progopts1 > dump.out" comp_output] {
+ fail_phase $testname {running objdump} "$progopts $progopts1"
return
}
set nws {[^ ]*}
# whitespace is ignored anywhere except within the options list;
# option names are alphabetic only
- set pat "^#${ws}(\[a-zA-Z\]*)$ws:${ws}($nws)$ws\$"
+ set pat "^#${ws}(\[a-zA-Z\]*)$ws:${ws}(.*)$ws\$"
while { [gets $f line] != -1 } {
set line [string trim $line]
# Whitespace here is space-tab.
catch "wait"
}
+# Default timeout is 10 seconds, loses on a slow machine. But some
+# configurations of dejagnu may override it.
+if {$timeout<120} then { set timeout 120 }
+
expect_after {
timeout { perror "timeout" }
"virtual memory exhausted" { perror "virtual memory exhausted" }
if { $end } { break }
verbose "regexp \"^$line_b$\"\nline \"$line_a\"" 3
if ![regexp "^$line_b$" "$line_a"] {
- verbose "no match" 3
+ send_log "regexp_diff match failure\n"
+ send_log "regexp \"^$line_b$\"\nline \"$line_a\"\n"
set differences 1
}
}
if { $differences == 0 && [eof $file_a] != [eof $file_b] } {
+ send_log "different lengths\n"
verbose "different lengths" 3
set differences 1
}