aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-08-13 19:53:52 +0000
committerNick Clifton <nickc@redhat.com>2004-08-13 19:53:52 +0000
commitcaa32fe507720347f37e2d060d64a89d96928db1 (patch)
treeaa7df1d5f68e3c802562c84a7f3678e14c6b7616 /gas/testsuite
parenta21de0dadf0ad4334afe22bc14ff1811b795190f (diff)
downloadfsf-binutils-gdb-caa32fe507720347f37e2d060d64a89d96928db1.zip
fsf-binutils-gdb-caa32fe507720347f37e2d060d64a89d96928db1.tar.gz
fsf-binutils-gdb-caa32fe507720347f37e2d060d64a89d96928db1.tar.bz2
Add and handle new --alternate command line option.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/all/altmacro.d11
-rw-r--r--gas/testsuite/gas/all/altmacro.s36
-rw-r--r--gas/testsuite/gas/all/gas.exp2
4 files changed, 54 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index e61fd49..a5c3ddb 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-13 Jan Beulich <jbeulich@novell.com>
+
+ * gas/all/altmacro.[sd]: New test.
+ * gas/all/gas.exp: Run the new test.
+
2004-08-10 Mark Mitchell <mark@codesourcery.com>
* gas/arm/bignum1.s: New test.
diff --git a/gas/testsuite/gas/all/altmacro.d b/gas/testsuite/gas/all/altmacro.d
new file mode 100644
index 0000000..12f3abb
--- /dev/null
+++ b/gas/testsuite/gas/all/altmacro.d
@@ -0,0 +1,11 @@
+#as: --alternate
+#objdump: -s -j .data
+#name: alternate macro syntax
+
+# Test the alternate macro syntax.
+
+.*: .*
+
+Contents of section .data:
+ 0000 01020912 61626331 32332121 3c3e2721 .*
+ 0010 3c3e273e 3c21 .*
diff --git a/gas/testsuite/gas/all/altmacro.s b/gas/testsuite/gas/all/altmacro.s
new file mode 100644
index 0000000..c7dbea1
--- /dev/null
+++ b/gas/testsuite/gas/all/altmacro.s
@@ -0,0 +1,36 @@
+.macro m1 v1, v2
+ LOCAL l1, l2
+label&v1:
+l1: .byte v1
+label&v2:
+l2: .byte v2
+.endm
+
+.macro m2 v1, v2
+ m1 %v1, %(v2-v1)
+.endm
+
+.macro m3 str
+ .ascii &str
+.endm
+
+ .data
+
+m2 1, 3
+m2 9, 27
+
+m3 "abc"
+m3 <123>
+
+ .noaltmacro
+
+.macro m4 str
+ .ascii "&str"
+.endm
+
+m4 "!!<>'"
+
+ .altmacro
+
+m3 "!!<>'"
+m3 <!>!<!!>
diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp
index df8d71d..3fb713c 100644
--- a/gas/testsuite/gas/all/gas.exp
+++ b/gas/testsuite/gas/all/gas.exp
@@ -114,6 +114,8 @@ case $target_triplet in {
}
}
+run_dump_test altmacro
+
# This test is for any COFF target.
# We omit m88k COFF because it uses weird pseudo-op names.
# We omit the ARM toolchains because they define locals to