* gas/macros/*: New tests for macros.
authorIan Lance Taylor <ian@airs.com>
Mon, 21 Aug 1995 18:45:08 +0000 (18:45 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 21 Aug 1995 18:45:08 +0000 (18:45 +0000)
14 files changed:
gas/testsuite/ChangeLog
gas/testsuite/gas/.Sanitize
gas/testsuite/gas/macros/.Sanitize [new file with mode: 0644]
gas/testsuite/gas/macros/err.s [new file with mode: 0644]
gas/testsuite/gas/macros/irp.d [new file with mode: 0644]
gas/testsuite/gas/macros/irp.s [new file with mode: 0644]
gas/testsuite/gas/macros/rept.d [new file with mode: 0644]
gas/testsuite/gas/macros/rept.s [new file with mode: 0644]
gas/testsuite/gas/macros/test1.d [new file with mode: 0644]
gas/testsuite/gas/macros/test1.s [new file with mode: 0644]
gas/testsuite/gas/macros/test2.d [new file with mode: 0644]
gas/testsuite/gas/macros/test2.s [new file with mode: 0644]
gas/testsuite/gas/macros/test3.d [new file with mode: 0644]
gas/testsuite/gas/macros/test3.s [new file with mode: 0644]

index 5b1787c14539284b1d50afe36d710b27ee576359..2a889fc50de292958c5970f203ed688d93194a45 100644 (file)
@@ -1,3 +1,12 @@
+Mon Aug 21 14:39:29 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * gas/macros/*: New tests for macros.
+
+       * gas/mri/common.s: Use data, not .data.
+
+       * gasp/pl3.out: Update for changes in commented source output when
+       LOCAL is used.
+
 Sat Aug 19 17:36:17 1995  Ian Lance Taylor  <ian@cygnus.com>
 
        * gasp/gasp.exp (gasp_test): Call prune_system_crud on the output
index f4cb7c6995208954e0bbe1fa954299da2f6938b9..1332d4b0b56be49fc561522a6b48328ad232c966 100644 (file)
@@ -40,6 +40,7 @@ i386
 ieee-fp
 m68k
 m68k-coff
+macros
 mips
 mri
 sparc-solaris
diff --git a/gas/testsuite/gas/macros/.Sanitize b/gas/testsuite/gas/macros/.Sanitize
new file mode 100644 (file)
index 0000000..17e460e
--- /dev/null
@@ -0,0 +1,45 @@
+# Sanitize.in for gas/testsuite/gas/macros
+#
+
+# Each directory to survive it's way into a release will need a file
+# like this one called "./.Sanitize".  All keyword lines must exist,
+# and must exist in the order specified by this file.  Each directory
+# in the tree will be processed, top down, in the following order.
+
+# Hash started lines like this one are comments and will be deleted
+# before anything else is done.  Blank lines will also be squashed
+# out.
+
+# The lines between the "Do-first:" line and the "Things-to-keep:"
+# line are executed as a /bin/sh shell script before anything else is
+# done in this 
+
+Do-first:
+
+
+# All files listed between the "Things-to-keep:" line and the
+# "Files-to-sed:" line will be kept.  All other files will be removed.
+# Directories listed in this section will have their own Sanitize
+# called.  Directories not listed will be removed in their entirety
+# with rm -rf.
+
+Things-to-keep:
+
+err.s
+irp.d
+irp.s
+macros.exp
+rept.d
+rept.s
+test1.d
+test1.s
+test2.d
+test2.s
+test3.d
+test3.s
+
+Things-to-lose:
+
+Do-last:
+
+# End of file.
diff --git a/gas/testsuite/gas/macros/err.s b/gas/testsuite/gas/macros/err.s
new file mode 100644 (file)
index 0000000..cc97631
--- /dev/null
@@ -0,0 +1,5 @@
+       .macro  m
+       m
+       .endm
+
+       m
diff --git a/gas/testsuite/gas/macros/irp.d b/gas/testsuite/gas/macros/irp.d
new file mode 100644 (file)
index 0000000..6733622
--- /dev/null
@@ -0,0 +1,13 @@
+#objdump: -r
+#name: macro irp
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR .*
+OFFSET[        ]+TYPE[         ]+VALUE.*
+0+00[  ]+[a-zA-Z0-9_]+[        ]+r1
+0+04[  ]+[a-zA-Z0-9_]+[        ]+r2
+0+08[  ]+[a-zA-Z0-9_]+[        ]+r3
+0+0c[  ]+[a-zA-Z0-9_]+[        ]+s1
+0+10[  ]+[a-zA-Z0-9_]+[        ]+s2
+0+14[  ]+[a-zA-Z0-9_]+[        ]+s3
diff --git a/gas/testsuite/gas/macros/irp.s b/gas/testsuite/gas/macros/irp.s
new file mode 100644 (file)
index 0000000..2f9a621
--- /dev/null
@@ -0,0 +1,8 @@
+       .irp    param,1,2,3
+       .long   r\param
+       .endr
+
+       .irpc   param,123
+       .long   s\param
+       .endr
+
diff --git a/gas/testsuite/gas/macros/rept.d b/gas/testsuite/gas/macros/rept.d
new file mode 100644 (file)
index 0000000..efb5d99
--- /dev/null
@@ -0,0 +1,10 @@
+#objdump: -r
+#name: macro rept
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR .*
+OFFSET[        ]+TYPE[         ]+VALUE.*
+0+00[  ]+[a-zA-Z0-9_]+[        ]+r1
+0+04[  ]+[a-zA-Z0-9_]+[        ]+r1
+0+08[  ]+[a-zA-Z0-9_]+[        ]+r1
diff --git a/gas/testsuite/gas/macros/rept.s b/gas/testsuite/gas/macros/rept.s
new file mode 100644 (file)
index 0000000..243cf67
--- /dev/null
@@ -0,0 +1,3 @@
+       .rept   3
+       .long   r1
+       .endr
diff --git a/gas/testsuite/gas/macros/test1.d b/gas/testsuite/gas/macros/test1.d
new file mode 100644 (file)
index 0000000..d84b3fb
--- /dev/null
@@ -0,0 +1,5 @@
+#nm: --extern-only
+#name: macro test 1
+
+0+01 A s1
+0+02 A s2
diff --git a/gas/testsuite/gas/macros/test1.s b/gas/testsuite/gas/macros/test1.s
new file mode 100644 (file)
index 0000000..988b7cd
--- /dev/null
@@ -0,0 +1,7 @@
+       .macro  m arg1 arg2
+       .globl  \arg1
+       \arg1 = \arg2
+       .endm
+
+       m s1,1
+       m s2,2
diff --git a/gas/testsuite/gas/macros/test2.d b/gas/testsuite/gas/macros/test2.d
new file mode 100644 (file)
index 0000000..741d734
--- /dev/null
@@ -0,0 +1,10 @@
+#objdump: -r
+#name: macro test 2
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR .*
+OFFSET[        ]+TYPE[         ]+VALUE.*
+0+00[  ]+[a-zA-Z0-9_]+[        ]+r1
+0+04[  ]+[a-zA-Z0-9_]+[        ]+r2
+0+08[  ]+[a-zA-Z0-9_]+[        ]+r3
diff --git a/gas/testsuite/gas/macros/test2.s b/gas/testsuite/gas/macros/test2.s
new file mode 100644 (file)
index 0000000..0e77dc7
--- /dev/null
@@ -0,0 +1,8 @@
+       .macro  m arg1 arg2 arg3
+       .long   \arg1
+       .ifnc   ,\arg2\arg3
+       m       \arg2,\arg3
+       .endif
+       .endm
+
+       m       r1,r2,r3
diff --git a/gas/testsuite/gas/macros/test3.d b/gas/testsuite/gas/macros/test3.d
new file mode 100644 (file)
index 0000000..2580f76
--- /dev/null
@@ -0,0 +1,8 @@
+#objdump: -r
+#name: macro test 3
+
+.*: +file format .*
+
+RELOCATION RECORDS FOR .*
+OFFSET[        ]+TYPE[         ]+VALUE.*
+0+00[  ]+[a-zA-Z0-9_]+[        ]+r1
diff --git a/gas/testsuite/gas/macros/test3.s b/gas/testsuite/gas/macros/test3.s
new file mode 100644 (file)
index 0000000..c6410ae
--- /dev/null
@@ -0,0 +1,7 @@
+       .macro  m arg1 arg2
+       \arg1
+       .exitm
+       \arg2
+       .endm
+
+       m       ".long r1",.garbage