* gas/macros/*: New tests for macros.

This commit is contained in:
Ian Lance Taylor 1995-08-21 18:45:08 +00:00
parent d2f661bd18
commit 96dbd10de8
14 changed files with 139 additions and 0 deletions

View 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

View File

@ -40,6 +40,7 @@ i386
ieee-fp
m68k
m68k-coff
macros
mips
mri
sparc-solaris

View File

@ -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.

View File

@ -0,0 +1,5 @@
.macro m
m
.endm
m

View File

@ -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

View File

@ -0,0 +1,8 @@
.irp param,1,2,3
.long r\param
.endr
.irpc param,123
.long s\param
.endr

View File

@ -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

View File

@ -0,0 +1,3 @@
.rept 3
.long r1
.endr

View File

@ -0,0 +1,5 @@
#nm: --extern-only
#name: macro test 1
0+01 A s1
0+02 A s2

View File

@ -0,0 +1,7 @@
.macro m arg1 arg2
.globl \arg1
\arg1 = \arg2
.endm
m s1,1
m s2,2

View File

@ -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

View File

@ -0,0 +1,8 @@
.macro m arg1 arg2 arg3
.long \arg1
.ifnc ,\arg2\arg3
m \arg2,\arg3
.endif
.endm
m r1,r2,r3

View File

@ -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

View File

@ -0,0 +1,7 @@
.macro m arg1 arg2
\arg1
.exitm
\arg2
.endm
m ".long r1",.garbage