1 # Define gas callbacks for dg.exp.
5 # The use of this function is still in a bit of flux.
6 # It should be theoretically possible to assemble, link, and run a file
7 # but we currently don't support that. Assembler testcases aren't usually
8 # that elaborate anyway. :-)
10 proc gas-dg-test { prog do_what tool_flags default_tool_flags libs } {
21 perror "$do_what: not a valid dg-do keyword"
26 # gas_start prepends $srcdir/$subdir so we must remove it from PROG
27 # if present. First remove extraneous //'s.
29 set dir "$srcdir/$subdir"
30 regsub -all "//" $dir "/" dir
31 regsub -all "//" $prog "/" prog
32 if [string match "$dir/*" $prog] {
33 regsub "$dir" $prog "" prog
36 # FIXME: This should be gas_start but it doesn't set comp_output.
37 gas_run $prog $tool_flags ""
40 proc gas-dg-prune { system text } {
41 #send_user "Before:$text\n"
42 regsub -all "(^|\n)\[^\n\]*: Assembler messages:\[^\n\]*" $text "" text
43 regsub -all "(^|\n)\[^\n\]*: End of file not at end\[^\n\]*Newline inserted." $text "" text
44 #send_user "After:$text\n"