From: Ian Lance Taylor Date: Mon, 21 Aug 1995 18:45:08 +0000 (+0000) Subject: * gas/macros/*: New tests for macros. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96dbd10de86788e27b4ecc36e753b18c87a5425d;p=binutils-gdb.git * gas/macros/*: New tests for macros. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 5b1787c1453..2a889fc50de 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,12 @@ +Mon Aug 21 14:39:29 1995 Ian Lance Taylor + + * 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 * gasp/gasp.exp (gasp_test): Call prune_system_crud on the output diff --git a/gas/testsuite/gas/.Sanitize b/gas/testsuite/gas/.Sanitize index f4cb7c69952..1332d4b0b56 100644 --- a/gas/testsuite/gas/.Sanitize +++ b/gas/testsuite/gas/.Sanitize @@ -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 index 00000000000..17e460e2221 --- /dev/null +++ b/gas/testsuite/gas/macros/.Sanitize @@ -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 index 00000000000..cc976311f5c --- /dev/null +++ b/gas/testsuite/gas/macros/err.s @@ -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 index 00000000000..6733622981e --- /dev/null +++ b/gas/testsuite/gas/macros/irp.d @@ -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 index 00000000000..2f9a6214453 --- /dev/null +++ b/gas/testsuite/gas/macros/irp.s @@ -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 index 00000000000..efb5d996dab --- /dev/null +++ b/gas/testsuite/gas/macros/rept.d @@ -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 index 00000000000..243cf67b8f7 --- /dev/null +++ b/gas/testsuite/gas/macros/rept.s @@ -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 index 00000000000..d84b3fb53b3 --- /dev/null +++ b/gas/testsuite/gas/macros/test1.d @@ -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 index 00000000000..988b7cde0d4 --- /dev/null +++ b/gas/testsuite/gas/macros/test1.s @@ -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 index 00000000000..741d734959a --- /dev/null +++ b/gas/testsuite/gas/macros/test2.d @@ -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 index 00000000000..0e77dc7788b --- /dev/null +++ b/gas/testsuite/gas/macros/test2.s @@ -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 index 00000000000..2580f764222 --- /dev/null +++ b/gas/testsuite/gas/macros/test3.d @@ -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 index 00000000000..c6410aec164 --- /dev/null +++ b/gas/testsuite/gas/macros/test3.s @@ -0,0 +1,7 @@ + .macro m arg1 arg2 + \arg1 + .exitm + \arg2 + .endm + + m ".long r1",.garbage