Update year range in copyright notice of binutils files
[deliverable/binutils-gdb.git] / gas / testsuite / gas / macros / macros.exp
index 37435ccc3e6b25ba31b06fcf2d7fdb7e71f8fae7..ff39deff9ecc271190c1b286f9da38d8b00162cd 100644 (file)
@@ -1,35 +1,38 @@
-# Run some tests of gas macros.
+# Copyright (C) 2012-2019 Free Software Foundation, Inc.
 
-proc run_list_test { name opts } {
-    global srcdir subdir
-    set testname "macros $name"
-    set file $srcdir/$subdir/$name
-    gas_run ${name}.s $opts ">&dump.out"
-    if { [regexp_diff "dump.out" "${file}.l"] } then {
-       fail $testname
-       verbose "output is [file_contents "dump.out"]" 2
-       return
-    }
-    pass $testname
-}
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  
+
+# Run some tests of gas macros.
 
 if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
     run_dump_test test1
 }
 
-if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } {
+if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] && ![istarget "nds32*-*-*"] } {
     run_dump_test test2
 }
 
 run_dump_test test3
 
-if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } {
+if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] && ![istarget "nds32*-*-*"] } {
     run_dump_test irp
     run_dump_test rept
     run_dump_test repeat
+    run_dump_test vararg
 }
 
-
 gas_test_error "err.s" "" "macro infinite recursion"
 
 # The tic4x-coff target fails the next test because it defines '&'
@@ -56,6 +59,7 @@ if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
     setup_xfail "powerpc*-*-aix*" "powerpc*-*-beos*" "powerpc*-*-macos*"
     setup_xfail "powerpc*-*-pe" "powerpc*-*-*win*"
     setup_xfail "rs6000-*-*"
+    setup_xfail "z80-*-*"
 
     # FIXME: Due to difference in what "consecutive octets" means.
     setup_xfail "*c4x*-*-*" "*c54x*-*"
@@ -65,8 +69,33 @@ if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
 run_dump_test app1
 run_dump_test app2
 run_dump_test app3
+remote_download host "$srcdir/$subdir/app4b.s"
 run_dump_test app4
 
 run_list_test badarg ""
+
+case $target_triplet in {
+    { *c54x*-*-* } { }
+    { *c4x*-*-* } { }
+    { mmix-* } { }
+    { ns32k-*-* } { }
+    { rl78-*-* } { }
+    { rx-*-* } { }
+    { vax-*-* } { }
+    default { run_list_test dot "-alm" }
+}
 run_list_test end ""
+setup_xfail "ns32k-*-*" "vax-*-*"
+run_list_test purge "--hash-size=8000"
 run_list_test redef ""
+
+# This test is valid only when '!' is not a comment character
+# (it is allowed to be a line comment character).
+if [string match "" [lindex [gas_run ../all/excl.s "-o /dev/null" ""] 0]] {
+    run_dump_test paren
+}
+
+# PR 58925: A .exitm pseudo-op outside of a macro definition
+#  prevented the assembler from parsing the rest of the file,
+#  and hence catching an erroroneous instruction.
+gas_test_error "exit.s" "" ".exitm outside of a macro"
This page took 0.02629 seconds and 4 git commands to generate.