]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/testsuite/gas/macros/macros.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / macros / macros.exp
index 436923e53cc6d587434baf627cf4e67a126c7b20..5b4068d5417c46c8efdcdc7b0fec4d81c000ac4b 100644 (file)
@@ -1,16 +1,32 @@
+# Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+# 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
@@ -26,10 +42,10 @@ gas_test_error "err.s" "" "macro infinite recursion"
 setup_xfail "tic4x*-*"
 gas_test "and.s" "" "" "logical and in macro definition"
 
-case $target_triplet in {
-    { hppa*-*-* } { if [istarget *-*-linux*] { run_dump_test semi } }
-    { *c4x*-*-* } { }
-    { *c54x*-*-* } { }
+switch -glob $target_triplet {
+    hppa*-*-* { if [istarget *-*-linux*] { run_dump_test semi } }
+    *c4x*-*-* { }
+    *c54x*-*-* { }
     default {
        run_dump_test semi
     }
@@ -41,7 +57,6 @@ if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
 
     # These fail due to NO_STRING_ESCAPES
     setup_xfail "powerpc*-*-aix*" "powerpc*-*-beos*" "powerpc*-*-macos*"
-    setup_xfail "powerpc*-*-pe" "powerpc*-*-*win*"
     setup_xfail "rs6000-*-*"
     setup_xfail "z80-*-*"
 
@@ -58,17 +73,18 @@ run_dump_test app4
 
 run_list_test badarg ""
 
-case $target_triplet in {
-    { *c54x*-*-* } { }
-    { *c4x*-*-* } { }
-    { h8500-*-* } { }
-    { m68*-*-* } { }
-    { m88*-*-* } { }
-    { mmix-* } { }
-    { z80-* } { }
+switch -glob $target_triplet {
+    *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 ""
 
@@ -77,3 +93,8 @@ run_list_test redef ""
 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"