aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-01-31 14:26:13 +0000
committerJan Beulich <jbeulich@novell.com>2005-01-31 14:26:13 +0000
commit057f53c1ad39b24d7833c2eb23aec562c8c3a002 (patch)
tree26ad7ac7ca6bb3f17d7783ea997decae5fdd9aac /gas/testsuite
parente87b2913a34b6a601214f3b3634e9c8949276526 (diff)
downloadgdb-057f53c1ad39b24d7833c2eb23aec562c8c3a002.zip
gdb-057f53c1ad39b24d7833c2eb23aec562c8c3a002.tar.gz
gdb-057f53c1ad39b24d7833c2eb23aec562c8c3a002.tar.bz2
gas/
2005-01-31 Jan Beulich <jbeulich@novell.com> * macro.c (do_formals): Adjust to no longer accept empty parameter names. (define_macro): Adjust to no longer accept empty macro name, garbage following the parameters, or macros that were previously defined. * read.c (s_bad_end): Declare. (potable): Add endm. Handler for endr and endm is s_bad_end. (s_bad_end): Rename from s_bad_endr. Adjust to handle both .endm and .endr. * read.h (s_bad_endr): Remove. gas/testsuite/ 2005-01-31 Jan Beulich <jbeulich@novell.com> * gas/macros/badarg.[ls]: New. * gas/macros/end.[ls]: New. * gas/macros/redef.[ls]: New. * gas/macros/macros.exp (run_list_test): Copy from elsewhere. Run new tests.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/macros/badarg.l7
-rw-r--r--gas/testsuite/gas/macros/badarg.s17
-rw-r--r--gas/testsuite/gas/macros/end.l3
-rw-r--r--gas/testsuite/gas/macros/end.s2
-rw-r--r--gas/testsuite/gas/macros/macros.exp17
-rw-r--r--gas/testsuite/gas/macros/redef.l2
-rw-r--r--gas/testsuite/gas/macros/redef.s4
8 files changed, 60 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 860a9a9..aba29e0 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,13 @@
2005-01-31 Jan Beulich <jbeulich@novell.com>
+ * gas/macros/badarg.[ls]: New.
+ * gas/macros/end.[ls]: New.
+ * gas/macros/redef.[ls]: New.
+ * gas/macros/macros.exp (run_list_test): Copy from elsewhere.
+ Run new tests.
+
+2005-01-31 Jan Beulich <jbeulich@novell.com>
+
* gas/ia64/operands.[ls]: New.
* gas/ia64/ia64.exp: Run new test.
diff --git a/gas/testsuite/gas/macros/badarg.l b/gas/testsuite/gas/macros/badarg.l
new file mode 100644
index 0000000..80e0670
--- /dev/null
+++ b/gas/testsuite/gas/macros/badarg.l
@@ -0,0 +1,7 @@
+.*: Assembler messages:
+.*:1: Error: .*
+.*:4: Error: .*
+.*:7: Error: .*
+.*:10: Error: .*
+.*:13: Error: .*
+.*:16: Error: .*
diff --git a/gas/testsuite/gas/macros/badarg.s b/gas/testsuite/gas/macros/badarg.s
new file mode 100644
index 0000000..d6d729b
--- /dev/null
+++ b/gas/testsuite/gas/macros/badarg.s
@@ -0,0 +1,17 @@
+ .macro
+ .endm
+
+ .macro ,arg1
+ .endm
+
+ .macro m1,
+ .endm
+
+ .macro m2,,
+ .endm
+
+ .macro m3,arg1,
+ .endm
+
+ .macro m4,,arg2
+ .endm
diff --git a/gas/testsuite/gas/macros/end.l b/gas/testsuite/gas/macros/end.l
new file mode 100644
index 0000000..1675ff8
--- /dev/null
+++ b/gas/testsuite/gas/macros/end.l
@@ -0,0 +1,3 @@
+.*: Assembler messages:
+.*:1: Warning: \.endm .* \.macro
+.*:2: Warning: \.endr .* (\.rept|\.irpc?).*(\.rept|\.irpc?).*(\.rept|\.irpc?)
diff --git a/gas/testsuite/gas/macros/end.s b/gas/testsuite/gas/macros/end.s
new file mode 100644
index 0000000..3a136c6
--- /dev/null
+++ b/gas/testsuite/gas/macros/end.s
@@ -0,0 +1,2 @@
+ .endm
+ .endr
diff --git a/gas/testsuite/gas/macros/macros.exp b/gas/testsuite/gas/macros/macros.exp
index 46e5284..100a3a3 100644
--- a/gas/testsuite/gas/macros/macros.exp
+++ b/gas/testsuite/gas/macros/macros.exp
@@ -1,5 +1,18 @@
# Run some tests of gas macros.
+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
+}
+
if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
run_dump_test test1
}
@@ -47,3 +60,7 @@ run_dump_test app1
run_dump_test app2
run_dump_test app3
run_dump_test app4
+
+run_list_test badarg ""
+run_list_test end ""
+run_list_test redef ""
diff --git a/gas/testsuite/gas/macros/redef.l b/gas/testsuite/gas/macros/redef.l
new file mode 100644
index 0000000..a97cb3d
--- /dev/null
+++ b/gas/testsuite/gas/macros/redef.l
@@ -0,0 +1,2 @@
+.*: Assembler messages:
+.*:3: Error: .*
diff --git a/gas/testsuite/gas/macros/redef.s b/gas/testsuite/gas/macros/redef.s
new file mode 100644
index 0000000..0b3290b
--- /dev/null
+++ b/gas/testsuite/gas/macros/redef.s
@@ -0,0 +1,4 @@
+ .macro m
+ .endm
+ .macro m
+ .endm